├── .gitignore ├── README.md ├── dataset └── WiderPerson │ ├── Annotations │ ├── 000040.jpg.txt │ ├── 000041.jpg.txt │ ├── 000042.jpg.txt │ ├── 000044.jpg.txt │ ├── 000045.jpg.txt │ ├── 000046.jpg.txt │ ├── 000048.jpg.txt │ ├── 000049.jpg.txt │ ├── 000050.jpg.txt │ ├── 000051.jpg.txt │ ├── 000059.jpg.txt │ ├── 000060.jpg.txt │ ├── 000061.jpg.txt │ ├── 000065.jpg.txt │ ├── 000079.jpg.txt │ ├── 000080.jpg.txt │ ├── 000081.jpg.txt │ ├── 000085.jpg.txt │ ├── 000088.jpg.txt │ ├── 000089.jpg.txt │ ├── 000091.jpg.txt │ └── 000099.jpg.txt │ └── Images │ ├── 000040.jpg │ ├── 000041.jpg │ ├── 000042.jpg │ ├── 000043.jpg │ ├── 000044.jpg │ ├── 000045.jpg │ ├── 000046.jpg │ ├── 000047.jpg │ ├── 000048.jpg │ ├── 000049.jpg │ ├── 000050.jpg │ ├── 000051.jpg │ ├── 000052.jpg │ ├── 000053.jpg │ ├── 000054.jpg │ ├── 000055.jpg │ ├── 000056.jpg │ ├── 000057.jpg │ ├── 000058.jpg │ ├── 000059.jpg │ ├── 000060.jpg │ ├── 000061.jpg │ ├── 000064.jpg │ ├── 000065.jpg │ ├── 000066.jpg │ ├── 000067.jpg │ ├── 000068.jpg │ ├── 000069.jpg │ ├── 000070.jpg │ ├── 000071.jpg │ ├── 000072.jpg │ ├── 000073.jpg │ ├── 000074.jpg │ ├── 000075.jpg │ ├── 000076.jpg │ ├── 000077.jpg │ ├── 000078.jpg │ ├── 000079.jpg │ ├── 000080.jpg │ ├── 000081.jpg │ ├── 000083.jpg │ ├── 000084.jpg │ ├── 000085.jpg │ ├── 000086.jpg │ ├── 000087.jpg │ ├── 000088.jpg │ ├── 000089.jpg │ ├── 000090.jpg │ ├── 000091.jpg │ ├── 000093.jpg │ ├── 000097.jpg │ ├── 000098.jpg │ └── 000099.jpg ├── img ├── demo1.jpg ├── demo1_box.jpg ├── demo2.jpg └── demo2_box.jpg ├── main.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.o 8 | *.so 9 | *.pyc 10 | 11 | # Packages # 12 | ############ 13 | # it's better to unpack these files and commit the raw source 14 | # git has its own built in compression methods 15 | *.7z 16 | *.dmg 17 | *.gz 18 | *.iso 19 | *.rar 20 | #*.tar 21 | *.zip 22 | 23 | # Logs and databases # 24 | ###################### 25 | *.log 26 | *.sqlite 27 | 28 | # OS generated files # 29 | ###################### 30 | .DS_Store 31 | ehthumbs.db 32 | Icon 33 | Thumbs.db 34 | .tmtags 35 | .idea 36 | tags 37 | vendor.tags 38 | tmtagsHistory 39 | *.sublime-project 40 | *.sublime-workspace 41 | .bundle 42 | 43 | ./*.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mosaic Data Augmentation 2 | 3 | YoloV4 use Mosaic for Augmentation. So I just write a script for generate mosaic image. 4 | 5 | Demo1: 6 | 7 | ![image](https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/master/img/demo1.jpg) 8 | 9 | Demo1 with bbox: 10 | 11 | ![image](https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/master/img/demo1_box.jpg) 12 | 13 | Demo2: 14 | 15 | ![image](https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/master/img/demo2.jpg) 16 | 17 | Demo2 with bbox: 18 | 19 | ![image](https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/master/img/demo2_box.jpg) 20 | 21 | Dataset come from: 22 | 23 | [WiderPerson: A Diverse Dataset for Dense Pedestrian Detection in the Wild](http://www.cbsr.ia.ac.cn/users/sfzhang/WiderPerson/) 24 | 25 | ## License 26 | 27 | 28 | ``` 29 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 30 | Version 2, December 2004 31 | 32 | Copyright (C) 2004 Sam Hocevar 33 | 34 | Everyone is permitted to copy and distribute verbatim or modified 35 | copies of this license document, and changing it is allowed as long 36 | as the name is changed. 37 | 38 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 39 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 40 | 41 | 0. You just DO WHAT THE FUCK YOU WANT TO. 42 | ``` -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000040.jpg.txt: -------------------------------------------------------------------------------- 1 | 35 2 | 1 45 235 79 318 3 | 1 60 209 120 356 4 | 1 119 214 168 336 5 | 1 94 220 136 326 6 | 1 213 201 287 381 7 | 1 268 201 339 378 8 | 1 312 192 389 380 9 | 1 374 226 391 267 10 | 1 417 225 438 279 11 | 1 428 222 446 266 12 | 1 443 224 456 258 13 | 1 449 227 467 271 14 | 1 396 217 406 241 15 | 1 402 210 413 238 16 | 1 409 217 419 241 17 | 1 531 222 550 287 18 | 1 527 217 538 245 19 | 1 511 213 522 240 20 | 1 515 211 525 237 21 | 1 491 216 502 243 22 | 1 484 209 494 235 23 | 1 473 211 483 235 24 | 1 477 211 487 236 25 | 1 468 212 476 235 26 | 1 461 210 471 236 27 | 1 456 212 466 240 28 | 1 448 209 459 237 29 | 1 439 210 450 237 30 | 1 431 211 442 241 31 | 1 420 213 432 242 32 | 3 0 208 46 407 33 | 3 65 216 88 241 34 | 3 167 233 180 250 35 | 3 150 222 160 238 36 | 3 381 222 395 246 37 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000041.jpg.txt: -------------------------------------------------------------------------------- 1 | 147 2 | 1 50 132 117 296 3 | 1 93 163 147 294 4 | 1 172 141 226 273 5 | 1 196 156 232 245 6 | 1 259 156 296 248 7 | 1 477 158 507 242 8 | 1 477 35 504 104 9 | 1 456 103 486 178 10 | 1 445 102 475 177 11 | 1 418 105 446 175 12 | 1 454 39 479 103 13 | 1 459 66 480 119 14 | 1 446 65 468 119 15 | 1 433 63 456 120 16 | 1 415 62 439 124 17 | 1 401 66 424 124 18 | 1 386 69 407 124 19 | 1 368 66 392 125 20 | 1 357 63 383 127 21 | 1 342 64 368 130 22 | 1 308 63 335 131 23 | 1 284 78 316 156 24 | 1 410 33 438 104 25 | 1 325 63 351 130 26 | 1 271 45 296 108 27 | 1 259 72 286 137 28 | 1 247 63 274 131 29 | 1 228 60 256 130 30 | 1 213 46 235 102 31 | 1 199 50 222 106 32 | 1 183 53 206 109 33 | 1 156 45 179 101 34 | 1 128 64 149 118 35 | 1 119 62 140 117 36 | 1 103 57 128 117 37 | 1 89 56 111 109 38 | 1 74 49 99 111 39 | 1 72 88 98 151 40 | 1 56 94 81 154 41 | 1 43 90 70 155 42 | 1 30 99 52 153 43 | 1 45 58 66 110 44 | 1 23 63 49 130 45 | 1 32 55 57 115 46 | 1 17 47 41 105 47 | 1 0 129 17 203 48 | 1 0 128 25 201 49 | 3 35 185 63 237 50 | 3 87 186 111 229 51 | 3 129 176 146 197 52 | 3 157 179 186 238 53 | 3 281 154 296 202 54 | 3 301 176 321 239 55 | 3 325 177 352 236 56 | 3 355 175 381 229 57 | 3 382 175 414 234 58 | 3 423 203 453 248 59 | 3 415 175 440 211 60 | 3 439 175 464 212 61 | 3 469 177 498 230 62 | 3 482 126 504 161 63 | 3 482 106 500 126 64 | 3 488 96 502 114 65 | 3 432 51 446 65 66 | 3 431 88 448 117 67 | 3 410 105 426 124 68 | 3 397 123 419 162 69 | 3 374 123 396 162 70 | 3 349 119 370 160 71 | 3 325 122 349 164 72 | 3 301 122 323 165 73 | 3 279 125 300 162 74 | 3 257 122 278 159 75 | 3 391 108 405 127 76 | 3 389 96 405 111 77 | 3 367 96 386 118 78 | 3 340 98 363 118 79 | 3 386 53 401 69 80 | 3 385 41 398 56 81 | 3 362 36 379 60 82 | 3 352 50 365 66 83 | 3 322 98 335 118 84 | 3 324 47 340 64 85 | 3 324 34 340 49 86 | 3 309 48 323 65 87 | 3 293 45 309 66 88 | 3 294 65 311 87 89 | 3 278 101 292 119 90 | 3 279 74 290 90 91 | 3 260 46 274 65 92 | 3 262 113 283 126 93 | 3 246 52 258 69 94 | 3 241 109 258 148 95 | 3 218 126 236 160 96 | 3 190 122 209 153 97 | 3 247 100 259 110 98 | 3 235 101 249 112 99 | 3 223 107 238 125 100 | 3 221 99 233 109 101 | 3 207 103 218 117 102 | 3 199 112 213 125 103 | 3 195 98 207 110 104 | 3 216 87 227 98 105 | 3 218 80 228 87 106 | 3 202 85 213 98 107 | 3 204 73 216 85 108 | 3 174 111 192 131 109 | 3 155 111 175 138 110 | 3 136 110 155 136 111 | 3 180 99 193 113 112 | 3 168 102 179 113 113 | 3 184 82 194 96 114 | 3 176 74 186 88 115 | 3 165 86 178 98 116 | 3 162 75 172 87 117 | 3 146 94 163 110 118 | 3 135 100 146 113 119 | 3 148 63 165 80 120 | 3 138 50 153 64 121 | 3 126 125 146 155 122 | 3 110 125 126 153 123 | 3 93 127 109 151 124 | 3 92 108 108 129 125 | 3 109 108 124 126 126 | 3 123 108 137 124 127 | 3 121 96 133 111 128 | 3 123 87 133 102 129 | 3 107 84 123 107 130 | 3 107 45 119 57 131 | 3 96 48 106 57 132 | 3 91 88 102 100 133 | 3 65 65 81 78 134 | 3 55 72 69 89 135 | 3 51 129 68 173 136 | 3 34 130 47 177 137 | 3 61 52 71 63 138 | 3 54 54 62 66 139 | 3 19 128 34 176 140 | 3 16 103 34 128 141 | 3 0 116 9 126 142 | 3 0 87 14 113 143 | 3 42 48 48 56 144 | 3 12 76 23 88 145 | 3 8 55 19 70 146 | 3 1 56 15 83 147 | 3 0 50 6 65 148 | 3 83 74 95 90 149 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000042.jpg.txt: -------------------------------------------------------------------------------- 1 | 24 2 | 1 0 122 59 312 3 | 1 59 129 117 272 4 | 1 44 115 92 234 5 | 1 83 136 160 327 6 | 1 146 126 184 222 7 | 1 195 141 251 279 8 | 1 220 135 285 294 9 | 1 258 136 327 306 10 | 1 303 152 360 293 11 | 1 323 148 375 278 12 | 1 366 138 432 301 13 | 1 444 151 507 306 14 | 1 486 142 551 316 15 | 1 433 97 469 188 16 | 3 126 138 146 168 17 | 3 264 146 285 175 18 | 3 303 125 320 161 19 | 3 325 136 343 155 20 | 3 406 155 422 172 21 | 3 528 155 544 176 22 | 3 463 134 477 149 23 | 5 356 148 388 162 24 | 5 410 137 437 153 25 | 5 490 146 507 156 26 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000044.jpg.txt: -------------------------------------------------------------------------------- 1 | 34 2 | 1 24 53 84 200 3 | 1 53 45 86 128 4 | 1 72 49 119 163 5 | 1 100 45 174 225 6 | 1 129 44 183 175 7 | 1 167 48 207 145 8 | 1 159 44 188 115 9 | 1 206 41 253 157 10 | 1 204 50 229 112 11 | 1 257 41 285 113 12 | 1 275 47 306 126 13 | 1 287 48 326 143 14 | 1 306 48 355 171 15 | 1 338 42 374 133 16 | 1 214 41 276 196 17 | 1 367 51 409 154 18 | 1 396 44 417 98 19 | 1 407 46 446 143 20 | 1 439 48 473 133 21 | 1 475 48 505 125 22 | 1 490 46 508 93 23 | 3 0 184 24 278 24 | 3 0 76 16 177 25 | 3 0 53 21 143 26 | 3 29 45 44 81 27 | 3 109 46 126 136 28 | 3 305 44 319 103 29 | 3 339 42 352 65 30 | 3 360 45 366 108 31 | 3 391 43 403 102 32 | 3 430 41 438 113 33 | 3 448 44 453 99 34 | 3 478 44 492 72 35 | 3 503 55 509 116 36 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000045.jpg.txt: -------------------------------------------------------------------------------- 1 | 16 2 | 1 0 28 86 247 3 | 1 70 47 143 228 4 | 1 174 45 255 246 5 | 1 148 54 225 242 6 | 1 96 62 149 192 7 | 1 348 99 368 151 8 | 1 380 64 429 183 9 | 1 397 66 447 187 10 | 1 420 59 476 199 11 | 1 443 59 503 209 12 | 1 490 65 554 221 13 | 1 513 60 582 231 14 | 3 153 75 184 138 15 | 3 242 111 254 146 16 | 3 254 115 264 143 17 | 3 262 115 281 141 18 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000046.jpg.txt: -------------------------------------------------------------------------------- 1 | 49 2 | 1 0 125 24 231 3 | 1 0 127 35 226 4 | 1 19 122 59 223 5 | 1 39 122 84 235 6 | 1 78 138 107 212 7 | 1 96 139 121 201 8 | 1 111 119 151 217 9 | 1 131 127 175 236 10 | 1 155 133 188 214 11 | 1 174 133 202 203 12 | 1 187 129 231 240 13 | 1 229 125 271 231 14 | 1 243 123 284 225 15 | 1 271 129 305 214 16 | 1 289 130 321 209 17 | 1 312 129 342 206 18 | 1 319 129 352 209 19 | 1 341 122 380 218 20 | 1 369 126 407 219 21 | 1 384 119 430 231 22 | 1 426 120 473 238 23 | 1 440 123 480 224 24 | 1 451 125 487 216 25 | 1 457 123 496 218 26 | 1 474 122 500 219 27 | 3 136 121 144 134 28 | 3 173 127 182 136 29 | 3 196 125 204 138 30 | 3 235 127 245 141 31 | 3 269 128 277 141 32 | 3 278 130 287 142 33 | 3 327 123 335 131 34 | 3 347 125 357 136 35 | 3 364 123 371 135 36 | 3 412 123 422 137 37 | 3 429 128 438 140 38 | 3 438 129 446 139 39 | 3 425 125 433 135 40 | 5 19 123 34 136 41 | 5 67 128 88 140 42 | 5 87 125 101 139 43 | 5 103 129 125 140 44 | 5 158 134 168 143 45 | 5 218 127 235 140 46 | 5 292 128 301 140 47 | 5 308 127 324 138 48 | 5 340 128 349 140 49 | 5 372 123 384 138 50 | 5 479 128 490 138 51 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000048.jpg.txt: -------------------------------------------------------------------------------- 1 | 38 2 | 1 127 140 266 482 3 | 1 309 209 421 485 4 | 1 389 226 493 483 5 | 1 515 133 658 483 6 | 1 428 158 561 484 7 | 1 47 152 112 311 8 | 1 113 139 169 275 9 | 1 97 175 130 256 10 | 1 665 183 703 278 11 | 1 686 172 736 294 12 | 1 767 167 817 291 13 | 1 812 176 865 325 14 | 1 754 177 790 267 15 | 3 335 71 434 269 16 | 3 7 215 83 360 17 | 3 8 159 25 242 18 | 3 46 187 63 207 19 | 3 24 187 48 210 20 | 3 139 167 167 213 21 | 3 167 178 188 203 22 | 3 415 150 455 222 23 | 3 642 178 660 226 24 | 3 722 180 735 192 25 | 3 720 171 732 182 26 | 3 737 181 746 195 27 | 3 744 183 760 205 28 | 3 795 174 804 184 29 | 3 810 174 828 199 30 | 3 812 166 822 179 31 | 3 837 172 854 191 32 | 3 855 168 864 208 33 | 4 191 70 350 279 34 | 5 24 162 62 185 35 | 5 86 165 124 186 36 | 5 492 168 539 190 37 | 5 582 176 646 200 38 | 5 658 174 705 188 39 | 5 734 169 773 189 40 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000049.jpg.txt: -------------------------------------------------------------------------------- 1 | 36 2 | 1 390 185 433 318 3 | 1 319 168 368 291 4 | 1 330 149 379 272 5 | 1 275 189 337 343 6 | 1 206 223 258 350 7 | 1 136 201 192 340 8 | 1 205 169 264 314 9 | 1 267 135 313 248 10 | 1 235 147 276 247 11 | 1 148 149 202 281 12 | 1 181 130 228 248 13 | 1 87 172 145 313 14 | 1 85 143 133 261 15 | 1 112 121 154 227 16 | 1 156 104 198 209 17 | 1 32 125 79 242 18 | 1 66 111 107 213 19 | 1 86 96 123 187 20 | 1 160 55 175 95 21 | 1 22 100 62 200 22 | 1 0 116 26 222 23 | 1 0 92 32 181 24 | 1 16 79 50 161 25 | 1 232 64 256 124 26 | 3 316 253 357 348 27 | 3 261 307 289 349 28 | 3 158 275 196 348 29 | 3 59 247 118 349 30 | 3 407 328 431 348 31 | 3 240 125 262 152 32 | 3 137 100 157 124 33 | 3 0 71 10 102 34 | 3 10 69 29 94 35 | 3 75 48 92 89 36 | 3 222 53 245 71 37 | 3 49 80 67 122 38 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000050.jpg.txt: -------------------------------------------------------------------------------- 1 | 18 2 | 1 399 68 444 255 3 | 1 327 82 411 290 4 | 1 293 79 359 243 5 | 1 252 83 315 239 6 | 1 224 103 280 243 7 | 1 119 53 199 250 8 | 1 167 63 226 209 9 | 1 156 67 209 196 10 | 1 67 66 122 202 11 | 1 3 71 16 104 12 | 1 6 71 21 109 13 | 1 13 72 26 107 14 | 1 17 71 29 104 15 | 3 359 71 381 80 16 | 3 302 72 321 106 17 | 3 213 66 245 106 18 | 3 193 111 240 145 19 | 3 119 59 140 81 20 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000051.jpg.txt: -------------------------------------------------------------------------------- 1 | 27 2 | 1 117 370 287 785 3 | 1 6 401 31 462 4 | 1 36 409 57 464 5 | 1 80 407 100 457 6 | 1 93 411 112 460 7 | 1 101 408 120 457 8 | 1 118 403 136 450 9 | 1 135 411 154 457 10 | 1 151 410 166 449 11 | 1 20 396 43 455 12 | 1 261 403 274 435 13 | 1 251 409 261 433 14 | 1 272 407 283 435 15 | 1 313 425 330 469 16 | 1 322 402 349 469 17 | 1 365 400 393 470 18 | 1 378 403 404 468 19 | 3 66 410 82 449 20 | 3 107 404 115 409 21 | 3 256 401 263 409 22 | 3 320 405 329 418 23 | 5 6 399 18 413 24 | 5 167 401 182 409 25 | 5 158 407 172 418 26 | 5 240 402 254 410 27 | 5 343 404 360 412 28 | 5 358 412 370 418 29 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000059.jpg.txt: -------------------------------------------------------------------------------- 1 | 28 2 | 1 514 168 550 264 3 | 1 488 176 516 247 4 | 1 461 173 487 236 5 | 1 437 173 461 232 6 | 1 422 170 443 222 7 | 1 363 172 398 260 8 | 1 348 172 371 231 9 | 1 335 171 354 221 10 | 1 207 168 243 255 11 | 1 226 167 255 240 12 | 1 237 169 263 232 13 | 1 255 169 277 222 14 | 1 265 169 283 212 15 | 1 197 185 211 220 16 | 1 174 167 194 216 17 | 1 155 165 177 221 18 | 1 144 165 169 228 19 | 1 113 169 140 237 20 | 1 67 164 103 255 21 | 1 94 159 118 217 22 | 1 49 162 74 226 23 | 1 0 165 25 237 24 | 1 32 168 46 206 25 | 1 44 164 58 200 26 | 1 15 162 25 190 27 | 3 365 167 379 240 28 | 3 1 167 10 183 29 | 3 35 170 39 204 30 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000060.jpg.txt: -------------------------------------------------------------------------------- 1 | 31 2 | 1 0 38 32 159 3 | 1 28 36 69 136 4 | 1 63 95 111 214 5 | 1 89 31 141 161 6 | 1 120 46 145 106 7 | 1 135 45 163 115 8 | 1 189 26 248 172 9 | 1 273 50 290 95 10 | 1 290 36 324 121 11 | 1 317 39 352 126 12 | 1 287 47 309 101 13 | 1 343 51 357 88 14 | 1 351 54 363 84 15 | 1 357 40 387 114 16 | 1 369 32 419 156 17 | 1 373 17 474 267 18 | 1 489 39 536 157 19 | 1 480 39 507 107 20 | 1 440 50 453 84 21 | 1 436 50 448 82 22 | 1 519 44 543 106 23 | 1 172 57 186 91 24 | 1 258 50 274 89 25 | 3 55 36 70 54 26 | 3 77 48 88 76 27 | 3 85 38 98 52 28 | 3 96 35 105 50 29 | 3 208 120 241 160 30 | 3 258 82 283 123 31 | 3 320 43 330 59 32 | 3 359 110 405 138 33 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000061.jpg.txt: -------------------------------------------------------------------------------- 1 | 18 2 | 1 99 138 232 463 3 | 1 180 132 318 472 4 | 1 274 137 332 282 5 | 1 344 128 409 290 6 | 1 366 136 499 462 7 | 1 435 133 561 444 8 | 1 541 155 648 416 9 | 1 606 138 721 418 10 | 1 635 147 744 413 11 | 1 731 146 828 383 12 | 1 813 143 911 383 13 | 3 166 261 208 419 14 | 3 293 248 349 416 15 | 3 209 135 233 171 16 | 3 265 147 306 184 17 | 3 443 129 469 185 18 | 3 518 134 557 212 19 | 3 558 271 578 403 20 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000065.jpg.txt: -------------------------------------------------------------------------------- 1 | 19 2 | 1 11 83 94 287 3 | 1 80 42 181 292 4 | 1 165 10 294 327 5 | 1 225 35 330 293 6 | 1 354 122 424 295 7 | 1 302 121 346 232 8 | 1 319 108 361 211 9 | 1 348 101 386 194 10 | 1 146 72 180 154 11 | 3 0 120 30 153 12 | 3 21 129 39 145 13 | 3 0 132 12 202 14 | 3 309 112 328 140 15 | 3 393 129 421 179 16 | 3 411 133 444 185 17 | 3 451 98 466 182 18 | 3 442 97 462 156 19 | 3 426 95 447 135 20 | 5 167 131 204 155 21 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000079.jpg.txt: -------------------------------------------------------------------------------- 1 | 58 2 | 1 550 250 638 465 3 | 1 371 306 420 425 4 | 1 327 269 399 444 5 | 1 311 310 354 418 6 | 1 278 299 329 426 7 | 1 226 306 270 417 8 | 1 192 291 248 429 9 | 1 68 304 116 421 10 | 1 94 295 148 428 11 | 1 150 299 198 418 12 | 1 414 350 423 375 13 | 1 420 351 428 371 14 | 1 425 352 432 370 15 | 1 432 354 439 371 16 | 1 437 352 446 374 17 | 1 442 355 446 368 18 | 1 447 354 453 371 19 | 1 453 353 460 370 20 | 1 457 348 467 374 21 | 1 462 351 470 372 22 | 1 467 350 477 374 23 | 1 476 350 486 374 24 | 1 490 351 499 374 25 | 1 495 351 504 374 26 | 1 500 349 510 374 27 | 1 507 351 517 376 28 | 1 513 352 521 374 29 | 1 517 352 526 374 30 | 1 520 349 529 373 31 | 1 525 352 533 373 32 | 1 529 352 538 375 33 | 1 535 354 541 372 34 | 1 539 352 548 374 35 | 1 550 351 560 375 36 | 1 484 353 493 374 37 | 1 472 353 480 374 38 | 1 618 352 625 372 39 | 1 627 351 634 370 40 | 1 633 351 640 370 41 | 1 638 353 648 377 42 | 1 19 305 63 413 43 | 2 268 320 292 382 44 | 2 186 309 213 376 45 | 2 143 323 165 377 46 | 2 122 314 148 377 47 | 2 55 309 85 383 48 | 2 9 324 30 375 49 | 2 0 330 6 362 50 | 3 252 317 265 330 51 | 3 177 306 186 322 52 | 3 101 311 111 323 53 | 3 412 350 416 358 54 | 3 612 353 616 368 55 | 3 691 349 700 359 56 | 5 679 351 689 358 57 | 5 710 351 727 359 58 | 5 762 350 777 356 59 | 5 658 352 667 357 60 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000080.jpg.txt: -------------------------------------------------------------------------------- 1 | 157 2 | 1 3 55 15 87 3 | 1 37 57 48 87 4 | 1 68 57 80 87 5 | 1 103 57 115 86 6 | 1 137 55 148 85 7 | 1 162 56 173 86 8 | 1 122 29 134 60 9 | 1 137 32 148 62 10 | 1 9 169 26 214 11 | 1 31 165 49 209 12 | 1 55 168 72 209 13 | 1 72 162 89 205 14 | 1 91 164 107 205 15 | 1 108 159 126 204 16 | 1 132 158 148 198 17 | 1 153 157 169 198 18 | 1 174 158 189 196 19 | 1 187 154 203 196 20 | 1 199 153 215 195 21 | 1 210 152 227 194 22 | 1 221 150 235 188 23 | 1 232 147 245 182 24 | 1 246 142 263 186 25 | 1 263 141 279 182 26 | 1 163 6 174 36 27 | 1 175 3 185 29 28 | 1 176 32 187 58 29 | 1 190 29 203 60 30 | 1 192 56 204 86 31 | 1 212 56 223 85 32 | 1 199 6 211 36 33 | 1 211 6 223 35 34 | 1 234 32 244 59 35 | 1 241 27 255 61 36 | 1 231 55 243 85 37 | 1 248 55 260 87 38 | 1 267 53 280 87 39 | 1 285 53 298 88 40 | 1 309 55 322 86 41 | 1 333 55 346 87 42 | 1 266 5 276 33 43 | 1 277 4 290 35 44 | 1 289 29 299 56 45 | 1 299 27 310 57 46 | 1 336 4 346 32 47 | 1 345 2 356 30 48 | 1 329 28 340 57 49 | 1 343 26 356 58 50 | 1 356 54 368 87 51 | 1 373 58 385 87 52 | 1 374 32 385 58 53 | 1 391 27 403 59 54 | 1 391 4 404 36 55 | 1 405 4 417 36 56 | 1 437 6 447 34 57 | 1 447 2 459 34 58 | 1 435 31 446 57 59 | 1 460 27 472 56 60 | 1 394 58 407 89 61 | 1 413 56 426 88 62 | 1 431 57 442 87 63 | 1 447 55 459 87 64 | 1 465 55 477 87 65 | 1 484 56 496 87 66 | 1 510 56 522 87 67 | 1 529 57 542 89 68 | 1 553 55 567 90 69 | 1 581 57 595 92 70 | 1 279 137 296 179 71 | 1 300 135 318 178 72 | 1 316 138 333 181 73 | 1 333 142 348 182 74 | 1 349 143 364 182 75 | 1 370 145 385 184 76 | 1 382 148 399 189 77 | 1 398 150 413 189 78 | 1 409 152 425 191 79 | 1 420 156 436 195 80 | 1 431 157 445 193 81 | 1 450 156 466 198 82 | 1 469 160 485 202 83 | 1 486 161 505 207 84 | 1 502 163 519 204 85 | 1 521 163 539 207 86 | 1 536 164 553 209 87 | 1 551 170 567 212 88 | 1 192 185 207 224 89 | 1 215 198 226 225 90 | 1 242 179 260 225 91 | 1 288 190 304 229 92 | 1 349 186 365 225 93 | 1 331 198 343 227 94 | 1 344 276 357 308 95 | 1 420 191 434 225 96 | 1 430 179 447 223 97 | 1 442 272 456 306 98 | 1 500 270 515 307 99 | 1 455 191 466 221 100 | 3 109 275 126 308 101 | 3 129 288 142 303 102 | 3 116 259 131 279 103 | 3 117 238 132 259 104 | 3 123 229 134 246 105 | 3 124 223 135 235 106 | 3 130 221 139 234 107 | 3 129 209 137 220 108 | 3 135 204 147 216 109 | 3 126 197 138 208 110 | 3 147 197 159 209 111 | 3 162 204 174 215 112 | 3 172 193 183 208 113 | 3 178 216 192 237 114 | 3 153 228 162 243 115 | 3 163 231 174 237 116 | 3 162 237 176 269 117 | 3 141 276 158 294 118 | 3 159 277 175 301 119 | 3 179 275 202 309 120 | 3 198 276 210 299 121 | 3 212 276 227 303 122 | 3 229 280 244 309 123 | 3 244 275 264 308 124 | 3 187 247 205 273 125 | 3 217 252 232 278 126 | 3 232 246 249 273 127 | 3 208 224 218 245 128 | 3 212 215 224 231 129 | 3 224 218 245 256 130 | 3 228 209 241 225 131 | 3 235 203 253 225 132 | 3 223 192 237 212 133 | 3 249 253 271 272 134 | 3 264 238 284 263 135 | 3 269 227 283 247 136 | 3 269 209 285 240 137 | 3 268 192 285 218 138 | 3 266 279 282 308 139 | 3 279 275 299 308 140 | 3 305 279 320 307 141 | 3 318 271 342 310 142 | 3 304 213 317 233 143 | 3 378 201 394 221 144 | 3 390 193 407 218 145 | 3 363 273 385 309 146 | 3 388 282 409 308 147 | 3 409 273 431 310 148 | 3 464 268 487 312 149 | 3 495 269 504 287 150 | 3 496 248 514 270 151 | 3 498 229 511 249 152 | 3 487 232 498 245 153 | 3 498 223 513 241 154 | 3 464 191 481 209 155 | 3 487 205 509 223 156 | 3 493 190 507 202 157 | 3 487 190 498 203 158 | 3 483 178 497 192 159 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000081.jpg.txt: -------------------------------------------------------------------------------- 1 | 56 2 | 1 32 318 58 385 3 | 1 96 315 124 385 4 | 1 161 313 190 384 5 | 1 228 310 256 380 6 | 1 387 302 417 376 7 | 1 363 254 390 322 8 | 1 145 173 170 234 9 | 1 181 150 206 211 10 | 1 225 154 247 210 11 | 1 263 148 288 208 12 | 1 305 159 328 215 13 | 1 351 147 376 207 14 | 1 372 134 397 196 15 | 1 402 166 426 228 16 | 1 390 116 412 169 17 | 1 443 119 462 165 18 | 1 501 120 521 169 19 | 1 552 119 571 167 20 | 1 111 125 131 174 21 | 1 56 123 75 172 22 | 1 0 125 18 176 23 | 1 37 265 62 328 24 | 1 16 251 43 319 25 | 1 6 254 29 313 26 | 1 0 249 17 305 27 | 1 146 140 171 201 28 | 1 444 300 474 375 29 | 1 506 299 536 375 30 | 1 565 295 595 369 31 | 1 574 244 596 299 32 | 1 547 201 569 257 33 | 1 538 191 560 245 34 | 1 527 180 552 240 35 | 1 523 176 544 228 36 | 1 519 173 537 217 37 | 1 511 161 532 214 38 | 1 579 203 599 254 39 | 1 570 196 591 248 40 | 1 565 193 582 238 41 | 3 103 262 126 279 42 | 3 158 262 182 275 43 | 3 155 248 180 269 44 | 3 221 259 243 276 45 | 3 0 259 8 317 46 | 3 422 250 446 271 47 | 3 483 250 502 268 48 | 3 535 249 556 270 49 | 3 526 167 534 181 50 | 3 568 176 579 204 51 | 3 559 171 572 195 52 | 3 554 164 567 185 53 | 3 539 156 553 180 54 | 3 585 175 599 204 55 | 3 581 165 596 179 56 | 3 574 163 590 179 57 | 3 40 250 66 277 58 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000085.jpg.txt: -------------------------------------------------------------------------------- 1 | 44 2 | 1 163 168 233 341 3 | 1 226 168 292 331 4 | 1 329 171 390 322 5 | 1 381 166 443 317 6 | 1 432 175 483 302 7 | 1 475 171 529 303 8 | 1 518 160 569 285 9 | 1 539 169 584 282 10 | 1 412 176 457 286 11 | 1 289 180 337 298 12 | 1 315 178 360 291 13 | 1 136 176 195 319 14 | 1 101 169 163 324 15 | 1 64 175 123 320 16 | 1 37 170 102 331 17 | 1 0 176 48 331 18 | 1 32 170 82 293 19 | 1 208 172 264 309 20 | 1 359 182 402 287 21 | 1 511 178 550 276 22 | 3 203 174 218 191 23 | 3 273 178 289 195 24 | 3 1 171 20 190 25 | 3 32 178 51 195 26 | 3 77 172 88 195 27 | 3 94 169 110 194 28 | 3 175 178 189 198 29 | 3 146 183 160 197 30 | 3 218 183 228 192 31 | 3 395 182 406 195 32 | 3 385 179 394 198 33 | 3 440 179 450 193 34 | 3 463 178 473 195 35 | 3 471 173 482 190 36 | 3 482 178 495 194 37 | 3 510 174 523 191 38 | 3 518 171 528 186 39 | 3 531 170 540 181 40 | 3 571 188 584 261 41 | 3 284 191 297 211 42 | 3 277 213 297 291 43 | 5 106 176 152 195 44 | 5 288 172 376 193 45 | 5 412 164 432 191 46 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000088.jpg.txt: -------------------------------------------------------------------------------- 1 | 79 2 | 1 585 109 654 279 3 | 1 534 108 580 221 4 | 1 477 125 528 252 5 | 1 433 116 483 239 6 | 1 400 127 442 229 7 | 1 413 130 451 225 8 | 1 373 127 410 219 9 | 1 357 127 393 214 10 | 1 331 130 361 207 11 | 1 322 130 352 204 12 | 1 311 131 341 205 13 | 1 298 128 329 207 14 | 1 294 129 321 196 15 | 1 269 133 294 194 16 | 1 255 128 280 189 17 | 1 217 129 252 214 18 | 1 61 135 98 225 19 | 1 43 135 83 234 20 | 1 0 139 40 243 21 | 1 592 118 607 156 22 | 1 578 118 592 154 23 | 1 533 121 547 156 24 | 1 248 129 268 181 25 | 1 241 134 260 182 26 | 1 233 134 253 182 27 | 1 213 136 234 187 28 | 1 201 132 222 187 29 | 1 184 135 205 187 30 | 1 165 134 187 190 31 | 1 153 139 172 187 32 | 1 133 132 158 192 33 | 1 110 137 132 192 34 | 1 94 139 116 195 35 | 1 80 135 106 198 36 | 1 26 137 53 203 37 | 3 652 113 659 143 38 | 3 598 136 660 196 39 | 3 464 122 470 133 40 | 3 471 126 481 139 41 | 3 341 124 350 135 42 | 3 359 125 369 151 43 | 3 277 129 292 141 44 | 3 268 131 279 144 45 | 3 213 127 225 142 46 | 3 193 134 203 147 47 | 3 194 128 206 139 48 | 3 176 135 187 147 49 | 3 146 131 159 148 50 | 3 153 130 161 141 51 | 3 117 129 130 146 52 | 3 102 136 114 150 53 | 3 44 140 55 153 54 | 3 24 133 39 201 55 | 3 128 135 139 148 56 | 3 101 186 175 204 57 | 3 94 195 178 213 58 | 3 228 190 294 204 59 | 3 258 199 360 225 60 | 3 275 203 379 230 61 | 3 282 213 401 244 62 | 3 318 227 379 267 63 | 3 348 233 433 273 64 | 3 387 238 538 293 65 | 3 414 261 584 311 66 | 3 499 294 632 346 67 | 3 99 205 207 230 68 | 3 91 214 205 242 69 | 3 62 215 213 269 70 | 3 87 242 208 279 71 | 3 77 245 253 315 72 | 3 95 268 267 331 73 | 3 113 265 340 364 74 | 3 108 280 381 420 75 | 3 72 330 429 477 76 | 3 275 403 411 477 77 | 3 406 368 539 479 78 | 3 0 305 92 479 79 | 3 619 309 658 386 80 | 3 499 115 513 122 81 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000089.jpg.txt: -------------------------------------------------------------------------------- 1 | 25 2 | 1 43 78 150 342 3 | 1 451 127 488 218 4 | 1 439 133 466 199 5 | 1 375 135 395 186 6 | 1 347 124 376 198 7 | 1 243 109 289 223 8 | 1 267 119 294 188 9 | 1 97 115 138 218 10 | 1 127 115 163 203 11 | 1 165 117 194 189 12 | 1 0 113 25 214 13 | 1 281 130 301 181 14 | 1 235 137 260 200 15 | 1 300 109 355 244 16 | 1 177 97 250 277 17 | 1 391 117 437 231 18 | 1 480 108 537 249 19 | 3 484 128 515 211 20 | 3 531 133 545 207 21 | 3 430 126 444 195 22 | 3 368 129 377 189 23 | 3 306 114 330 166 24 | 3 186 119 196 137 25 | 3 192 122 205 188 26 | 3 242 124 254 137 27 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000091.jpg.txt: -------------------------------------------------------------------------------- 1 | 43 2 | 1 85 507 115 581 3 | 1 37 495 67 572 4 | 1 3 493 35 574 5 | 1 0 507 18 582 6 | 1 51 497 79 567 7 | 1 28 495 48 547 8 | 1 247 509 288 611 9 | 1 275 501 323 621 10 | 1 317 504 362 613 11 | 1 358 513 404 626 12 | 1 387 516 430 623 13 | 1 415 505 464 628 14 | 1 449 519 501 645 15 | 1 505 511 564 654 16 | 1 572 493 637 651 17 | 1 614 507 673 653 18 | 1 657 517 716 661 19 | 1 710 513 771 664 20 | 1 750 515 813 668 21 | 1 791 514 855 672 22 | 1 872 497 949 685 23 | 1 900 490 982 692 24 | 1 552 508 603 634 25 | 1 995 508 1024 621 26 | 1 954 502 1010 638 27 | 3 992 508 1010 570 28 | 3 880 493 902 530 29 | 3 844 505 871 557 30 | 3 832 500 859 548 31 | 3 814 499 838 515 32 | 3 793 499 821 543 33 | 3 779 510 805 545 34 | 3 749 497 776 538 35 | 3 722 505 737 527 36 | 3 675 503 701 528 37 | 3 653 505 670 543 38 | 3 646 509 656 528 39 | 3 476 490 516 537 40 | 3 367 499 404 530 41 | 3 115 498 131 533 42 | 5 512 502 597 524 43 | 5 399 502 494 528 44 | 5 310 497 389 525 45 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Annotations/000099.jpg.txt: -------------------------------------------------------------------------------- 1 | 46 2 | 1 386 92 458 267 3 | 1 456 111 500 270 4 | 1 336 89 410 271 5 | 1 221 84 296 266 6 | 1 181 84 254 265 7 | 1 115 107 182 271 8 | 1 23 75 101 267 9 | 1 68 100 135 267 10 | 1 147 88 219 265 11 | 1 262 97 314 227 12 | 1 0 111 33 253 13 | 1 179 71 189 96 14 | 1 257 61 263 79 15 | 3 445 102 481 145 16 | 3 433 91 454 129 17 | 3 377 94 406 131 18 | 3 280 84 306 122 19 | 3 262 99 276 122 20 | 3 260 84 287 128 21 | 3 228 88 249 111 22 | 3 191 94 206 119 23 | 3 153 95 172 124 24 | 3 111 103 125 120 25 | 3 161 79 173 88 26 | 3 194 79 202 90 27 | 3 304 88 314 98 28 | 3 320 85 332 99 29 | 3 388 71 397 81 30 | 3 391 77 401 91 31 | 3 458 78 468 90 32 | 3 211 71 220 80 33 | 3 290 69 295 75 34 | 3 295 73 301 78 35 | 3 276 76 286 86 36 | 3 303 59 311 68 37 | 3 29 95 42 111 38 | 3 343 99 360 121 39 | 3 339 75 352 88 40 | 3 371 80 383 92 41 | 3 449 98 457 113 42 | 3 19 118 42 247 43 | 5 403 78 445 92 44 | 5 315 64 327 78 45 | 5 66 92 93 112 46 | 5 0 93 30 115 47 | 5 107 96 147 111 48 | -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000040.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000040.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000041.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000041.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000042.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000042.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000043.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000043.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000044.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000044.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000045.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000045.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000046.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000046.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000047.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000047.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000048.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000049.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000049.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000050.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000050.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000051.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000051.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000052.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000052.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000053.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000053.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000054.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000054.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000055.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000055.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000056.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000056.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000057.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000057.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000058.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000058.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000059.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000059.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000060.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000060.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000061.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000061.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000064.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000064.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000065.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000065.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000066.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000066.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000067.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000067.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000068.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000068.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000069.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000069.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000070.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000070.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000071.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000071.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000072.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000072.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000073.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000073.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000074.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000074.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000075.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000075.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000076.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000076.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000077.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000077.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000078.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000078.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000079.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000079.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000080.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000080.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000081.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000081.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000083.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000083.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000084.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000084.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000085.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000085.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000086.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000086.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000087.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000087.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000088.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000088.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000089.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000089.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000090.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000090.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000091.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000091.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000093.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000093.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000097.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000097.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000098.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000098.jpg -------------------------------------------------------------------------------- /dataset/WiderPerson/Images/000099.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/dataset/WiderPerson/Images/000099.jpg -------------------------------------------------------------------------------- /img/demo1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/img/demo1.jpg -------------------------------------------------------------------------------- /img/demo1_box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/img/demo1_box.jpg -------------------------------------------------------------------------------- /img/demo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/img/demo2.jpg -------------------------------------------------------------------------------- /img/demo2_box.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jason9075/opencv-mosaic-data-aug/82716273f40fce8493e657fa15ec7f042b26c9a1/img/demo2_box.jpg -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import random 2 | 3 | import cv2 4 | import os 5 | import glob 6 | import numpy as np 7 | from PIL import Image 8 | 9 | OUTPUT_SIZE = (600, 600) # Height, Width 10 | SCALE_RANGE = (0.3, 0.7) 11 | FILTER_TINY_SCALE = 1 / 50 # if height or width lower than this scale, drop it. 12 | 13 | ANNO_DIR = 'dataset/WiderPerson/Annotations/' 14 | IMG_DIR = 'dataset/WiderPerson/Images/' 15 | 16 | category_name = ['background', 'person'] 17 | 18 | 19 | def main(): 20 | img_paths, annos = get_dataset(ANNO_DIR, IMG_DIR) 21 | 22 | idxs = random.sample(range(len(annos)), 4) 23 | 24 | new_image, new_annos = update_image_and_anno(img_paths, annos, 25 | idxs, 26 | OUTPUT_SIZE, SCALE_RANGE, 27 | filter_scale=FILTER_TINY_SCALE) 28 | 29 | cv2.imwrite('img/output.jpg', new_image) 30 | for anno in new_annos: 31 | start_point = (int(anno[1] * OUTPUT_SIZE[1]), int(anno[2] * OUTPUT_SIZE[0])) 32 | end_point = (int(anno[3] * OUTPUT_SIZE[1]), int(anno[4] * OUTPUT_SIZE[0])) 33 | cv2.rectangle(new_image, start_point, end_point, (0, 255, 0), 1, cv2.LINE_AA) 34 | cv2.imwrite('img/output_box.jpg', new_image) 35 | 36 | new_image = cv2.cvtColor(new_image, cv2.COLOR_BGR2RGB) 37 | new_image = Image.fromarray(new_image.astype(np.uint8)) 38 | new_image.show() 39 | 40 | 41 | def update_image_and_anno(all_img_list, all_annos, idxs, output_size, scale_range, filter_scale=0.): 42 | output_img = np.zeros([output_size[0], output_size[1], 3], dtype=np.uint8) 43 | scale_x = scale_range[0] + random.random() * (scale_range[1] - scale_range[0]) 44 | scale_y = scale_range[0] + random.random() * (scale_range[1] - scale_range[0]) 45 | divid_point_x = int(scale_x * output_size[1]) 46 | divid_point_y = int(scale_y * output_size[0]) 47 | 48 | new_anno = [] 49 | for i, idx in enumerate(idxs): 50 | path = all_img_list[idx] 51 | img_annos = all_annos[idx] 52 | 53 | img = cv2.imread(path) 54 | if i == 0: # top-left 55 | img = cv2.resize(img, (divid_point_x, divid_point_y)) 56 | output_img[:divid_point_y, :divid_point_x, :] = img 57 | for bbox in img_annos: 58 | xmin = bbox[1] * scale_x 59 | ymin = bbox[2] * scale_y 60 | xmax = bbox[3] * scale_x 61 | ymax = bbox[4] * scale_y 62 | new_anno.append([bbox[0], xmin, ymin, xmax, ymax]) 63 | 64 | elif i == 1: # top-right 65 | img = cv2.resize(img, (output_size[1] - divid_point_x, divid_point_y)) 66 | output_img[:divid_point_y, divid_point_x:output_size[1], :] = img 67 | for bbox in img_annos: 68 | xmin = scale_x + bbox[1] * (1 - scale_x) 69 | ymin = bbox[2] * scale_y 70 | xmax = scale_x + bbox[3] * (1 - scale_x) 71 | ymax = bbox[4] * scale_y 72 | new_anno.append([bbox[0], xmin, ymin, xmax, ymax]) 73 | elif i == 2: # bottom-left 74 | img = cv2.resize(img, (divid_point_x, output_size[0] - divid_point_y)) 75 | output_img[divid_point_y:output_size[0], :divid_point_x, :] = img 76 | for bbox in img_annos: 77 | xmin = bbox[1] * scale_x 78 | ymin = scale_y + bbox[2] * (1 - scale_y) 79 | xmax = bbox[3] * scale_x 80 | ymax = scale_y + bbox[4] * (1 - scale_y) 81 | new_anno.append([bbox[0], xmin, ymin, xmax, ymax]) 82 | else: # bottom-right 83 | img = cv2.resize(img, (output_size[1] - divid_point_x, output_size[0] - divid_point_y)) 84 | output_img[divid_point_y:output_size[0], divid_point_x:output_size[1], :] = img 85 | for bbox in img_annos: 86 | xmin = scale_x + bbox[1] * (1 - scale_x) 87 | ymin = scale_y + bbox[2] * (1 - scale_y) 88 | xmax = scale_x + bbox[3] * (1 - scale_x) 89 | ymax = scale_y + bbox[4] * (1 - scale_y) 90 | new_anno.append([bbox[0], xmin, ymin, xmax, ymax]) 91 | 92 | if 0 < filter_scale: 93 | new_anno = [anno for anno in new_anno if 94 | filter_scale < (anno[3] - anno[1]) and filter_scale < (anno[4] - anno[2])] 95 | 96 | return output_img, new_anno 97 | 98 | 99 | def get_dataset(anno_dir, img_dir): 100 | class_id = category_name.index('person') 101 | 102 | img_paths = [] 103 | annos = [] 104 | for anno_file in glob.glob(os.path.join(anno_dir, '*.txt')): 105 | anno_id = anno_file.split('/')[-1].split('.')[0] 106 | 107 | with open(anno_file, 'r') as f: 108 | num_of_objs = int(f.readline()) 109 | 110 | img_path = os.path.join(img_dir, f'{anno_id}.jpg') 111 | img = cv2.imread(img_path) 112 | img_height, img_width, _ = img.shape 113 | del img 114 | 115 | boxes = [] 116 | for _ in range(num_of_objs): 117 | obj = f.readline().rstrip().split(' ') 118 | obj = [int(elm) for elm in obj] 119 | if 3 < obj[0]: 120 | continue 121 | 122 | xmin = max(obj[1], 0) / img_width 123 | ymin = max(obj[2], 0) / img_height 124 | xmax = min(obj[3], img_width) / img_width 125 | ymax = min(obj[4], img_height) / img_height 126 | 127 | boxes.append([class_id, xmin, ymin, xmax, ymax]) 128 | 129 | if not boxes: 130 | continue 131 | 132 | img_paths.append(img_path) 133 | annos.append(boxes) 134 | return img_paths, annos 135 | 136 | 137 | if __name__ == '__main__': 138 | main() 139 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | opencv-python>=4.0.0.0 2 | Pillow --------------------------------------------------------------------------------