├── README.md ├── data └── tfrecord │ ├── ReadMe │ ├── sample_images_list.txt │ ├── test.txt │ ├── train.txt │ └── val.txt ├── output ├── 1.jpg ├── 2.jpg ├── 2007_000027.jpg ├── 2007_000121.jpg ├── 2007_000243.jpg ├── 2007_000346.jpg ├── 2007_000364.jpg ├── 2007_000452.jpg ├── 2007_000464.jpg ├── 2007_000529.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── UNET.png ├── model1.png ├── model2.png ├── test.jpg ├── u=3476430323,4263663876&fm=11&gp=0.jpg ├── u=3893090294,1830313637&fm=11&gp=0.jpg └── w475_h331_9a5169d0369e4e1496d1cdfabb1ded85.jpg ├── picture ├── 1.jpg ├── 2.jpg ├── 2007_000027.jpg ├── 2007_000121.jpg ├── 2007_000243.jpg ├── 2007_000346.jpg ├── 2007_000364.jpg ├── 2007_000452.jpg ├── 2007_000464.jpg ├── 2007_000529.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── test.jpg ├── u=3476430323,4263663876&fm=11&gp=0.jpg ├── u=3893090294,1830313637&fm=11&gp=0.jpg └── w475_h331_9a5169d0369e4e1496d1cdfabb1ded85.jpg ├── test.py ├── tfrecord.py ├── train.py └── utils ├── __init__.py ├── __pycache__ ├── __init__.cpython-35.pyc ├── __init__.cpython-36.pyc ├── config.cpython-35.pyc ├── config.cpython-36.pyc ├── dataset_util.cpython-35.pyc ├── deeplab1_model.cpython-35.pyc ├── deeplab_model.cpython-35.pyc ├── deeplab_model.cpython-36.pyc ├── deeplab_model1.cpython-35.pyc ├── model.cpython-35.pyc ├── preprocessing.cpython-35.pyc └── preprocessing.cpython-36.pyc ├── config.py ├── dataset_util.py ├── deeplab_model.py └── preprocessing.py /README.md: -------------------------------------------------------------------------------- 1 | # tensorflow-deeplab_v3_plus 2 | 参考[rishizek](https://github.com/rishizek/tensorflow-deeplab-v3-plus)的代码进行中文注释,并按照自己风格重新编写代码,对ASPP加入里BN层,支持摄像头。
3 | ## deeplab_v3_plus简介 4 | 图像分割是主要功能是将输入图片的每个像素都分好类别,也相当于分类过程。举例来说就是将大小为[h,w,c]的图像输出成[h,w,1],每个像素值代表一个类别。
5 | deeplab_v3+可以参考论文[Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation](https://arxiv.org/pdf/1802.02611.pdf)。它的结构图如下:
6 | ![](https://github.com/LeslieZhoa/tensorflow-deeplab_v3_plus/blob/master/output/model1.png)
7 | ![](https://github.com/LeslieZhoa/tensorflow-deeplab_v3_plus/blob/master/output/model2.png)
8 | 下面对模型进行简要分析
9 | 该模型属于encoder-decoder模型,encoder-decoder常用于自然语言处理中,在图像分割中[U-net](https://arxiv.org/pdf/1505.04597.pdf)也是十分典型的encoder-decoder模型,大体结构如下:
10 | ![](https://github.com/LeslieZhoa/tensorflow-deeplab_v3_plus/blob/master/output/UNET.png)
11 | 就是将图片通过卷积尺寸变小再通过上采样将尺寸还原。

12 | deeplab_v3+是将encoder-decoder和ASPP相结合,encoder-decoder会获取更多边界信息,ASPP可获取更多特征信息。encoder网络使用resnet101或 Xception,本代码中使用的是resnet101。

13 | 采用预训练的resnet的某一节点A来获取图像信息,再加入到ASPP中。ASPP就是不同膨胀率的空洞卷积和全局池化上采样后的输出concat在一起,作为encoder输出部分。

14 | 空洞卷积可以理解为一个大卷积中间权重值都为0,举例说明,一个3x3的卷积,如果膨胀率是1就是正常卷积,如果膨胀率是2,就是空洞卷积,相当于把3x3的卷积每个值的右方和下方加一行或列都置0。变换之后的空洞矩阵大小变为6x6。空洞矩阵论文中说可以提取更密集的特征,捕获多尺度信息,相比于卷积和池化会减少信息丢失。全局池化就是将输入[h,w,c]池化成[1,1,c]。

15 | decoder部分选取resnet中A节点之前的B节点,再将encoder的输出上采样成B的大小然后concat,做一些卷积和上采样就得到最终输出。

16 | 由于可以看成分类问题,该模型的损失函数也是交叉熵函数。模型具体实现可以参考代码
17 | ## 模型训练 18 | ### 环境要求 19 | ubuntu=16.04
20 | tensorflow=1.4.1
21 | opencv=3.4.1
22 | windows下可以进行测试
23 | ### 下载数据集 24 | 将[VOC](http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar)解压到data目录下,下载DrSleep提供的[SegmentationClassAug文件](https://www.dropbox.com/s/oeu149j8qtbs1x0/SegmentationClassAug.zip?dl=0)解压,如果访问不了可以尝试[这个网址](https://www.jianguoyun.com/p/DQVKi9QQv7mYBxjfsIwB)里面有_MACOSX和SegmentationClassAug两个文件夹,将里面的SegmentationClassAug放置到./data//VOCdevkit/VOC2012/下,里面的图片是shape为[h,w,1]每一个像素值都对应类别的label。

25 | 将[restnet预训练数据](https://www.jianguoyun.com/p/DZeHNHwQv7mYBxiBsIwB)解压放置在该模型的根目录下。

26 | 如果需要模型预训练数据可以将我训练的[权重数据](https://share.weiyun.com/5lGifzi)解压,如果下载过慢可以尝试[这个网址](https://www.jianguoyun.com/p/DYz_5HkQ9_yeBxilsYwB),将里面的ckpt等文件放置到./model下。

27 | ### 代码介绍 28 | data放置VOC数据和数据处理生成的record文件和分化数据的txt文件

29 | model放置训练生成的模型和graph

30 | output放置测试图片生成的分割图像

31 | picture放置测试用例,我的来源于百度图片

32 | utils包含配置文件config.py,数据处理文件dataset_util.py,preprocessing.py和模型文件deeplab_model.py

33 | test.py是测试文件支持摄像头

34 | tfrecord.py是将处理完的数据生成record文件

35 | train.py是训练文件
36 | ### 运行 37 | 手动配置config.py的信息或选择默认

38 | 若要训练:
39 | 运行python tfrecord.py生成record文件
40 | 运行python train.py训练。 对于计算机gpu选择需修改[这里代码](https://github.com/LeslieZhoa/tensorflow-deeplab_v3_plus/blob/master/train.py#L38)

41 | 若要测试:
42 | 运行python test.py

43 | ## 一些疑问 44 | 我的电脑配置是1080Ti但总是运行运行就溢出,我尝试用tf.contrib.distribute.mirroredstrategy多gpu并行,但tensorflow版本要1.8,当我更新完,发现input_fn要是data格式,我失败了。
45 | 如果有并行gpu的建议或者代码的指正请给我留言
46 | ## 结果展示 47 | ![](https://github.com/LeslieZhoa/tensorflow-deeplab_v3_plus/blob/master/output/2007_000346.jpg) 48 | ![](https://github.com/LeslieZhoa/tensorflow-deeplab_v3_plus/blob/master/output/2007_000464.jpg) 49 | ![](https://github.com/LeslieZhoa/tensorflow-deeplab_v3_plus/blob/master/output/2007_000243.jpg) 50 | 51 | -------------------------------------------------------------------------------- /data/tfrecord/ReadMe: -------------------------------------------------------------------------------- 1 | 放置record数据 2 | 3 | -------------------------------------------------------------------------------- /data/tfrecord/sample_images_list.txt: -------------------------------------------------------------------------------- 1 | 2007_000033.jpg 2 | 2007_000042.jpg 3 | 2007_000061.jpg 4 | 2007_000123.jpg 5 | 2007_000129.jpg 6 | 2007_000175.jpg 7 | 2007_000187.jpg 8 | 2007_000323.jpg -------------------------------------------------------------------------------- /data/tfrecord/test.txt: -------------------------------------------------------------------------------- 1 | 2008_000006 2 | 2008_000011 3 | 2008_000012 4 | 2008_000018 5 | 2008_000024 6 | 2008_000030 7 | 2008_000031 8 | 2008_000046 9 | 2008_000047 10 | 2008_000048 11 | 2008_000057 12 | 2008_000058 13 | 2008_000068 14 | 2008_000072 15 | 2008_000079 16 | 2008_000081 17 | 2008_000083 18 | 2008_000088 19 | 2008_000094 20 | 2008_000101 21 | 2008_000104 22 | 2008_000106 23 | 2008_000108 24 | 2008_000110 25 | 2008_000111 26 | 2008_000126 27 | 2008_000127 28 | 2008_000129 29 | 2008_000130 30 | 2008_000135 31 | 2008_000150 32 | 2008_000152 33 | 2008_000156 34 | 2008_000159 35 | 2008_000160 36 | 2008_000161 37 | 2008_000166 38 | 2008_000167 39 | 2008_000168 40 | 2008_000169 41 | 2008_000171 42 | 2008_000175 43 | 2008_000178 44 | 2008_000186 45 | 2008_000198 46 | 2008_000206 47 | 2008_000208 48 | 2008_000209 49 | 2008_000211 50 | 2008_000220 51 | 2008_000224 52 | 2008_000230 53 | 2008_000240 54 | 2008_000248 55 | 2008_000249 56 | 2008_000250 57 | 2008_000256 58 | 2008_000279 59 | 2008_000282 60 | 2008_000285 61 | 2008_000286 62 | 2008_000296 63 | 2008_000300 64 | 2008_000322 65 | 2008_000324 66 | 2008_000337 67 | 2008_000366 68 | 2008_000369 69 | 2008_000377 70 | 2008_000384 71 | 2008_000390 72 | 2008_000404 73 | 2008_000411 74 | 2008_000434 75 | 2008_000440 76 | 2008_000460 77 | 2008_000467 78 | 2008_000478 79 | 2008_000485 80 | 2008_000487 81 | 2008_000490 82 | 2008_000503 83 | 2008_000504 84 | 2008_000507 85 | 2008_000513 86 | 2008_000523 87 | 2008_000529 88 | 2008_000556 89 | 2008_000565 90 | 2008_000580 91 | 2008_000590 92 | 2008_000596 93 | 2008_000597 94 | 2008_000600 95 | 2008_000603 96 | 2008_000604 97 | 2008_000612 98 | 2008_000617 99 | 2008_000621 100 | 2008_000627 101 | 2008_000633 102 | 2008_000643 103 | 2008_000644 104 | 2008_000649 105 | 2008_000651 106 | 2008_000664 107 | 2008_000665 108 | 2008_000680 109 | 2008_000681 110 | 2008_000684 111 | 2008_000685 112 | 2008_000688 113 | 2008_000693 114 | 2008_000698 115 | 2008_000707 116 | 2008_000709 117 | 2008_000712 118 | 2008_000747 119 | 2008_000751 120 | 2008_000754 121 | 2008_000762 122 | 2008_000767 123 | 2008_000768 124 | 2008_000773 125 | 2008_000774 126 | 2008_000779 127 | 2008_000797 128 | 2008_000813 129 | 2008_000816 130 | 2008_000846 131 | 2008_000866 132 | 2008_000871 133 | 2008_000872 134 | 2008_000891 135 | 2008_000892 136 | 2008_000894 137 | 2008_000896 138 | 2008_000898 139 | 2008_000909 140 | 2008_000913 141 | 2008_000920 142 | 2008_000933 143 | 2008_000935 144 | 2008_000937 145 | 2008_000938 146 | 2008_000954 147 | 2008_000958 148 | 2008_000963 149 | 2008_000967 150 | 2008_000974 151 | 2008_000986 152 | 2008_000994 153 | 2008_000995 154 | 2008_001008 155 | 2008_001010 156 | 2008_001014 157 | 2008_001016 158 | 2008_001025 159 | 2008_001029 160 | 2008_001037 161 | 2008_001059 162 | 2008_001061 163 | 2008_001072 164 | 2008_001124 165 | 2008_001126 166 | 2008_001131 167 | 2008_001138 168 | 2008_001144 169 | 2008_001151 170 | 2008_001156 171 | 2008_001179 172 | 2008_001181 173 | 2008_001184 174 | 2008_001186 175 | 2008_001197 176 | 2008_001207 177 | 2008_001212 178 | 2008_001233 179 | 2008_001234 180 | 2008_001258 181 | 2008_001268 182 | 2008_001279 183 | 2008_001281 184 | 2008_001288 185 | 2008_001291 186 | 2008_001298 187 | 2008_001309 188 | 2008_001315 189 | 2008_001316 190 | 2008_001319 191 | 2008_001327 192 | 2008_001328 193 | 2008_001332 194 | 2008_001341 195 | 2008_001347 196 | 2008_001355 197 | 2008_001378 198 | 2008_001386 199 | 2008_001400 200 | 2008_001409 201 | 2008_001411 202 | 2008_001416 203 | 2008_001418 204 | 2008_001435 205 | 2008_001459 206 | 2008_001469 207 | 2008_001474 208 | 2008_001477 209 | 2008_001483 210 | 2008_001484 211 | 2008_001485 212 | 2008_001496 213 | 2008_001507 214 | 2008_001511 215 | 2008_001519 216 | 2008_001557 217 | 2008_001567 218 | 2008_001570 219 | 2008_001571 220 | 2008_001572 221 | 2008_001579 222 | 2008_001587 223 | 2008_001608 224 | 2008_001611 225 | 2008_001614 226 | 2008_001621 227 | 2008_001639 228 | 2008_001658 229 | 2008_001678 230 | 2008_001700 231 | 2008_001713 232 | 2008_001720 233 | 2008_001755 234 | 2008_001779 235 | 2008_001785 236 | 2008_001793 237 | 2008_001794 238 | 2008_001803 239 | 2008_001818 240 | 2008_001848 241 | 2008_001855 242 | 2008_001857 243 | 2008_001861 244 | 2008_001875 245 | 2008_001878 246 | 2008_001886 247 | 2008_001897 248 | 2008_001916 249 | 2008_001925 250 | 2008_001949 251 | 2008_001953 252 | 2008_001972 253 | 2008_001999 254 | 2008_002027 255 | 2008_002040 256 | 2008_002057 257 | 2008_002070 258 | 2008_002075 259 | 2008_002095 260 | 2008_002104 261 | 2008_002105 262 | 2008_002106 263 | 2008_002136 264 | 2008_002137 265 | 2008_002147 266 | 2008_002149 267 | 2008_002163 268 | 2008_002173 269 | 2008_002174 270 | 2008_002184 271 | 2008_002186 272 | 2008_002188 273 | 2008_002190 274 | 2008_002203 275 | 2008_002211 276 | 2008_002217 277 | 2008_002228 278 | 2008_002233 279 | 2008_002246 280 | 2008_002257 281 | 2008_002261 282 | 2008_002285 283 | 2008_002287 284 | 2008_002295 285 | 2008_002303 286 | 2008_002306 287 | 2008_002309 288 | 2008_002310 289 | 2008_002318 290 | 2008_002320 291 | 2008_002332 292 | 2008_002337 293 | 2008_002345 294 | 2008_002348 295 | 2008_002352 296 | 2008_002360 297 | 2008_002381 298 | 2008_002387 299 | 2008_002388 300 | 2008_002393 301 | 2008_002406 302 | 2008_002440 303 | 2008_002455 304 | 2008_002460 305 | 2008_002462 306 | 2008_002480 307 | 2008_002518 308 | 2008_002525 309 | 2008_002535 310 | 2008_002544 311 | 2008_002553 312 | 2008_002569 313 | 2008_002572 314 | 2008_002587 315 | 2008_002635 316 | 2008_002655 317 | 2008_002695 318 | 2008_002702 319 | 2008_002706 320 | 2008_002707 321 | 2008_002722 322 | 2008_002745 323 | 2008_002757 324 | 2008_002779 325 | 2008_002805 326 | 2008_002871 327 | 2008_002895 328 | 2008_002905 329 | 2008_002923 330 | 2008_002927 331 | 2008_002939 332 | 2008_002941 333 | 2008_002962 334 | 2008_002975 335 | 2008_003000 336 | 2008_003031 337 | 2008_003038 338 | 2008_003042 339 | 2008_003069 340 | 2008_003070 341 | 2008_003115 342 | 2008_003116 343 | 2008_003130 344 | 2008_003137 345 | 2008_003138 346 | 2008_003139 347 | 2008_003165 348 | 2008_003171 349 | 2008_003176 350 | 2008_003192 351 | 2008_003194 352 | 2008_003195 353 | 2008_003198 354 | 2008_003227 355 | 2008_003247 356 | 2008_003262 357 | 2008_003298 358 | 2008_003299 359 | 2008_003307 360 | 2008_003337 361 | 2008_003353 362 | 2008_003355 363 | 2008_003363 364 | 2008_003383 365 | 2008_003389 366 | 2008_003392 367 | 2008_003399 368 | 2008_003436 369 | 2008_003457 370 | 2008_003465 371 | 2008_003481 372 | 2008_003539 373 | 2008_003548 374 | 2008_003550 375 | 2008_003567 376 | 2008_003568 377 | 2008_003606 378 | 2008_003615 379 | 2008_003654 380 | 2008_003670 381 | 2008_003700 382 | 2008_003705 383 | 2008_003727 384 | 2008_003731 385 | 2008_003734 386 | 2008_003760 387 | 2008_003804 388 | 2008_003807 389 | 2008_003810 390 | 2008_003822 391 | 2008_003833 392 | 2008_003877 393 | 2008_003879 394 | 2008_003895 395 | 2008_003901 396 | 2008_003903 397 | 2008_003911 398 | 2008_003919 399 | 2008_003927 400 | 2008_003937 401 | 2008_003946 402 | 2008_003950 403 | 2008_003955 404 | 2008_003981 405 | 2008_003991 406 | 2008_004009 407 | 2008_004039 408 | 2008_004052 409 | 2008_004063 410 | 2008_004070 411 | 2008_004078 412 | 2008_004104 413 | 2008_004139 414 | 2008_004177 415 | 2008_004181 416 | 2008_004200 417 | 2008_004219 418 | 2008_004236 419 | 2008_004250 420 | 2008_004266 421 | 2008_004299 422 | 2008_004320 423 | 2008_004334 424 | 2008_004343 425 | 2008_004349 426 | 2008_004366 427 | 2008_004386 428 | 2008_004401 429 | 2008_004423 430 | 2008_004448 431 | 2008_004481 432 | 2008_004516 433 | 2008_004536 434 | 2008_004582 435 | 2008_004609 436 | 2008_004638 437 | 2008_004642 438 | 2008_004644 439 | 2008_004669 440 | 2008_004673 441 | 2008_004691 442 | 2008_004693 443 | 2008_004709 444 | 2008_004715 445 | 2008_004757 446 | 2008_004775 447 | 2008_004782 448 | 2008_004785 449 | 2008_004798 450 | 2008_004848 451 | 2008_004861 452 | 2008_004870 453 | 2008_004877 454 | 2008_004884 455 | 2008_004891 456 | 2008_004901 457 | 2008_004919 458 | 2008_005058 459 | 2008_005069 460 | 2008_005086 461 | 2008_005087 462 | 2008_005112 463 | 2008_005113 464 | 2008_005118 465 | 2008_005128 466 | 2008_005129 467 | 2008_005153 468 | 2008_005161 469 | 2008_005162 470 | 2008_005165 471 | 2008_005187 472 | 2008_005227 473 | 2008_005308 474 | 2008_005318 475 | 2008_005320 476 | 2008_005351 477 | 2008_005372 478 | 2008_005383 479 | 2008_005391 480 | 2008_005407 481 | 2008_005420 482 | 2008_005440 483 | 2008_005487 484 | 2008_005493 485 | 2008_005520 486 | 2008_005551 487 | 2008_005556 488 | 2008_005576 489 | 2008_005578 490 | 2008_005594 491 | 2008_005619 492 | 2008_005629 493 | 2008_005644 494 | 2008_005645 495 | 2008_005651 496 | 2008_005661 497 | 2008_005662 498 | 2008_005667 499 | 2008_005694 500 | 2008_005697 501 | 2008_005709 502 | 2008_005710 503 | 2008_005733 504 | 2008_005749 505 | 2008_005753 506 | 2008_005771 507 | 2008_005781 508 | 2008_005793 509 | 2008_005802 510 | 2008_005833 511 | 2008_005844 512 | 2008_005908 513 | 2008_005931 514 | 2008_005952 515 | 2008_006016 516 | 2008_006030 517 | 2008_006033 518 | 2008_006054 519 | 2008_006073 520 | 2008_006091 521 | 2008_006142 522 | 2008_006150 523 | 2008_006206 524 | 2008_006217 525 | 2008_006264 526 | 2008_006283 527 | 2008_006308 528 | 2008_006313 529 | 2008_006333 530 | 2008_006343 531 | 2008_006381 532 | 2008_006391 533 | 2008_006423 534 | 2008_006428 535 | 2008_006440 536 | 2008_006444 537 | 2008_006473 538 | 2008_006505 539 | 2008_006531 540 | 2008_006560 541 | 2008_006571 542 | 2008_006582 543 | 2008_006594 544 | 2008_006601 545 | 2008_006633 546 | 2008_006653 547 | 2008_006678 548 | 2008_006755 549 | 2008_006772 550 | 2008_006788 551 | 2008_006799 552 | 2008_006809 553 | 2008_006838 554 | 2008_006845 555 | 2008_006852 556 | 2008_006894 557 | 2008_006905 558 | 2008_006947 559 | 2008_006983 560 | 2008_007049 561 | 2008_007065 562 | 2008_007068 563 | 2008_007111 564 | 2008_007148 565 | 2008_007159 566 | 2008_007193 567 | 2008_007228 568 | 2008_007235 569 | 2008_007249 570 | 2008_007255 571 | 2008_007268 572 | 2008_007275 573 | 2008_007292 574 | 2008_007299 575 | 2008_007306 576 | 2008_007316 577 | 2008_007400 578 | 2008_007401 579 | 2008_007419 580 | 2008_007437 581 | 2008_007483 582 | 2008_007487 583 | 2008_007520 584 | 2008_007551 585 | 2008_007603 586 | 2008_007616 587 | 2008_007654 588 | 2008_007663 589 | 2008_007708 590 | 2008_007795 591 | 2008_007801 592 | 2008_007859 593 | 2008_007903 594 | 2008_007920 595 | 2008_007926 596 | 2008_008014 597 | 2008_008017 598 | 2008_008060 599 | 2008_008077 600 | 2008_008107 601 | 2008_008108 602 | 2008_008119 603 | 2008_008126 604 | 2008_008133 605 | 2008_008144 606 | 2008_008216 607 | 2008_008244 608 | 2008_008248 609 | 2008_008250 610 | 2008_008260 611 | 2008_008277 612 | 2008_008280 613 | 2008_008290 614 | 2008_008304 615 | 2008_008340 616 | 2008_008371 617 | 2008_008390 618 | 2008_008397 619 | 2008_008409 620 | 2008_008412 621 | 2008_008419 622 | 2008_008454 623 | 2008_008491 624 | 2008_008498 625 | 2008_008565 626 | 2008_008599 627 | 2008_008603 628 | 2008_008631 629 | 2008_008634 630 | 2008_008640 631 | 2008_008646 632 | 2008_008660 633 | 2008_008663 634 | 2008_008664 635 | 2008_008709 636 | 2008_008720 637 | 2008_008747 638 | 2008_008768 639 | 2009_000004 640 | 2009_000019 641 | 2009_000024 642 | 2009_000025 643 | 2009_000053 644 | 2009_000076 645 | 2009_000107 646 | 2009_000110 647 | 2009_000115 648 | 2009_000117 649 | 2009_000175 650 | 2009_000220 651 | 2009_000259 652 | 2009_000275 653 | 2009_000314 654 | 2009_000368 655 | 2009_000373 656 | 2009_000384 657 | 2009_000388 658 | 2009_000423 659 | 2009_000433 660 | 2009_000434 661 | 2009_000458 662 | 2009_000475 663 | 2009_000481 664 | 2009_000495 665 | 2009_000514 666 | 2009_000555 667 | 2009_000556 668 | 2009_000561 669 | 2009_000571 670 | 2009_000581 671 | 2009_000605 672 | 2009_000609 673 | 2009_000644 674 | 2009_000654 675 | 2009_000671 676 | 2009_000733 677 | 2009_000740 678 | 2009_000766 679 | 2009_000775 680 | 2009_000776 681 | 2009_000795 682 | 2009_000850 683 | 2009_000881 684 | 2009_000900 685 | 2009_000914 686 | 2009_000941 687 | 2009_000977 688 | 2009_000984 689 | 2009_000986 690 | 2009_001005 691 | 2009_001015 692 | 2009_001058 693 | 2009_001072 694 | 2009_001087 695 | 2009_001092 696 | 2009_001109 697 | 2009_001114 698 | 2009_001115 699 | 2009_001141 700 | 2009_001174 701 | 2009_001175 702 | 2009_001182 703 | 2009_001222 704 | 2009_001228 705 | 2009_001246 706 | 2009_001262 707 | 2009_001274 708 | 2009_001284 709 | 2009_001297 710 | 2009_001331 711 | 2009_001336 712 | 2009_001337 713 | 2009_001379 714 | 2009_001392 715 | 2009_001451 716 | 2009_001485 717 | 2009_001488 718 | 2009_001497 719 | 2009_001504 720 | 2009_001506 721 | 2009_001573 722 | 2009_001576 723 | 2009_001603 724 | 2009_001613 725 | 2009_001652 726 | 2009_001661 727 | 2009_001668 728 | 2009_001680 729 | 2009_001688 730 | 2009_001697 731 | 2009_001729 732 | 2009_001771 733 | 2009_001785 734 | 2009_001793 735 | 2009_001814 736 | 2009_001866 737 | 2009_001872 738 | 2009_001880 739 | 2009_001883 740 | 2009_001891 741 | 2009_001913 742 | 2009_001938 743 | 2009_001946 744 | 2009_001953 745 | 2009_001969 746 | 2009_001978 747 | 2009_001995 748 | 2009_002007 749 | 2009_002036 750 | 2009_002041 751 | 2009_002049 752 | 2009_002051 753 | 2009_002062 754 | 2009_002063 755 | 2009_002067 756 | 2009_002085 757 | 2009_002092 758 | 2009_002114 759 | 2009_002115 760 | 2009_002142 761 | 2009_002148 762 | 2009_002157 763 | 2009_002181 764 | 2009_002220 765 | 2009_002284 766 | 2009_002287 767 | 2009_002300 768 | 2009_002310 769 | 2009_002315 770 | 2009_002334 771 | 2009_002337 772 | 2009_002354 773 | 2009_002357 774 | 2009_002411 775 | 2009_002426 776 | 2009_002458 777 | 2009_002459 778 | 2009_002461 779 | 2009_002466 780 | 2009_002481 781 | 2009_002483 782 | 2009_002503 783 | 2009_002581 784 | 2009_002583 785 | 2009_002589 786 | 2009_002600 787 | 2009_002601 788 | 2009_002602 789 | 2009_002641 790 | 2009_002646 791 | 2009_002656 792 | 2009_002666 793 | 2009_002720 794 | 2009_002767 795 | 2009_002768 796 | 2009_002794 797 | 2009_002821 798 | 2009_002825 799 | 2009_002839 800 | 2009_002840 801 | 2009_002859 802 | 2009_002860 803 | 2009_002881 804 | 2009_002889 805 | 2009_002892 806 | 2009_002895 807 | 2009_002896 808 | 2009_002900 809 | 2009_002924 810 | 2009_002966 811 | 2009_002973 812 | 2009_002981 813 | 2009_003004 814 | 2009_003021 815 | 2009_003028 816 | 2009_003037 817 | 2009_003038 818 | 2009_003055 819 | 2009_003085 820 | 2009_003100 821 | 2009_003106 822 | 2009_003117 823 | 2009_003139 824 | 2009_003170 825 | 2009_003179 826 | 2009_003184 827 | 2009_003186 828 | 2009_003190 829 | 2009_003221 830 | 2009_003236 831 | 2009_003242 832 | 2009_003244 833 | 2009_003260 834 | 2009_003264 835 | 2009_003274 836 | 2009_003283 837 | 2009_003296 838 | 2009_003332 839 | 2009_003341 840 | 2009_003354 841 | 2009_003370 842 | 2009_003371 843 | 2009_003374 844 | 2009_003391 845 | 2009_003393 846 | 2009_003404 847 | 2009_003405 848 | 2009_003414 849 | 2009_003428 850 | 2009_003470 851 | 2009_003474 852 | 2009_003532 853 | 2009_003536 854 | 2009_003578 855 | 2009_003580 856 | 2009_003620 857 | 2009_003621 858 | 2009_003680 859 | 2009_003699 860 | 2009_003727 861 | 2009_003737 862 | 2009_003780 863 | 2009_003811 864 | 2009_003824 865 | 2009_003831 866 | 2009_003844 867 | 2009_003850 868 | 2009_003851 869 | 2009_003864 870 | 2009_003868 871 | 2009_003869 872 | 2009_003893 873 | 2009_003909 874 | 2009_003924 875 | 2009_003925 876 | 2009_003960 877 | 2009_003979 878 | 2009_003990 879 | 2009_003997 880 | 2009_004006 881 | 2009_004010 882 | 2009_004066 883 | 2009_004077 884 | 2009_004081 885 | 2009_004097 886 | 2009_004098 887 | 2009_004136 888 | 2009_004216 889 | 2009_004220 890 | 2009_004266 891 | 2009_004269 892 | 2009_004286 893 | 2009_004296 894 | 2009_004321 895 | 2009_004342 896 | 2009_004343 897 | 2009_004344 898 | 2009_004385 899 | 2009_004408 900 | 2009_004420 901 | 2009_004441 902 | 2009_004447 903 | 2009_004461 904 | 2009_004467 905 | 2009_004485 906 | 2009_004488 907 | 2009_004516 908 | 2009_004521 909 | 2009_004544 910 | 2009_004596 911 | 2009_004613 912 | 2009_004615 913 | 2009_004618 914 | 2009_004621 915 | 2009_004646 916 | 2009_004659 917 | 2009_004663 918 | 2009_004666 919 | 2009_004691 920 | 2009_004715 921 | 2009_004726 922 | 2009_004753 923 | 2009_004776 924 | 2009_004811 925 | 2009_004814 926 | 2009_004818 927 | 2009_004835 928 | 2009_004863 929 | 2009_004894 930 | 2009_004909 931 | 2009_004928 932 | 2009_004937 933 | 2009_004954 934 | 2009_004966 935 | 2009_004970 936 | 2009_004976 937 | 2009_005004 938 | 2009_005011 939 | 2009_005053 940 | 2009_005072 941 | 2009_005115 942 | 2009_005146 943 | 2009_005151 944 | 2009_005164 945 | 2009_005179 946 | 2009_005224 947 | 2009_005243 948 | 2009_005249 949 | 2009_005252 950 | 2009_005254 951 | 2009_005258 952 | 2009_005264 953 | 2009_005266 954 | 2009_005276 955 | 2009_005290 956 | 2009_005295 957 | 2010_000004 958 | 2010_000005 959 | 2010_000006 960 | 2010_000032 961 | 2010_000062 962 | 2010_000093 963 | 2010_000094 964 | 2010_000161 965 | 2010_000176 966 | 2010_000223 967 | 2010_000226 968 | 2010_000236 969 | 2010_000239 970 | 2010_000287 971 | 2010_000300 972 | 2010_000301 973 | 2010_000328 974 | 2010_000378 975 | 2010_000405 976 | 2010_000407 977 | 2010_000472 978 | 2010_000479 979 | 2010_000491 980 | 2010_000533 981 | 2010_000535 982 | 2010_000542 983 | 2010_000554 984 | 2010_000580 985 | 2010_000594 986 | 2010_000596 987 | 2010_000599 988 | 2010_000606 989 | 2010_000615 990 | 2010_000654 991 | 2010_000659 992 | 2010_000693 993 | 2010_000698 994 | 2010_000730 995 | 2010_000734 996 | 2010_000741 997 | 2010_000755 998 | 2010_000768 999 | 2010_000794 1000 | 2010_000813 1001 | 2010_000817 1002 | 2010_000834 1003 | 2010_000839 1004 | 2010_000848 1005 | 2010_000881 1006 | 2010_000888 1007 | 2010_000900 1008 | 2010_000903 1009 | 2010_000924 1010 | 2010_000946 1011 | 2010_000953 1012 | 2010_000957 1013 | 2010_000967 1014 | 2010_000992 1015 | 2010_000998 1016 | 2010_001053 1017 | 2010_001067 1018 | 2010_001114 1019 | 2010_001132 1020 | 2010_001138 1021 | 2010_001169 1022 | 2010_001171 1023 | 2010_001228 1024 | 2010_001260 1025 | 2010_001268 1026 | 2010_001280 1027 | 2010_001298 1028 | 2010_001302 1029 | 2010_001308 1030 | 2010_001324 1031 | 2010_001332 1032 | 2010_001335 1033 | 2010_001345 1034 | 2010_001346 1035 | 2010_001349 1036 | 2010_001373 1037 | 2010_001381 1038 | 2010_001392 1039 | 2010_001396 1040 | 2010_001420 1041 | 2010_001500 1042 | 2010_001506 1043 | 2010_001521 1044 | 2010_001532 1045 | 2010_001558 1046 | 2010_001598 1047 | 2010_001611 1048 | 2010_001631 1049 | 2010_001639 1050 | 2010_001651 1051 | 2010_001663 1052 | 2010_001664 1053 | 2010_001728 1054 | 2010_001778 1055 | 2010_001861 1056 | 2010_001874 1057 | 2010_001900 1058 | 2010_001905 1059 | 2010_001969 1060 | 2010_002008 1061 | 2010_002014 1062 | 2010_002049 1063 | 2010_002052 1064 | 2010_002091 1065 | 2010_002115 1066 | 2010_002119 1067 | 2010_002134 1068 | 2010_002156 1069 | 2010_002160 1070 | 2010_002186 1071 | 2010_002210 1072 | 2010_002241 1073 | 2010_002252 1074 | 2010_002258 1075 | 2010_002262 1076 | 2010_002273 1077 | 2010_002290 1078 | 2010_002292 1079 | 2010_002347 1080 | 2010_002358 1081 | 2010_002360 1082 | 2010_002367 1083 | 2010_002416 1084 | 2010_002451 1085 | 2010_002481 1086 | 2010_002490 1087 | 2010_002495 1088 | 2010_002588 1089 | 2010_002607 1090 | 2010_002609 1091 | 2010_002610 1092 | 2010_002641 1093 | 2010_002685 1094 | 2010_002699 1095 | 2010_002719 1096 | 2010_002735 1097 | 2010_002751 1098 | 2010_002804 1099 | 2010_002835 1100 | 2010_002852 1101 | 2010_002885 1102 | 2010_002889 1103 | 2010_002904 1104 | 2010_002908 1105 | 2010_002916 1106 | 2010_002974 1107 | 2010_002977 1108 | 2010_003005 1109 | 2010_003021 1110 | 2010_003030 1111 | 2010_003038 1112 | 2010_003046 1113 | 2010_003052 1114 | 2010_003089 1115 | 2010_003110 1116 | 2010_003118 1117 | 2010_003171 1118 | 2010_003217 1119 | 2010_003221 1120 | 2010_003228 1121 | 2010_003243 1122 | 2010_003271 1123 | 2010_003295 1124 | 2010_003306 1125 | 2010_003324 1126 | 2010_003363 1127 | 2010_003382 1128 | 2010_003388 1129 | 2010_003389 1130 | 2010_003392 1131 | 2010_003430 1132 | 2010_003442 1133 | 2010_003459 1134 | 2010_003485 1135 | 2010_003486 1136 | 2010_003500 1137 | 2010_003523 1138 | 2010_003542 1139 | 2010_003552 1140 | 2010_003570 1141 | 2010_003572 1142 | 2010_003586 1143 | 2010_003615 1144 | 2010_003623 1145 | 2010_003657 1146 | 2010_003666 1147 | 2010_003705 1148 | 2010_003710 1149 | 2010_003720 1150 | 2010_003733 1151 | 2010_003750 1152 | 2010_003767 1153 | 2010_003802 1154 | 2010_003809 1155 | 2010_003830 1156 | 2010_003832 1157 | 2010_003836 1158 | 2010_003838 1159 | 2010_003850 1160 | 2010_003867 1161 | 2010_003882 1162 | 2010_003909 1163 | 2010_003922 1164 | 2010_003923 1165 | 2010_003978 1166 | 2010_003989 1167 | 2010_003990 1168 | 2010_004000 1169 | 2010_004003 1170 | 2010_004068 1171 | 2010_004076 1172 | 2010_004117 1173 | 2010_004136 1174 | 2010_004142 1175 | 2010_004195 1176 | 2010_004200 1177 | 2010_004202 1178 | 2010_004232 1179 | 2010_004261 1180 | 2010_004266 1181 | 2010_004273 1182 | 2010_004305 1183 | 2010_004403 1184 | 2010_004433 1185 | 2010_004434 1186 | 2010_004435 1187 | 2010_004438 1188 | 2010_004442 1189 | 2010_004473 1190 | 2010_004482 1191 | 2010_004487 1192 | 2010_004489 1193 | 2010_004512 1194 | 2010_004525 1195 | 2010_004527 1196 | 2010_004532 1197 | 2010_004566 1198 | 2010_004568 1199 | 2010_004579 1200 | 2010_004611 1201 | 2010_004641 1202 | 2010_004688 1203 | 2010_004699 1204 | 2010_004702 1205 | 2010_004716 1206 | 2010_004754 1207 | 2010_004767 1208 | 2010_004776 1209 | 2010_004811 1210 | 2010_004837 1211 | 2010_004839 1212 | 2010_004845 1213 | 2010_004860 1214 | 2010_004867 1215 | 2010_004881 1216 | 2010_004939 1217 | 2010_005001 1218 | 2010_005047 1219 | 2010_005051 1220 | 2010_005091 1221 | 2010_005095 1222 | 2010_005125 1223 | 2010_005140 1224 | 2010_005177 1225 | 2010_005178 1226 | 2010_005194 1227 | 2010_005197 1228 | 2010_005200 1229 | 2010_005205 1230 | 2010_005212 1231 | 2010_005248 1232 | 2010_005294 1233 | 2010_005298 1234 | 2010_005313 1235 | 2010_005324 1236 | 2010_005328 1237 | 2010_005329 1238 | 2010_005380 1239 | 2010_005404 1240 | 2010_005407 1241 | 2010_005411 1242 | 2010_005423 1243 | 2010_005499 1244 | 2010_005509 1245 | 2010_005510 1246 | 2010_005544 1247 | 2010_005549 1248 | 2010_005590 1249 | 2010_005639 1250 | 2010_005699 1251 | 2010_005704 1252 | 2010_005707 1253 | 2010_005711 1254 | 2010_005726 1255 | 2010_005741 1256 | 2010_005765 1257 | 2010_005790 1258 | 2010_005792 1259 | 2010_005797 1260 | 2010_005812 1261 | 2010_005850 1262 | 2010_005861 1263 | 2010_005869 1264 | 2010_005908 1265 | 2010_005915 1266 | 2010_005946 1267 | 2010_005965 1268 | 2010_006044 1269 | 2010_006047 1270 | 2010_006052 1271 | 2010_006081 1272 | 2011_000001 1273 | 2011_000013 1274 | 2011_000014 1275 | 2011_000020 1276 | 2011_000032 1277 | 2011_000042 1278 | 2011_000063 1279 | 2011_000115 1280 | 2011_000120 1281 | 2011_000240 1282 | 2011_000244 1283 | 2011_000254 1284 | 2011_000261 1285 | 2011_000262 1286 | 2011_000271 1287 | 2011_000274 1288 | 2011_000306 1289 | 2011_000311 1290 | 2011_000316 1291 | 2011_000328 1292 | 2011_000351 1293 | 2011_000352 1294 | 2011_000406 1295 | 2011_000414 1296 | 2011_000448 1297 | 2011_000451 1298 | 2011_000470 1299 | 2011_000473 1300 | 2011_000515 1301 | 2011_000537 1302 | 2011_000576 1303 | 2011_000603 1304 | 2011_000616 1305 | 2011_000636 1306 | 2011_000639 1307 | 2011_000654 1308 | 2011_000660 1309 | 2011_000664 1310 | 2011_000667 1311 | 2011_000670 1312 | 2011_000676 1313 | 2011_000721 1314 | 2011_000723 1315 | 2011_000762 1316 | 2011_000766 1317 | 2011_000786 1318 | 2011_000802 1319 | 2011_000810 1320 | 2011_000821 1321 | 2011_000841 1322 | 2011_000844 1323 | 2011_000846 1324 | 2011_000869 1325 | 2011_000890 1326 | 2011_000915 1327 | 2011_000924 1328 | 2011_000937 1329 | 2011_000939 1330 | 2011_000952 1331 | 2011_000968 1332 | 2011_000974 1333 | 2011_001037 1334 | 2011_001072 1335 | 2011_001085 1336 | 2011_001089 1337 | 2011_001090 1338 | 2011_001099 1339 | 2011_001104 1340 | 2011_001112 1341 | 2011_001120 1342 | 2011_001132 1343 | 2011_001151 1344 | 2011_001194 1345 | 2011_001258 1346 | 2011_001274 1347 | 2011_001314 1348 | 2011_001317 1349 | 2011_001321 1350 | 2011_001379 1351 | 2011_001425 1352 | 2011_001431 1353 | 2011_001443 1354 | 2011_001446 1355 | 2011_001452 1356 | 2011_001454 1357 | 2011_001477 1358 | 2011_001509 1359 | 2011_001512 1360 | 2011_001515 1361 | 2011_001528 1362 | 2011_001554 1363 | 2011_001561 1364 | 2011_001580 1365 | 2011_001587 1366 | 2011_001623 1367 | 2011_001648 1368 | 2011_001651 1369 | 2011_001654 1370 | 2011_001684 1371 | 2011_001696 1372 | 2011_001697 1373 | 2011_001760 1374 | 2011_001761 1375 | 2011_001798 1376 | 2011_001807 1377 | 2011_001851 1378 | 2011_001852 1379 | 2011_001853 1380 | 2011_001888 1381 | 2011_001940 1382 | 2011_002014 1383 | 2011_002028 1384 | 2011_002056 1385 | 2011_002061 1386 | 2011_002068 1387 | 2011_002076 1388 | 2011_002090 1389 | 2011_002095 1390 | 2011_002104 1391 | 2011_002136 1392 | 2011_002138 1393 | 2011_002151 1394 | 2011_002153 1395 | 2011_002155 1396 | 2011_002197 1397 | 2011_002198 1398 | 2011_002243 1399 | 2011_002250 1400 | 2011_002257 1401 | 2011_002262 1402 | 2011_002264 1403 | 2011_002296 1404 | 2011_002314 1405 | 2011_002331 1406 | 2011_002333 1407 | 2011_002411 1408 | 2011_002417 1409 | 2011_002425 1410 | 2011_002437 1411 | 2011_002444 1412 | 2011_002445 1413 | 2011_002449 1414 | 2011_002468 1415 | 2011_002469 1416 | 2011_002473 1417 | 2011_002508 1418 | 2011_002523 1419 | 2011_002534 1420 | 2011_002557 1421 | 2011_002564 1422 | 2011_002572 1423 | 2011_002597 1424 | 2011_002622 1425 | 2011_002632 1426 | 2011_002635 1427 | 2011_002643 1428 | 2011_002653 1429 | 2011_002667 1430 | 2011_002681 1431 | 2011_002707 1432 | 2011_002736 1433 | 2011_002759 1434 | 2011_002783 1435 | 2011_002792 1436 | 2011_002799 1437 | 2011_002824 1438 | 2011_002835 1439 | 2011_002866 1440 | 2011_002876 1441 | 2011_002888 1442 | 2011_002894 1443 | 2011_002903 1444 | 2011_002905 1445 | 2011_002986 1446 | 2011_003045 1447 | 2011_003064 1448 | 2011_003070 1449 | 2011_003083 1450 | 2011_003093 1451 | 2011_003096 1452 | 2011_003102 1453 | 2011_003156 1454 | 2011_003170 1455 | 2011_003178 1456 | 2011_003231 1457 | -------------------------------------------------------------------------------- /data/tfrecord/val.txt: -------------------------------------------------------------------------------- 1 | 2007_000033 2 | 2007_000042 3 | 2007_000061 4 | 2007_000123 5 | 2007_000129 6 | 2007_000175 7 | 2007_000187 8 | 2007_000323 9 | 2007_000332 10 | 2007_000346 11 | 2007_000452 12 | 2007_000464 13 | 2007_000491 14 | 2007_000529 15 | 2007_000559 16 | 2007_000572 17 | 2007_000629 18 | 2007_000636 19 | 2007_000661 20 | 2007_000663 21 | 2007_000676 22 | 2007_000727 23 | 2007_000762 24 | 2007_000783 25 | 2007_000799 26 | 2007_000804 27 | 2007_000830 28 | 2007_000837 29 | 2007_000847 30 | 2007_000862 31 | 2007_000925 32 | 2007_000999 33 | 2007_001154 34 | 2007_001175 35 | 2007_001239 36 | 2007_001284 37 | 2007_001288 38 | 2007_001289 39 | 2007_001299 40 | 2007_001311 41 | 2007_001321 42 | 2007_001377 43 | 2007_001408 44 | 2007_001423 45 | 2007_001430 46 | 2007_001457 47 | 2007_001458 48 | 2007_001526 49 | 2007_001568 50 | 2007_001585 51 | 2007_001586 52 | 2007_001587 53 | 2007_001594 54 | 2007_001630 55 | 2007_001677 56 | 2007_001678 57 | 2007_001717 58 | 2007_001733 59 | 2007_001761 60 | 2007_001763 61 | 2007_001774 62 | 2007_001884 63 | 2007_001955 64 | 2007_002046 65 | 2007_002094 66 | 2007_002119 67 | 2007_002132 68 | 2007_002260 69 | 2007_002266 70 | 2007_002268 71 | 2007_002284 72 | 2007_002376 73 | 2007_002378 74 | 2007_002387 75 | 2007_002400 76 | 2007_002412 77 | 2007_002426 78 | 2007_002427 79 | 2007_002445 80 | 2007_002470 81 | 2007_002539 82 | 2007_002565 83 | 2007_002597 84 | 2007_002618 85 | 2007_002619 86 | 2007_002624 87 | 2007_002643 88 | 2007_002648 89 | 2007_002719 90 | 2007_002728 91 | 2007_002823 92 | 2007_002824 93 | 2007_002852 94 | 2007_002903 95 | 2007_003011 96 | 2007_003020 97 | 2007_003022 98 | 2007_003051 99 | 2007_003088 100 | 2007_003101 101 | 2007_003106 102 | 2007_003110 103 | 2007_003131 104 | 2007_003134 105 | 2007_003137 106 | 2007_003143 107 | 2007_003169 108 | 2007_003188 109 | 2007_003194 110 | 2007_003195 111 | 2007_003201 112 | 2007_003349 113 | 2007_003367 114 | 2007_003373 115 | 2007_003499 116 | 2007_003503 117 | 2007_003506 118 | 2007_003530 119 | 2007_003571 120 | 2007_003587 121 | 2007_003611 122 | 2007_003621 123 | 2007_003682 124 | 2007_003711 125 | 2007_003714 126 | 2007_003742 127 | 2007_003786 128 | 2007_003841 129 | 2007_003848 130 | 2007_003861 131 | 2007_003872 132 | 2007_003917 133 | 2007_003957 134 | 2007_003991 135 | 2007_004033 136 | 2007_004052 137 | 2007_004112 138 | 2007_004121 139 | 2007_004143 140 | 2007_004189 141 | 2007_004190 142 | 2007_004193 143 | 2007_004241 144 | 2007_004275 145 | 2007_004281 146 | 2007_004380 147 | 2007_004392 148 | 2007_004405 149 | 2007_004468 150 | 2007_004483 151 | 2007_004510 152 | 2007_004538 153 | 2007_004558 154 | 2007_004644 155 | 2007_004649 156 | 2007_004712 157 | 2007_004722 158 | 2007_004856 159 | 2007_004866 160 | 2007_004902 161 | 2007_004969 162 | 2007_005058 163 | 2007_005074 164 | 2007_005107 165 | 2007_005114 166 | 2007_005149 167 | 2007_005173 168 | 2007_005281 169 | 2007_005294 170 | 2007_005296 171 | 2007_005304 172 | 2007_005331 173 | 2007_005354 174 | 2007_005358 175 | 2007_005428 176 | 2007_005460 177 | 2007_005469 178 | 2007_005509 179 | 2007_005547 180 | 2007_005600 181 | 2007_005608 182 | 2007_005626 183 | 2007_005689 184 | 2007_005696 185 | 2007_005705 186 | 2007_005759 187 | 2007_005803 188 | 2007_005813 189 | 2007_005828 190 | 2007_005844 191 | 2007_005845 192 | 2007_005857 193 | 2007_005911 194 | 2007_005915 195 | 2007_005978 196 | 2007_006028 197 | 2007_006035 198 | 2007_006046 199 | 2007_006076 200 | 2007_006086 201 | 2007_006117 202 | 2007_006171 203 | 2007_006241 204 | 2007_006260 205 | 2007_006277 206 | 2007_006348 207 | 2007_006364 208 | 2007_006373 209 | 2007_006444 210 | 2007_006449 211 | 2007_006549 212 | 2007_006553 213 | 2007_006560 214 | 2007_006647 215 | 2007_006678 216 | 2007_006680 217 | 2007_006698 218 | 2007_006761 219 | 2007_006802 220 | 2007_006837 221 | 2007_006841 222 | 2007_006864 223 | 2007_006866 224 | 2007_006946 225 | 2007_007007 226 | 2007_007084 227 | 2007_007109 228 | 2007_007130 229 | 2007_007165 230 | 2007_007168 231 | 2007_007195 232 | 2007_007196 233 | 2007_007203 234 | 2007_007211 235 | 2007_007235 236 | 2007_007341 237 | 2007_007414 238 | 2007_007417 239 | 2007_007470 240 | 2007_007477 241 | 2007_007493 242 | 2007_007498 243 | 2007_007524 244 | 2007_007534 245 | 2007_007624 246 | 2007_007651 247 | 2007_007688 248 | 2007_007748 249 | 2007_007795 250 | 2007_007810 251 | 2007_007815 252 | 2007_007818 253 | 2007_007836 254 | 2007_007849 255 | 2007_007881 256 | 2007_007996 257 | 2007_008051 258 | 2007_008084 259 | 2007_008106 260 | 2007_008110 261 | 2007_008204 262 | 2007_008222 263 | 2007_008256 264 | 2007_008260 265 | 2007_008339 266 | 2007_008374 267 | 2007_008415 268 | 2007_008430 269 | 2007_008543 270 | 2007_008547 271 | 2007_008596 272 | 2007_008645 273 | 2007_008670 274 | 2007_008708 275 | 2007_008722 276 | 2007_008747 277 | 2007_008802 278 | 2007_008815 279 | 2007_008897 280 | 2007_008944 281 | 2007_008964 282 | 2007_008973 283 | 2007_008980 284 | 2007_009015 285 | 2007_009068 286 | 2007_009084 287 | 2007_009088 288 | 2007_009096 289 | 2007_009221 290 | 2007_009245 291 | 2007_009251 292 | 2007_009252 293 | 2007_009258 294 | 2007_009320 295 | 2007_009323 296 | 2007_009331 297 | 2007_009346 298 | 2007_009392 299 | 2007_009413 300 | 2007_009419 301 | 2007_009446 302 | 2007_009458 303 | 2007_009521 304 | 2007_009562 305 | 2007_009592 306 | 2007_009654 307 | 2007_009655 308 | 2007_009684 309 | 2007_009687 310 | 2007_009691 311 | 2007_009706 312 | 2007_009750 313 | 2007_009756 314 | 2007_009764 315 | 2007_009794 316 | 2007_009817 317 | 2007_009841 318 | 2007_009897 319 | 2007_009911 320 | 2007_009923 321 | 2007_009938 322 | 2008_000009 323 | 2008_000016 324 | 2008_000073 325 | 2008_000075 326 | 2008_000080 327 | 2008_000107 328 | 2008_000120 329 | 2008_000123 330 | 2008_000149 331 | 2008_000182 332 | 2008_000213 333 | 2008_000215 334 | 2008_000223 335 | 2008_000233 336 | 2008_000234 337 | 2008_000239 338 | 2008_000254 339 | 2008_000270 340 | 2008_000271 341 | 2008_000345 342 | 2008_000359 343 | 2008_000391 344 | 2008_000401 345 | 2008_000464 346 | 2008_000469 347 | 2008_000474 348 | 2008_000501 349 | 2008_000510 350 | 2008_000533 351 | 2008_000573 352 | 2008_000589 353 | 2008_000602 354 | 2008_000630 355 | 2008_000657 356 | 2008_000661 357 | 2008_000662 358 | 2008_000666 359 | 2008_000673 360 | 2008_000700 361 | 2008_000725 362 | 2008_000731 363 | 2008_000763 364 | 2008_000765 365 | 2008_000782 366 | 2008_000795 367 | 2008_000811 368 | 2008_000848 369 | 2008_000853 370 | 2008_000863 371 | 2008_000911 372 | 2008_000919 373 | 2008_000943 374 | 2008_000992 375 | 2008_001013 376 | 2008_001028 377 | 2008_001040 378 | 2008_001070 379 | 2008_001074 380 | 2008_001076 381 | 2008_001078 382 | 2008_001135 383 | 2008_001150 384 | 2008_001170 385 | 2008_001231 386 | 2008_001249 387 | 2008_001260 388 | 2008_001283 389 | 2008_001308 390 | 2008_001379 391 | 2008_001404 392 | 2008_001433 393 | 2008_001439 394 | 2008_001478 395 | 2008_001491 396 | 2008_001504 397 | 2008_001513 398 | 2008_001514 399 | 2008_001531 400 | 2008_001546 401 | 2008_001547 402 | 2008_001580 403 | 2008_001629 404 | 2008_001640 405 | 2008_001682 406 | 2008_001688 407 | 2008_001715 408 | 2008_001821 409 | 2008_001874 410 | 2008_001885 411 | 2008_001895 412 | 2008_001966 413 | 2008_001971 414 | 2008_001992 415 | 2008_002043 416 | 2008_002152 417 | 2008_002205 418 | 2008_002212 419 | 2008_002239 420 | 2008_002240 421 | 2008_002241 422 | 2008_002269 423 | 2008_002273 424 | 2008_002358 425 | 2008_002379 426 | 2008_002383 427 | 2008_002429 428 | 2008_002464 429 | 2008_002467 430 | 2008_002492 431 | 2008_002495 432 | 2008_002504 433 | 2008_002521 434 | 2008_002536 435 | 2008_002588 436 | 2008_002623 437 | 2008_002680 438 | 2008_002681 439 | 2008_002775 440 | 2008_002778 441 | 2008_002835 442 | 2008_002859 443 | 2008_002864 444 | 2008_002900 445 | 2008_002904 446 | 2008_002929 447 | 2008_002936 448 | 2008_002942 449 | 2008_002958 450 | 2008_003003 451 | 2008_003026 452 | 2008_003034 453 | 2008_003076 454 | 2008_003105 455 | 2008_003108 456 | 2008_003110 457 | 2008_003135 458 | 2008_003141 459 | 2008_003155 460 | 2008_003210 461 | 2008_003238 462 | 2008_003270 463 | 2008_003330 464 | 2008_003333 465 | 2008_003369 466 | 2008_003379 467 | 2008_003451 468 | 2008_003461 469 | 2008_003477 470 | 2008_003492 471 | 2008_003499 472 | 2008_003511 473 | 2008_003546 474 | 2008_003576 475 | 2008_003577 476 | 2008_003676 477 | 2008_003709 478 | 2008_003733 479 | 2008_003777 480 | 2008_003782 481 | 2008_003821 482 | 2008_003846 483 | 2008_003856 484 | 2008_003858 485 | 2008_003874 486 | 2008_003876 487 | 2008_003885 488 | 2008_003886 489 | 2008_003926 490 | 2008_003976 491 | 2008_004069 492 | 2008_004101 493 | 2008_004140 494 | 2008_004172 495 | 2008_004175 496 | 2008_004212 497 | 2008_004279 498 | 2008_004339 499 | 2008_004345 500 | 2008_004363 501 | 2008_004367 502 | 2008_004396 503 | 2008_004399 504 | 2008_004453 505 | 2008_004477 506 | 2008_004552 507 | 2008_004562 508 | 2008_004575 509 | 2008_004610 510 | 2008_004612 511 | 2008_004621 512 | 2008_004624 513 | 2008_004654 514 | 2008_004659 515 | 2008_004687 516 | 2008_004701 517 | 2008_004704 518 | 2008_004705 519 | 2008_004754 520 | 2008_004758 521 | 2008_004854 522 | 2008_004910 523 | 2008_004995 524 | 2008_005049 525 | 2008_005089 526 | 2008_005097 527 | 2008_005105 528 | 2008_005145 529 | 2008_005197 530 | 2008_005217 531 | 2008_005242 532 | 2008_005245 533 | 2008_005254 534 | 2008_005262 535 | 2008_005338 536 | 2008_005398 537 | 2008_005399 538 | 2008_005422 539 | 2008_005439 540 | 2008_005445 541 | 2008_005525 542 | 2008_005544 543 | 2008_005628 544 | 2008_005633 545 | 2008_005637 546 | 2008_005642 547 | 2008_005676 548 | 2008_005680 549 | 2008_005691 550 | 2008_005727 551 | 2008_005738 552 | 2008_005812 553 | 2008_005904 554 | 2008_005915 555 | 2008_006008 556 | 2008_006036 557 | 2008_006055 558 | 2008_006063 559 | 2008_006108 560 | 2008_006130 561 | 2008_006143 562 | 2008_006159 563 | 2008_006216 564 | 2008_006219 565 | 2008_006229 566 | 2008_006254 567 | 2008_006275 568 | 2008_006325 569 | 2008_006327 570 | 2008_006341 571 | 2008_006408 572 | 2008_006480 573 | 2008_006523 574 | 2008_006526 575 | 2008_006528 576 | 2008_006553 577 | 2008_006554 578 | 2008_006703 579 | 2008_006722 580 | 2008_006752 581 | 2008_006784 582 | 2008_006835 583 | 2008_006874 584 | 2008_006981 585 | 2008_006986 586 | 2008_007025 587 | 2008_007031 588 | 2008_007048 589 | 2008_007120 590 | 2008_007123 591 | 2008_007143 592 | 2008_007194 593 | 2008_007219 594 | 2008_007273 595 | 2008_007350 596 | 2008_007378 597 | 2008_007392 598 | 2008_007402 599 | 2008_007497 600 | 2008_007498 601 | 2008_007507 602 | 2008_007513 603 | 2008_007527 604 | 2008_007548 605 | 2008_007596 606 | 2008_007677 607 | 2008_007737 608 | 2008_007797 609 | 2008_007804 610 | 2008_007811 611 | 2008_007814 612 | 2008_007828 613 | 2008_007836 614 | 2008_007945 615 | 2008_007994 616 | 2008_008051 617 | 2008_008103 618 | 2008_008127 619 | 2008_008221 620 | 2008_008252 621 | 2008_008268 622 | 2008_008296 623 | 2008_008301 624 | 2008_008335 625 | 2008_008362 626 | 2008_008392 627 | 2008_008393 628 | 2008_008421 629 | 2008_008434 630 | 2008_008469 631 | 2008_008629 632 | 2008_008682 633 | 2008_008711 634 | 2008_008746 635 | 2009_000012 636 | 2009_000013 637 | 2009_000022 638 | 2009_000032 639 | 2009_000037 640 | 2009_000039 641 | 2009_000074 642 | 2009_000080 643 | 2009_000087 644 | 2009_000096 645 | 2009_000121 646 | 2009_000136 647 | 2009_000149 648 | 2009_000156 649 | 2009_000201 650 | 2009_000205 651 | 2009_000219 652 | 2009_000242 653 | 2009_000309 654 | 2009_000318 655 | 2009_000335 656 | 2009_000351 657 | 2009_000354 658 | 2009_000387 659 | 2009_000391 660 | 2009_000412 661 | 2009_000418 662 | 2009_000421 663 | 2009_000426 664 | 2009_000440 665 | 2009_000446 666 | 2009_000455 667 | 2009_000457 668 | 2009_000469 669 | 2009_000487 670 | 2009_000488 671 | 2009_000523 672 | 2009_000573 673 | 2009_000619 674 | 2009_000628 675 | 2009_000641 676 | 2009_000664 677 | 2009_000675 678 | 2009_000704 679 | 2009_000705 680 | 2009_000712 681 | 2009_000716 682 | 2009_000723 683 | 2009_000727 684 | 2009_000730 685 | 2009_000731 686 | 2009_000732 687 | 2009_000771 688 | 2009_000825 689 | 2009_000828 690 | 2009_000839 691 | 2009_000840 692 | 2009_000845 693 | 2009_000879 694 | 2009_000892 695 | 2009_000919 696 | 2009_000924 697 | 2009_000931 698 | 2009_000935 699 | 2009_000964 700 | 2009_000989 701 | 2009_000991 702 | 2009_000998 703 | 2009_001008 704 | 2009_001082 705 | 2009_001108 706 | 2009_001160 707 | 2009_001215 708 | 2009_001240 709 | 2009_001255 710 | 2009_001278 711 | 2009_001299 712 | 2009_001300 713 | 2009_001314 714 | 2009_001332 715 | 2009_001333 716 | 2009_001363 717 | 2009_001391 718 | 2009_001411 719 | 2009_001433 720 | 2009_001505 721 | 2009_001535 722 | 2009_001536 723 | 2009_001565 724 | 2009_001607 725 | 2009_001644 726 | 2009_001663 727 | 2009_001683 728 | 2009_001684 729 | 2009_001687 730 | 2009_001718 731 | 2009_001731 732 | 2009_001765 733 | 2009_001768 734 | 2009_001775 735 | 2009_001804 736 | 2009_001816 737 | 2009_001818 738 | 2009_001850 739 | 2009_001851 740 | 2009_001854 741 | 2009_001941 742 | 2009_001991 743 | 2009_002012 744 | 2009_002035 745 | 2009_002042 746 | 2009_002082 747 | 2009_002094 748 | 2009_002097 749 | 2009_002122 750 | 2009_002150 751 | 2009_002155 752 | 2009_002164 753 | 2009_002165 754 | 2009_002171 755 | 2009_002185 756 | 2009_002202 757 | 2009_002221 758 | 2009_002238 759 | 2009_002239 760 | 2009_002265 761 | 2009_002268 762 | 2009_002291 763 | 2009_002295 764 | 2009_002317 765 | 2009_002320 766 | 2009_002346 767 | 2009_002366 768 | 2009_002372 769 | 2009_002382 770 | 2009_002390 771 | 2009_002415 772 | 2009_002445 773 | 2009_002487 774 | 2009_002521 775 | 2009_002527 776 | 2009_002535 777 | 2009_002539 778 | 2009_002549 779 | 2009_002562 780 | 2009_002568 781 | 2009_002571 782 | 2009_002573 783 | 2009_002584 784 | 2009_002591 785 | 2009_002594 786 | 2009_002604 787 | 2009_002618 788 | 2009_002635 789 | 2009_002638 790 | 2009_002649 791 | 2009_002651 792 | 2009_002727 793 | 2009_002732 794 | 2009_002749 795 | 2009_002753 796 | 2009_002771 797 | 2009_002808 798 | 2009_002856 799 | 2009_002887 800 | 2009_002888 801 | 2009_002928 802 | 2009_002936 803 | 2009_002975 804 | 2009_002982 805 | 2009_002990 806 | 2009_003003 807 | 2009_003005 808 | 2009_003043 809 | 2009_003059 810 | 2009_003063 811 | 2009_003065 812 | 2009_003071 813 | 2009_003080 814 | 2009_003105 815 | 2009_003123 816 | 2009_003193 817 | 2009_003196 818 | 2009_003217 819 | 2009_003224 820 | 2009_003241 821 | 2009_003269 822 | 2009_003273 823 | 2009_003299 824 | 2009_003304 825 | 2009_003311 826 | 2009_003323 827 | 2009_003343 828 | 2009_003378 829 | 2009_003387 830 | 2009_003406 831 | 2009_003433 832 | 2009_003450 833 | 2009_003466 834 | 2009_003481 835 | 2009_003494 836 | 2009_003498 837 | 2009_003504 838 | 2009_003507 839 | 2009_003517 840 | 2009_003523 841 | 2009_003542 842 | 2009_003549 843 | 2009_003551 844 | 2009_003564 845 | 2009_003569 846 | 2009_003576 847 | 2009_003589 848 | 2009_003607 849 | 2009_003640 850 | 2009_003666 851 | 2009_003696 852 | 2009_003703 853 | 2009_003707 854 | 2009_003756 855 | 2009_003771 856 | 2009_003773 857 | 2009_003804 858 | 2009_003806 859 | 2009_003810 860 | 2009_003849 861 | 2009_003857 862 | 2009_003858 863 | 2009_003895 864 | 2009_003903 865 | 2009_003904 866 | 2009_003928 867 | 2009_003938 868 | 2009_003971 869 | 2009_003991 870 | 2009_004021 871 | 2009_004033 872 | 2009_004043 873 | 2009_004070 874 | 2009_004072 875 | 2009_004084 876 | 2009_004099 877 | 2009_004125 878 | 2009_004140 879 | 2009_004217 880 | 2009_004221 881 | 2009_004247 882 | 2009_004248 883 | 2009_004255 884 | 2009_004298 885 | 2009_004324 886 | 2009_004455 887 | 2009_004494 888 | 2009_004497 889 | 2009_004504 890 | 2009_004507 891 | 2009_004509 892 | 2009_004540 893 | 2009_004568 894 | 2009_004579 895 | 2009_004581 896 | 2009_004590 897 | 2009_004592 898 | 2009_004594 899 | 2009_004635 900 | 2009_004653 901 | 2009_004687 902 | 2009_004721 903 | 2009_004730 904 | 2009_004732 905 | 2009_004738 906 | 2009_004748 907 | 2009_004789 908 | 2009_004799 909 | 2009_004801 910 | 2009_004848 911 | 2009_004859 912 | 2009_004867 913 | 2009_004882 914 | 2009_004886 915 | 2009_004895 916 | 2009_004942 917 | 2009_004969 918 | 2009_004987 919 | 2009_004993 920 | 2009_004994 921 | 2009_005038 922 | 2009_005078 923 | 2009_005087 924 | 2009_005089 925 | 2009_005137 926 | 2009_005148 927 | 2009_005156 928 | 2009_005158 929 | 2009_005189 930 | 2009_005190 931 | 2009_005217 932 | 2009_005219 933 | 2009_005220 934 | 2009_005231 935 | 2009_005260 936 | 2009_005262 937 | 2009_005302 938 | 2010_000003 939 | 2010_000038 940 | 2010_000065 941 | 2010_000083 942 | 2010_000084 943 | 2010_000087 944 | 2010_000110 945 | 2010_000159 946 | 2010_000160 947 | 2010_000163 948 | 2010_000174 949 | 2010_000216 950 | 2010_000238 951 | 2010_000241 952 | 2010_000256 953 | 2010_000272 954 | 2010_000284 955 | 2010_000309 956 | 2010_000318 957 | 2010_000330 958 | 2010_000335 959 | 2010_000342 960 | 2010_000372 961 | 2010_000422 962 | 2010_000426 963 | 2010_000427 964 | 2010_000502 965 | 2010_000530 966 | 2010_000552 967 | 2010_000559 968 | 2010_000572 969 | 2010_000573 970 | 2010_000622 971 | 2010_000628 972 | 2010_000639 973 | 2010_000666 974 | 2010_000679 975 | 2010_000682 976 | 2010_000683 977 | 2010_000724 978 | 2010_000738 979 | 2010_000764 980 | 2010_000788 981 | 2010_000814 982 | 2010_000836 983 | 2010_000874 984 | 2010_000904 985 | 2010_000906 986 | 2010_000907 987 | 2010_000918 988 | 2010_000929 989 | 2010_000941 990 | 2010_000952 991 | 2010_000961 992 | 2010_001000 993 | 2010_001010 994 | 2010_001011 995 | 2010_001016 996 | 2010_001017 997 | 2010_001024 998 | 2010_001036 999 | 2010_001061 1000 | 2010_001069 1001 | 2010_001070 1002 | 2010_001079 1003 | 2010_001104 1004 | 2010_001124 1005 | 2010_001149 1006 | 2010_001151 1007 | 2010_001174 1008 | 2010_001206 1009 | 2010_001246 1010 | 2010_001251 1011 | 2010_001256 1012 | 2010_001264 1013 | 2010_001292 1014 | 2010_001313 1015 | 2010_001327 1016 | 2010_001331 1017 | 2010_001351 1018 | 2010_001367 1019 | 2010_001376 1020 | 2010_001403 1021 | 2010_001448 1022 | 2010_001451 1023 | 2010_001522 1024 | 2010_001534 1025 | 2010_001553 1026 | 2010_001557 1027 | 2010_001563 1028 | 2010_001577 1029 | 2010_001579 1030 | 2010_001646 1031 | 2010_001656 1032 | 2010_001692 1033 | 2010_001699 1034 | 2010_001734 1035 | 2010_001752 1036 | 2010_001767 1037 | 2010_001768 1038 | 2010_001773 1039 | 2010_001820 1040 | 2010_001830 1041 | 2010_001851 1042 | 2010_001908 1043 | 2010_001913 1044 | 2010_001951 1045 | 2010_001956 1046 | 2010_001962 1047 | 2010_001966 1048 | 2010_001995 1049 | 2010_002017 1050 | 2010_002025 1051 | 2010_002030 1052 | 2010_002106 1053 | 2010_002137 1054 | 2010_002142 1055 | 2010_002146 1056 | 2010_002147 1057 | 2010_002150 1058 | 2010_002161 1059 | 2010_002200 1060 | 2010_002228 1061 | 2010_002232 1062 | 2010_002251 1063 | 2010_002271 1064 | 2010_002305 1065 | 2010_002310 1066 | 2010_002336 1067 | 2010_002348 1068 | 2010_002361 1069 | 2010_002390 1070 | 2010_002396 1071 | 2010_002422 1072 | 2010_002450 1073 | 2010_002480 1074 | 2010_002512 1075 | 2010_002531 1076 | 2010_002536 1077 | 2010_002538 1078 | 2010_002546 1079 | 2010_002623 1080 | 2010_002682 1081 | 2010_002691 1082 | 2010_002693 1083 | 2010_002701 1084 | 2010_002763 1085 | 2010_002792 1086 | 2010_002868 1087 | 2010_002900 1088 | 2010_002902 1089 | 2010_002921 1090 | 2010_002929 1091 | 2010_002939 1092 | 2010_002988 1093 | 2010_003014 1094 | 2010_003060 1095 | 2010_003123 1096 | 2010_003127 1097 | 2010_003132 1098 | 2010_003168 1099 | 2010_003183 1100 | 2010_003187 1101 | 2010_003207 1102 | 2010_003231 1103 | 2010_003239 1104 | 2010_003275 1105 | 2010_003276 1106 | 2010_003293 1107 | 2010_003302 1108 | 2010_003325 1109 | 2010_003362 1110 | 2010_003365 1111 | 2010_003381 1112 | 2010_003402 1113 | 2010_003409 1114 | 2010_003418 1115 | 2010_003446 1116 | 2010_003453 1117 | 2010_003468 1118 | 2010_003473 1119 | 2010_003495 1120 | 2010_003506 1121 | 2010_003514 1122 | 2010_003531 1123 | 2010_003532 1124 | 2010_003541 1125 | 2010_003547 1126 | 2010_003597 1127 | 2010_003675 1128 | 2010_003708 1129 | 2010_003716 1130 | 2010_003746 1131 | 2010_003758 1132 | 2010_003764 1133 | 2010_003768 1134 | 2010_003771 1135 | 2010_003772 1136 | 2010_003781 1137 | 2010_003813 1138 | 2010_003820 1139 | 2010_003854 1140 | 2010_003912 1141 | 2010_003915 1142 | 2010_003947 1143 | 2010_003956 1144 | 2010_003971 1145 | 2010_004041 1146 | 2010_004042 1147 | 2010_004056 1148 | 2010_004063 1149 | 2010_004104 1150 | 2010_004120 1151 | 2010_004149 1152 | 2010_004165 1153 | 2010_004208 1154 | 2010_004219 1155 | 2010_004226 1156 | 2010_004314 1157 | 2010_004320 1158 | 2010_004322 1159 | 2010_004337 1160 | 2010_004348 1161 | 2010_004355 1162 | 2010_004369 1163 | 2010_004382 1164 | 2010_004419 1165 | 2010_004432 1166 | 2010_004472 1167 | 2010_004479 1168 | 2010_004519 1169 | 2010_004520 1170 | 2010_004529 1171 | 2010_004543 1172 | 2010_004550 1173 | 2010_004551 1174 | 2010_004556 1175 | 2010_004559 1176 | 2010_004628 1177 | 2010_004635 1178 | 2010_004662 1179 | 2010_004697 1180 | 2010_004757 1181 | 2010_004763 1182 | 2010_004772 1183 | 2010_004783 1184 | 2010_004789 1185 | 2010_004795 1186 | 2010_004815 1187 | 2010_004825 1188 | 2010_004828 1189 | 2010_004856 1190 | 2010_004857 1191 | 2010_004861 1192 | 2010_004941 1193 | 2010_004946 1194 | 2010_004951 1195 | 2010_004980 1196 | 2010_004994 1197 | 2010_005013 1198 | 2010_005021 1199 | 2010_005046 1200 | 2010_005063 1201 | 2010_005108 1202 | 2010_005118 1203 | 2010_005159 1204 | 2010_005160 1205 | 2010_005166 1206 | 2010_005174 1207 | 2010_005180 1208 | 2010_005187 1209 | 2010_005206 1210 | 2010_005245 1211 | 2010_005252 1212 | 2010_005284 1213 | 2010_005305 1214 | 2010_005344 1215 | 2010_005353 1216 | 2010_005366 1217 | 2010_005401 1218 | 2010_005421 1219 | 2010_005428 1220 | 2010_005432 1221 | 2010_005433 1222 | 2010_005496 1223 | 2010_005501 1224 | 2010_005508 1225 | 2010_005531 1226 | 2010_005534 1227 | 2010_005575 1228 | 2010_005582 1229 | 2010_005606 1230 | 2010_005626 1231 | 2010_005644 1232 | 2010_005664 1233 | 2010_005705 1234 | 2010_005706 1235 | 2010_005709 1236 | 2010_005718 1237 | 2010_005719 1238 | 2010_005727 1239 | 2010_005762 1240 | 2010_005788 1241 | 2010_005860 1242 | 2010_005871 1243 | 2010_005877 1244 | 2010_005888 1245 | 2010_005899 1246 | 2010_005922 1247 | 2010_005991 1248 | 2010_005992 1249 | 2010_006026 1250 | 2010_006034 1251 | 2010_006054 1252 | 2010_006070 1253 | 2011_000045 1254 | 2011_000051 1255 | 2011_000054 1256 | 2011_000066 1257 | 2011_000070 1258 | 2011_000112 1259 | 2011_000173 1260 | 2011_000178 1261 | 2011_000185 1262 | 2011_000226 1263 | 2011_000234 1264 | 2011_000238 1265 | 2011_000239 1266 | 2011_000248 1267 | 2011_000283 1268 | 2011_000291 1269 | 2011_000310 1270 | 2011_000312 1271 | 2011_000338 1272 | 2011_000396 1273 | 2011_000412 1274 | 2011_000419 1275 | 2011_000435 1276 | 2011_000436 1277 | 2011_000438 1278 | 2011_000455 1279 | 2011_000456 1280 | 2011_000479 1281 | 2011_000481 1282 | 2011_000482 1283 | 2011_000503 1284 | 2011_000512 1285 | 2011_000521 1286 | 2011_000526 1287 | 2011_000536 1288 | 2011_000548 1289 | 2011_000566 1290 | 2011_000585 1291 | 2011_000598 1292 | 2011_000607 1293 | 2011_000618 1294 | 2011_000638 1295 | 2011_000658 1296 | 2011_000661 1297 | 2011_000669 1298 | 2011_000747 1299 | 2011_000780 1300 | 2011_000789 1301 | 2011_000807 1302 | 2011_000809 1303 | 2011_000813 1304 | 2011_000830 1305 | 2011_000843 1306 | 2011_000874 1307 | 2011_000888 1308 | 2011_000900 1309 | 2011_000912 1310 | 2011_000953 1311 | 2011_000969 1312 | 2011_001005 1313 | 2011_001014 1314 | 2011_001020 1315 | 2011_001047 1316 | 2011_001060 1317 | 2011_001064 1318 | 2011_001069 1319 | 2011_001071 1320 | 2011_001082 1321 | 2011_001110 1322 | 2011_001114 1323 | 2011_001159 1324 | 2011_001161 1325 | 2011_001190 1326 | 2011_001232 1327 | 2011_001263 1328 | 2011_001276 1329 | 2011_001281 1330 | 2011_001287 1331 | 2011_001292 1332 | 2011_001313 1333 | 2011_001341 1334 | 2011_001346 1335 | 2011_001350 1336 | 2011_001407 1337 | 2011_001416 1338 | 2011_001421 1339 | 2011_001434 1340 | 2011_001447 1341 | 2011_001489 1342 | 2011_001529 1343 | 2011_001530 1344 | 2011_001534 1345 | 2011_001546 1346 | 2011_001567 1347 | 2011_001589 1348 | 2011_001597 1349 | 2011_001601 1350 | 2011_001607 1351 | 2011_001613 1352 | 2011_001614 1353 | 2011_001619 1354 | 2011_001624 1355 | 2011_001642 1356 | 2011_001665 1357 | 2011_001669 1358 | 2011_001674 1359 | 2011_001708 1360 | 2011_001713 1361 | 2011_001714 1362 | 2011_001722 1363 | 2011_001726 1364 | 2011_001745 1365 | 2011_001748 1366 | 2011_001775 1367 | 2011_001782 1368 | 2011_001793 1369 | 2011_001794 1370 | 2011_001812 1371 | 2011_001862 1372 | 2011_001863 1373 | 2011_001868 1374 | 2011_001880 1375 | 2011_001910 1376 | 2011_001984 1377 | 2011_001988 1378 | 2011_002002 1379 | 2011_002040 1380 | 2011_002041 1381 | 2011_002064 1382 | 2011_002075 1383 | 2011_002098 1384 | 2011_002110 1385 | 2011_002121 1386 | 2011_002124 1387 | 2011_002150 1388 | 2011_002156 1389 | 2011_002178 1390 | 2011_002200 1391 | 2011_002223 1392 | 2011_002244 1393 | 2011_002247 1394 | 2011_002279 1395 | 2011_002295 1396 | 2011_002298 1397 | 2011_002308 1398 | 2011_002317 1399 | 2011_002322 1400 | 2011_002327 1401 | 2011_002343 1402 | 2011_002358 1403 | 2011_002371 1404 | 2011_002379 1405 | 2011_002391 1406 | 2011_002498 1407 | 2011_002509 1408 | 2011_002515 1409 | 2011_002532 1410 | 2011_002535 1411 | 2011_002548 1412 | 2011_002575 1413 | 2011_002578 1414 | 2011_002589 1415 | 2011_002592 1416 | 2011_002623 1417 | 2011_002641 1418 | 2011_002644 1419 | 2011_002662 1420 | 2011_002675 1421 | 2011_002685 1422 | 2011_002713 1423 | 2011_002730 1424 | 2011_002754 1425 | 2011_002812 1426 | 2011_002863 1427 | 2011_002879 1428 | 2011_002885 1429 | 2011_002929 1430 | 2011_002951 1431 | 2011_002975 1432 | 2011_002993 1433 | 2011_002997 1434 | 2011_003003 1435 | 2011_003011 1436 | 2011_003019 1437 | 2011_003030 1438 | 2011_003055 1439 | 2011_003085 1440 | 2011_003103 1441 | 2011_003114 1442 | 2011_003145 1443 | 2011_003146 1444 | 2011_003182 1445 | 2011_003197 1446 | 2011_003205 1447 | 2011_003240 1448 | 2011_003256 1449 | 2011_003271 1450 | -------------------------------------------------------------------------------- /output/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/1.jpg -------------------------------------------------------------------------------- /output/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2.jpg -------------------------------------------------------------------------------- /output/2007_000027.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000027.jpg -------------------------------------------------------------------------------- /output/2007_000121.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000121.jpg -------------------------------------------------------------------------------- /output/2007_000243.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000243.jpg -------------------------------------------------------------------------------- /output/2007_000346.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000346.jpg -------------------------------------------------------------------------------- /output/2007_000364.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000364.jpg -------------------------------------------------------------------------------- /output/2007_000452.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000452.jpg -------------------------------------------------------------------------------- /output/2007_000464.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000464.jpg -------------------------------------------------------------------------------- /output/2007_000529.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/2007_000529.jpg -------------------------------------------------------------------------------- /output/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/3.jpg -------------------------------------------------------------------------------- /output/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/4.jpg -------------------------------------------------------------------------------- /output/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/5.jpg -------------------------------------------------------------------------------- /output/UNET.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/UNET.png -------------------------------------------------------------------------------- /output/model1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/model1.png -------------------------------------------------------------------------------- /output/model2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/model2.png -------------------------------------------------------------------------------- /output/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/test.jpg -------------------------------------------------------------------------------- /output/u=3476430323,4263663876&fm=11&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/u=3476430323,4263663876&fm=11&gp=0.jpg -------------------------------------------------------------------------------- /output/u=3893090294,1830313637&fm=11&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/u=3893090294,1830313637&fm=11&gp=0.jpg -------------------------------------------------------------------------------- /output/w475_h331_9a5169d0369e4e1496d1cdfabb1ded85.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/output/w475_h331_9a5169d0369e4e1496d1cdfabb1ded85.jpg -------------------------------------------------------------------------------- /picture/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/1.jpg -------------------------------------------------------------------------------- /picture/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2.jpg -------------------------------------------------------------------------------- /picture/2007_000027.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000027.jpg -------------------------------------------------------------------------------- /picture/2007_000121.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000121.jpg -------------------------------------------------------------------------------- /picture/2007_000243.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000243.jpg -------------------------------------------------------------------------------- /picture/2007_000346.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000346.jpg -------------------------------------------------------------------------------- /picture/2007_000364.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000364.jpg -------------------------------------------------------------------------------- /picture/2007_000452.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000452.jpg -------------------------------------------------------------------------------- /picture/2007_000464.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000464.jpg -------------------------------------------------------------------------------- /picture/2007_000529.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/2007_000529.jpg -------------------------------------------------------------------------------- /picture/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/3.jpg -------------------------------------------------------------------------------- /picture/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/4.jpg -------------------------------------------------------------------------------- /picture/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/5.jpg -------------------------------------------------------------------------------- /picture/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/test.jpg -------------------------------------------------------------------------------- /picture/u=3476430323,4263663876&fm=11&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/u=3476430323,4263663876&fm=11&gp=0.jpg -------------------------------------------------------------------------------- /picture/u=3893090294,1830313637&fm=11&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/u=3893090294,1830313637&fm=11&gp=0.jpg -------------------------------------------------------------------------------- /picture/w475_h331_9a5169d0369e4e1496d1cdfabb1ded85.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/picture/w475_h331_9a5169d0369e4e1496d1cdfabb1ded85.jpg -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | import os 8 | import tensorflow as tf 9 | from utils import config as FLAGS 10 | from utils import deeplab_model,preprocessing 11 | import numpy as np 12 | import cv2 13 | 14 | 15 | # In[2]: 16 | 17 | 18 | def main(): 19 | image=tf.placeholder(tf.float32,[None,None,3]) 20 | inputs=preprocessing.mean_image_subtraction(image) 21 | inputs=tf.expand_dims(inputs,axis=0) 22 | model=deeplab_model.model_generator(FLAGS.num_classes, 23 | FLAGS.output_stride, 24 | FLAGS.base_architecture, 25 | FLAGS.pre_trained_model, 26 | None,) 27 | logits=model(inputs,False) 28 | 29 | #预测类别shape[batch,h,w,1] 30 | pred_classes=tf.expand_dims(tf.argmax(logits,axis=3,output_type=tf.int32),axis=3) 31 | #图片上色形式shape[batch,h,w,3] 32 | pred_decoded_labels=tf.py_func(preprocessing.decode_labels, 33 | [pred_classes,1,FLAGS.num_classes], 34 | tf.uint8) 35 | pred_decoded_labels=tf.squeeze(pred_decoded_labels) 36 | saver=tf.train.Saver() 37 | sess=tf.Session() 38 | model_file=tf.train.latest_checkpoint(FLAGS.model_dir) 39 | saver.restore(sess,model_file) 40 | if FLAGS.test_mode=='1': 41 | for filename in os.listdir(FLAGS.pictue): 42 | x=cv2.imread(FLAGS.pictue+filename) 43 | x1=cv2.cvtColor(x,cv2.COLOR_BGR2RGB) 44 | out=sess.run(pred_decoded_labels,feed_dict={image:x1}) 45 | out=cv2.cvtColor(out,cv2.COLOR_RGB2BGR) 46 | out=np.concatenate([x, out], axis=1) 47 | cv2.imshow('im',out) 48 | k = cv2.waitKey(0) & 0xFF 49 | if k == 27: 50 | cv2.imwrite(FLAGS.output + filename,out) 51 | cv2.destroyAllWindows() 52 | 53 | if FLAGS.test_mode=='2': 54 | cap=cv2.VideoCapture(0) 55 | fourcc = cv2.VideoWriter_fourcc(*'XVID') 56 | out = cv2.VideoWriter(FLAGS.output+'out.mp4' ,fourcc,10,(1280,480)) 57 | while True: 58 | ret,frame = cap.read() 59 | if ret == True: 60 | frame1=cv2.cvtColor(frame,cv2.COLOR_BGR2RGB) 61 | result=sess.run(pred_decoded_labels,feed_dict={image:frame1}) 62 | result=cv2.cvtColor(result,cv2.COLOR_RGB2BGR) 63 | result1=np.concatenate([frame, result], axis=1) 64 | a = out.write(result1) 65 | cv2.imshow("result", result1) 66 | if cv2.waitKey(1) & 0xFF == ord('q'): 67 | break 68 | else: 69 | break 70 | cap.release() 71 | out.release() 72 | cv2.destroyAllWindows() 73 | sess.close() 74 | 75 | 76 | 77 | # In[3]: 78 | 79 | 80 | if __name__=='__main__': 81 | main() 82 | 83 | -------------------------------------------------------------------------------- /tfrecord.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | import io 8 | import os 9 | from PIL import Image 10 | import tensorflow as tf 11 | from utils import config as Config 12 | from utils import dataset_util 13 | 14 | 15 | # In[2]: 16 | 17 | 18 | def main(): 19 | '''生成tfrecords主程序 20 | ''' 21 | if not os.path.exists(Config.tfrecord_path): 22 | os.makedirs(Config.tfrecord_path) 23 | #相当于print 24 | tf.logging.info('读取数据') 25 | 26 | image_dir=os.path.join(Config.data_dir,Config.image_data_dir) 27 | label_dir=os.path.join(Config.data_dir,Config.label_data_dir) 28 | 29 | if not os.path.isdir(label_dir): 30 | raise ValueError('数据缺少,去下载') 31 | #获取训练和验证图片的index 32 | train_examples=dataset_util.read_examples_list(Config.train_data_list) 33 | val_examples=dataset_util.read_examples_list(Config.val_data_list) 34 | 35 | #训练验证tfrecord存储地址 36 | train_output_path=os.path.join(Config.tfrecord_path,'train.record') 37 | val_output_path=os.path.join(Config.tfrecord_path,'val.record') 38 | 39 | #生成tfrecord 40 | create_record(train_output_path,image_dir,label_dir,train_examples) 41 | create_record(val_output_path,image_dir,label_dir,val_examples) 42 | 43 | 44 | # In[3]: 45 | 46 | 47 | def create_record(output_filename,image_dir,label_dir,examples): 48 | '''将图片生成tfrecord 49 | 参数: 50 | output_filename:输出地址 51 | image_dir:图片地址 52 | label_dir:label地址 53 | examples:图片的index名字 54 | ''' 55 | writer=tf.python_io.TFRecordWriter(output_filename) 56 | for idx,example in enumerate(examples): 57 | if idx % 500 ==0: 58 | #将生成第几张图片信息输出 59 | tf.logging.info('On image %d of %d',idx,len(examples)) 60 | image_path=os.path.join(image_dir,example+'.jpg') 61 | label_path=os.path.join(label_dir,example+'.png') 62 | 63 | if not os.path.exists(image_path): 64 | tf.logging.warning('没有该图片: ',image_path) 65 | continue 66 | elif not os.path.exists(label_path): 67 | tf.logging.warning('没找着label文件: ',label_path) 68 | continue 69 | try: 70 | #转换格式 71 | 72 | tf_example=dict_to_tf_example(image_path,label_path) 73 | 74 | writer.write(tf_example.SerializeToString()) 75 | except ValueError: 76 | tf.logging.warning('无效的example: %s, 忽略',example) 77 | writer.close() 78 | 79 | 80 | # In[4]: 81 | 82 | 83 | def dict_to_tf_example(image_path,label_path): 84 | '''格式转换成tfrecord 85 | 参数: 86 | image_path:输入图片地址 87 | label_path:输出label地址 88 | ''' 89 | with tf.gfile.GFile(image_path,'rb') as f: 90 | encoder_jpg=f.read() 91 | encoder_jpg_io=io.BytesIO(encoder_jpg) 92 | image=Image.open(encoder_jpg_io) 93 | 94 | if image.format !='JPEG': 95 | tf.logging.info('输入图片格式错误') 96 | raise ValueError('输入图片格式错误') 97 | 98 | with tf.gfile.GFile(label_path,'rb') as f: 99 | encoder_label=f.read() 100 | encoder_label_io=io.BytesIO(encoder_label) 101 | label=Image.open(encoder_label_io) 102 | 103 | if label.format !='PNG': 104 | tf.logging.info('label图片格式错误') 105 | raise ValueError('label图片格式错误') 106 | 107 | if image.size!=label.size: 108 | tf.logging.info('输入输出没对上') 109 | raise ValueError('输入输出没对上') 110 | 111 | example=tf.train.Example(features=tf.train.Features(feature={ 112 | 'image':dataset_util.bytes_feature(encoder_jpg), 113 | 'label':dataset_util.bytes_feature(encoder_label)})) 114 | return example 115 | 116 | 117 | 118 | # In[5]: 119 | 120 | 121 | if __name__=='__main__': 122 | #为将要被记录的的东西(日志)设置开始入口 123 | tf.logging.set_verbosity(tf.logging.INFO) 124 | main() 125 | 126 | -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[ ]: 5 | 6 | 7 | import os 8 | import tensorflow as tf 9 | from utils import deeplab_model 10 | from utils import preprocessing 11 | from tensorflow.python import debug as tf_debug 12 | from utils import config as FLAGS 13 | import shutil 14 | _NUM_CLASSES = 21 15 | _HEIGHT = 513 16 | _WIDTH = 513 17 | _DEPTH = 3 18 | _MIN_SCALE = 0.5 19 | _MAX_SCALE = 2.0 20 | _IGNORE_LABEL = 255 21 | 22 | _POWER = 0.9 23 | _MOMENTUM = 0.9 24 | 25 | _BATCH_NORM_DECAY = 0.9997 26 | 27 | _NUM_IMAGES = { 28 | 'train': 10582, 29 | 'validation': 1449, 30 | } 31 | 32 | # In[ ]: 33 | 34 | 35 | def main(): 36 | '''训练主函数''' 37 | #设置保存模型时间,和最多保存数目,和多gpu 38 | session_config = tf.ConfigProto(device_count={'GPU': 0,'GPU':1}) 39 | 40 | 41 | 42 | run_config=tf.estimator.RunConfig().replace(session_config=session_config,save_checkpoints_secs=1e2, keep_checkpoint_max = 3) 43 | 44 | model=tf.estimator.Estimator(model_fn=deeplab_model.model_fn, 45 | model_dir=FLAGS.model_dir, 46 | config=run_config, 47 | params={ 48 | 'output_stride': FLAGS.output_stride, 49 | 'batch_size': FLAGS.batch_size, 50 | 'base_architecture': FLAGS.base_architecture, 51 | 'pre_trained_model': FLAGS.pre_trained_model, 52 | 'batch_norm_decay': _BATCH_NORM_DECAY, 53 | 'num_classes': _NUM_CLASSES, 54 | 'tensorboard_images_max_outputs': FLAGS.tensorboard_images_max_outputs, 55 | 'weight_decay': FLAGS.weight_decay, 56 | 'learning_rate_policy': FLAGS.learning_rate_policy, 57 | 'num_train': _NUM_IMAGES['train'], 58 | 'initial_learning_rate': FLAGS.initial_learning_rate, 59 | 'max_iter': FLAGS.max_iter, 60 | 'end_learning_rate': FLAGS.end_learning_rate, 61 | 'power': _POWER, 62 | 'momentum': _MOMENTUM, 63 | 'freeze_batch_norm': FLAGS.freeze_batch_norm, 64 | 'initial_global_step': FLAGS.initial_global_step 65 | }) 66 | for _ in range(FLAGS.train_epochs//FLAGS.epochs_per_eval): 67 | tensors_to_log={ 68 | 'global_step':'global_step', 69 | 'learning_rate': 'learning_rate', 70 | 'cross_entropy': 'cross_entropy', 71 | 'train_px_accuracy': 'train_px_accuracy', 72 | 'train_mean_iou': 'train_mean_iou', 73 | 74 | } 75 | #设置训练次数多少输出预测值 76 | loggig_hook=tf.train.LoggingTensorHook(tensors=tensors_to_log,every_n_iter=10) 77 | train_hooks=[loggig_hook] 78 | eval_hooks=None 79 | 80 | if FLAGS.debug: 81 | debug_hook=tf_debug.LocalCLIDebugHook() 82 | train_hooks.append(debug_hook) 83 | eval_hooks=[debug_hook] 84 | tf.logging.info('开始训练里奥') 85 | model.train(input_fn=lambda:input_fn(True,FLAGS.tfrecord_path,FLAGS.batch_size,FLAGS.epochs_per_eval), 86 | hooks=train_hooks) 87 | tf.logging.info('开始验证集里奥') 88 | eval_results=model.evaluate( 89 | input_fn=lambda : input_fn(False,FLAGS.tfrecord_path,1), 90 | hooks=eval_hooks) 91 | print(eval_results) 92 | 93 | 94 | # In[ ]: 95 | 96 | 97 | def input_fn(is_training,data_dir,batch_size,num_epochs=1): 98 | '''将数据搞成estimator输入格式''' 99 | dataset=tf.data.Dataset.from_tensor_slices(get_filenames(is_training,data_dir)) 100 | #相当于map 101 | dataset=dataset.flat_map(tf.data.TFRecordDataset) 102 | if is_training: 103 | #打乱 104 | dataset=dataset.shuffle(buffer_size=_NUM_IMAGES['train']) 105 | dataset=dataset.map(parse_record) 106 | dataset=dataset.map( 107 | lambda image,label: preprocess_image(image,label,is_training)) 108 | #和batch结合加速 109 | dataset=dataset.prefetch(batch_size) 110 | dataset=dataset.repeat(num_epochs) 111 | dataset=dataset.batch(batch_size) 112 | 113 | iterator=dataset.make_one_shot_iterator() 114 | images,labels=iterator.get_next() 115 | return images,labels 116 | 117 | 118 | # In[ ]: 119 | 120 | 121 | def get_filenames(is_training,data_dir): 122 | '''获取数据目录''' 123 | if is_training: 124 | return [os.path.join(data_dir,'train.record')] 125 | else: 126 | return [os.path.join(data_dir,'val.record')] 127 | 128 | 129 | # In[ ]: 130 | 131 | 132 | def parse_record(raw_record): 133 | '''解析tfrecord数据''' 134 | key_to_features={ 135 | 'image':tf.FixedLenFeature((),tf.string,default_value=''), 136 | 'label':tf.FixedLenFeature((),tf.string,default_value='') 137 | } 138 | parsed=tf.parse_single_example(raw_record,key_to_features) 139 | image=tf.image.decode_image( 140 | tf.reshape(parsed['image'],shape=[]),_DEPTH) 141 | image=tf.to_float(tf.image.convert_image_dtype(image,dtype=tf.uint8)) 142 | image.set_shape([None,None,3]) 143 | 144 | label=tf.image.decode_image( 145 | tf.reshape(parsed['label'],shape=[]),1) 146 | label=tf.to_int32(tf.image.convert_image_dtype(label,dtype=tf.uint8)) 147 | label.set_shape([None,None,1]) 148 | return image,label 149 | 150 | 151 | # In[ ]: 152 | 153 | 154 | def preprocess_image(image,label,is_training): 155 | '''数据预处理''' 156 | if is_training: 157 | image,label=preprocessing.random_rescale_image_and_label( 158 | image,label,_MIN_SCALE,_MAX_SCALE) 159 | image,label=preprocessing.random_crop_or_pad_image_and_label( 160 | image,label,_HEIGHT,_WIDTH,_IGNORE_LABEL) 161 | image,label=preprocessing.random_filp_left_right_image_and_label( 162 | image,label) 163 | image.set_shape([_HEIGHT,_WIDTH,3]) 164 | label.set_shape([_HEIGHT,_WIDTH,1]) 165 | image=preprocessing.mean_image_subtraction(image) 166 | return image,label 167 | 168 | 169 | # In[ ]: 170 | 171 | 172 | if __name__=='__main__': 173 | tf.logging.set_verbosity(tf.logging.INFO) 174 | main() 175 | 176 | -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | ### 2 | -------------------------------------------------------------------------------- /utils/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /utils/__pycache__/config.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/config.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/config.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/config.cpython-36.pyc -------------------------------------------------------------------------------- /utils/__pycache__/dataset_util.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/dataset_util.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/deeplab1_model.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/deeplab1_model.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/deeplab_model.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/deeplab_model.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/deeplab_model.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/deeplab_model.cpython-36.pyc -------------------------------------------------------------------------------- /utils/__pycache__/deeplab_model1.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/deeplab_model1.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/model.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/model.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/preprocessing.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/preprocessing.cpython-35.pyc -------------------------------------------------------------------------------- /utils/__pycache__/preprocessing.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeslieZhoa/tensorflow-deeplab_v3_plus/6c4a0788198688da5abf4a91656d7a70a023daed/utils/__pycache__/preprocessing.cpython-36.pyc -------------------------------------------------------------------------------- /utils/config.py: -------------------------------------------------------------------------------- 1 | #类别数 2 | num_classes=21 3 | #数据目录 4 | data_dir='./data/VOCdevkit/VOC2012' 5 | #生成tfrecords放置目录 6 | tfrecord_path='./data/tfrecord/' 7 | #训练图片index 8 | train_data_list='./data/train.txt' 9 | #验证图片index 10 | val_data_list='./data/val.txt' 11 | #图片目录 12 | image_data_dir='JPEGImages' 13 | #label目录,每一个像素点即为所分的类别 14 | label_data_dir='SegmentationClassAug' 15 | 16 | #模型目录 17 | model_dir='./model' 18 | #是否清除模型目录 19 | clean_model_dir='store_false' 20 | #训练epoch 21 | train_epochs=2 22 | #训练期间的验证次数 23 | epochs_per_eval=1 24 | 25 | #tensorboard最大图片展示数 26 | tensorboard_images_max_outputs=6 27 | 28 | #批次设置 29 | batch_size=4 30 | #学习率衰减策略 31 | learning_rate_policy='poly' 32 | #学习率衰减最大次数 33 | max_iter=30000 34 | 35 | #重载的结构 36 | base_architecture='resnet_v2_101' 37 | #预训练模型位置 38 | pre_trained_model='./resnet_v2_101/resnet_v2_101.ckpt' 39 | #模型encoder输入与输出比例 40 | output_stride=16 41 | #是否更新BN参数 42 | freeze_batch_norm='store_true' 43 | #起始学习率 44 | initial_learning_rate=7e-3 45 | #终止学习率 46 | end_learning_rate=1e-6 47 | #global_step初始值 48 | initial_global_step=0 49 | #正则化权重 50 | weight_decay=2e-4 51 | 52 | debug=None 53 | 54 | #测试图片地址 55 | pictue='./picture/' 56 | #测试图片输出地址 57 | output='./output/' 58 | #测试输入,若为1则输入图片,为2输入是摄像头 59 | test_mode='1' 60 | 61 | -------------------------------------------------------------------------------- /utils/dataset_util.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | import tensorflow as tf 8 | 9 | 10 | # In[2]: 11 | 12 | 13 | #tfrecords转换的各种类型 14 | def int_64_feature(value): 15 | return tf.train.Feature(int_64_feature=tf.train.Int64List(value=[value])) 16 | def int64_list_feature(value): 17 | return tf.train.Feature(int64_list=tf.train.Int64List(value=value)) 18 | 19 | 20 | def bytes_feature(value): 21 | return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) 22 | 23 | 24 | def bytes_list_feature(value): 25 | return tf.train.Feature(bytes_list=tf.train.BytesList(value=value)) 26 | 27 | 28 | def float_list_feature(value): 29 | return tf.train.Feature(float_list=tf.train.FloatList(value=value)) 30 | 31 | 32 | # In[3]: 33 | 34 | 35 | def read_examples_list(path): 36 | '''返回所有图片的index''' 37 | with tf.gfile.GFile(path) as f: 38 | lines=f.readlines() 39 | return [line.strip().split(' ')[0] for line in lines] 40 | 41 | 42 | -------------------------------------------------------------------------------- /utils/deeplab_model.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[4]: 5 | 6 | 7 | import tensorflow as tf 8 | from tensorflow.contrib.slim.nets import resnet_v2 9 | from tensorflow.contrib.framework.python.ops import arg_scope 10 | slim=tf.contrib.slim 11 | from utils import preprocessing 12 | _BATH_NORM_DECAY=0.9997 13 | _WEIGHT_DECAY=5e-4 14 | 15 | 16 | # In[10]: 17 | 18 | 19 | def model_fn(features,labels,mode,params): 20 | '''对于estimator的模型接口 21 | 参数: 22 | features:输入特征 23 | labels:真实label 24 | mode:模型模式 25 | params:模型运行相关参数 26 | 返回值: 27 | 模型接口形式 28 | ''' 29 | if isinstance(features,dict): 30 | features=features['feature'] 31 | #图像加上均值,以便显示 32 | images=tf.cast(tf.map_fn(preprocessing.mean_image_addition,features), 33 | tf.uint8) 34 | network=model_generator(params['num_classes'], 35 | params['output_stride'], 36 | params['base_architecture'], 37 | params['pre_trained_model'], 38 | params['batch_norm_decay']) 39 | logits=network(features,mode==tf.estimator.ModeKeys.TRAIN) 40 | #预测类别shape[batch,h,w,1] 41 | pred_classes=tf.expand_dims(tf.argmax(logits,axis=3,output_type=tf.int32),axis=3) 42 | #图片上色形式shape[batch,h,w,3] 43 | pred_decoded_labels=tf.py_func(preprocessing.decode_labels, 44 | [pred_classes,params['batch_size'],params['num_classes']], 45 | tf.uint8) 46 | 47 | predictions={ 48 | 'classes':pred_classes, 49 | 'probabilities':tf.nn.softmax(logits,name='softmax_tensor'), 50 | 'decoded_labels':pred_decoded_labels 51 | } 52 | if mode==tf.estimator.ModeKeys.PREDICT: 53 | #模式为预测,将decoded_labels删掉 54 | predictions_without_decoded_labels=predictions.copy() 55 | del predictions_without_decoded_labels['decoded_labels'] 56 | return tf.estimator.EstimatorSpec( 57 | mode=mode, 58 | predictions=predictions, 59 | export_outputs={ 60 | 'preds':tf.estimator.export.PredictOutput( 61 | predictions_without_decoded_labels) 62 | }) 63 | #为真实label上色 64 | gt_decoded_labels=tf.py_func(preprocessing.decode_labels, 65 | [labels,params['batch_size'],params['num_classes']],tf.uint8) 66 | 67 | labels=tf.squeeze(labels,axis=3)#[batch,h,w] 68 | logits_by_num_classes=tf.reshape(logits,[-1,params['num_classes']])#[-1,21] 69 | labels_flat=tf.reshape(labels,[-1,])#[-1] 70 | #有类别的像素遮罩 71 | valid_indices=tf.to_int32(labels_flat<=params['num_classes']-1) 72 | #除去不明类别的预测和真实值 73 | valid_logits=tf.dynamic_partition(logits_by_num_classes,valid_indices,num_partitions=2)[1]#[-1,num_classes] 74 | valid_labels=tf.dynamic_partition(labels_flat,valid_indices,num_partitions=2)[1]#[-1] 75 | 76 | pred_flat=tf.reshape(pred_classes,[-1,])#[-1] 77 | valid_preds=tf.dynamic_partition(pred_flat,valid_indices,num_partitions=2)[1]#[-1] 78 | #列代表真实值,行代表预测值的混淆矩阵 79 | confusion_matrix=tf.confusion_matrix(valid_labels,valid_preds,num_classes=params['num_classes']) 80 | predictions['valid_preds']=valid_preds 81 | predictions['valid_labels']=valid_labels 82 | predictions['confusion_maxtrix']=confusion_matrix 83 | 84 | #损失函数为交叉熵 85 | cross_entropy=tf.losses.sparse_softmax_cross_entropy( 86 | logits=valid_logits,labels=valid_labels) 87 | 88 | #记录信息 89 | tf.identity(cross_entropy,name='cross_entropy') 90 | tf.summary.scalar('cross_entropy',cross_entropy) 91 | 92 | #训不训练BN里的数值 93 | if not params['freeze_batch_norm']: 94 | train_var_list=[v for v in tf.trainable_variables()] 95 | else: 96 | train_var_list=[v for v in tf.trainable_variables() 97 | if 'beta' not in v.name and 'gamma' not in v.name] 98 | #加上正则计算总损失 99 | with tf.variable_scope('total_loss'): 100 | loss=cross_entropy+params.get('weight_decay',_WEIGHT_DECAY)*tf.add_n( 101 | [tf.nn.l2_loss(v) for v in train_var_list]) 102 | 103 | #加入图片到tensrboard 104 | if mode==tf.estimator.ModeKeys.TRAIN: 105 | tf.summary.image('image', 106 | tf.concat(axis=2,values=[images,gt_decoded_labels,pred_decoded_labels]), 107 | max_outputs=params['tensorboard_images_max_outputs']) 108 | global_step=tf.train.get_or_create_global_step() 109 | #选择学习率衰减模式 110 | if params['learning_rate_policy']=='piecewise': 111 | initial_learning_rate=0.1*params['batch_size']/128 112 | #每一个epoch有几个batch 113 | batches_per_epoch=params['num_train']/params['batch_size'] 114 | boundaries=[int(batches_per_epoch*epoch) for epoch in [100,150,200]] 115 | values=[initial_learning_rate*decay for decay in [1,0.1,0.01,0.001]] 116 | learning_rate=tf.train.piecewise_constant( 117 | tf.cast(global_step,tf.int32),boundaries,values) 118 | elif params['learning_rate_policy']=='poly': 119 | learning_rate=tf.train.polynomial_decay( 120 | params['initial_learning_rate'], 121 | tf.cast(global_step,tf.int32)-params['initial_global_step'], 122 | params['max_iter'],params['end_learning_rate'],power=params['power']) 123 | else: 124 | raise ValueError('选择一个学习率模型啊') 125 | tf.identity(learning_rate,name='learning_rate') 126 | tf.summary.scalar('learning_rate',learning_rate) 127 | 128 | tf.identity(global_step,name='global_step') 129 | tf.summary.scalar('global_step',global_step) 130 | optimizer=tf.train.MomentumOptimizer(learning_rate=learning_rate, 131 | momentum=params['momentum']) 132 | #BN需相关更新 133 | update_ops=tf.get_collection(tf.GraphKeys.UPDATE_OPS) 134 | with tf.control_dependencies(update_ops): 135 | train_op=optimizer.minimize(loss,global_step,var_list=train_var_list) 136 | else: 137 | train_op=None 138 | 139 | #准确率和平均iou计算 140 | accuracy=tf.metrics.accuracy(valid_labels,valid_preds) 141 | mean_iou=tf.metrics.mean_iou(valid_labels,valid_preds,params['num_classes']) 142 | metrics={'px_accuracy':accuracy,'mean_iou':mean_iou} 143 | 144 | tf.identity(accuracy[1],name='train_px_accuracy') 145 | tf.summary.scalar('train_px_accuracy',accuracy[1]) 146 | 147 | def compute_mean_iou(total_cm,name='mean_iou'): 148 | '''计算平均iou 149 | 参数: 150 | total_cm:混淆矩阵 151 | 返回值:平均iou 152 | ''' 153 | #分别计算按行按列总数,shape[num_classes] 154 | sum_over_row=tf.to_float(tf.reduce_sum(total_cm,0)) 155 | sum_over_col=tf.to_float(tf.reduce_sum(total_cm,1)) 156 | #计算对角线即预测正确总数 157 | cm_diag=tf.to_float(tf.diag_part(total_cm)) 158 | #分母,shape[num_classes]代表每一个类别 159 | denominator=sum_over_row+sum_over_col-cm_diag 160 | 161 | #计算多少类别有预测值 162 | num_valid_entries=tf.reduce_sum(tf.cast( 163 | tf.not_equal(denominator,0),dtype=tf.float32)) 164 | #避免分母为0 165 | denominator=tf.where(tf.greater( 166 | denominator,0),denominator, 167 | tf.ones_like(denominator)) 168 | iou=tf.div(cm_diag,denominator) 169 | 170 | for i in range(params['num_classes']): 171 | tf.identity(iou[i],name='train_iou_class{}'.format(i)) 172 | tf.summary.scalar('train_iou_class{}'.format(i),iou[i]) 173 | result=tf.where( 174 | tf.greater(num_valid_entries,0), 175 | tf.reduce_sum(iou,name=name)/num_valid_entries, 176 | 0) 177 | return result 178 | train_mean_iou=compute_mean_iou(mean_iou[1]) 179 | tf.identity(train_mean_iou,name='train_mean_iou') 180 | tf.summary.scalar('train_mean_iou',train_mean_iou) 181 | return tf.estimator.EstimatorSpec( 182 | mode=mode, 183 | predictions=predictions, 184 | loss=loss, 185 | train_op=train_op, 186 | eval_metric_ops=metrics) 187 | 188 | 189 | # In[1]: 190 | 191 | 192 | def model_generator(num_classes,output_stride, 193 | base_architecture, 194 | pre_trained_model, 195 | batch_norm_decay, 196 | data_format='channels_last'): 197 | '''模型主程序 198 | 参数: 199 | num_classes:类别 200 | output_stride:resnet的步长还和空洞卷积膨胀系数有关,若为16,系数为[6,12,18],为8,系数翻倍 201 | base_architecture:resnet的重载模型 202 | pre_trained_model:预训练模型目录 203 | batch_norm_decay:BN层的系数 204 | data_format:输入图片的格式,RGB通道在最前还是最后 205 | 返回值: 206 | 返回预测值shape[batch,h,w,num_classes] 207 | ''' 208 | if data_format is None: 209 | pass 210 | if batch_norm_decay is None: 211 | batch_norm_decay=_BATH_NORM_DECAY 212 | if base_architecture not in ['resnet_v2_50','resnet_v2_101']: 213 | raise ValueError('重载模型没整对') 214 | if base_architecture =='resnet_v2_50': 215 | base_model=resnet_v2.resnet_v2_50 216 | else: 217 | base_model=resnet_v2.resnet_v2_101 218 | #建立模型 219 | def model(inputs,is_training): 220 | #统一输入格式为RGB通道放最后 221 | if data_format=='channels_first': 222 | inputs=tf.transpose(inputs,[0,3,1,2]) 223 | 224 | #重载resnet 225 | with slim.arg_scope(resnet_v2.resnet_arg_scope(batch_norm_decay=batch_norm_decay)): 226 | logits,end_points=base_model(inputs, 227 | num_classes=None, 228 | is_training=is_training, 229 | global_pool=False, 230 | output_stride=output_stride) 231 | if is_training: 232 | #重载权重 233 | exclude=[base_architecture+'/logits','global_step'] 234 | variables_to_restore=slim.get_variables_to_restore(exclude=exclude) 235 | tf.train.init_from_checkpoint(pre_trained_model, 236 | {v.name.split(':')[0]: v for v in variables_to_restore}) 237 | inputs_size=tf.shape(inputs)[1:3] 238 | #取一个resnet网络节点 239 | net=end_points[base_architecture+'/block4'] 240 | #resnet节点经过ASPP作为编码输出 241 | encoder_output=atrous_spatial_pyramid_pooling(net,output_stride,batch_norm_decay,is_training) 242 | 243 | #解码将图片恢复原来大小 244 | with tf.variable_scope('decoder'): 245 | with slim.arg_scope(resnet_v2.resnet_arg_scope(batch_norm_decay=batch_norm_decay)): 246 | # with slim.arg_scope([slim.conv2d], 247 | # weights_initializer=slim.xavier_initializer(), 248 | 249 | # normalizer_fn=slim.batch_norm, 250 | # normalizer_params={'is_training': is_training, 'decay': batch_norm_decay}): 251 | with tf.variable_scope('low_level_features'): 252 | #又搞来一个节点 253 | low_level_features=end_points[base_architecture+'/block1/unit_3/bottleneck_v2/conv1'] 254 | low_level_features=slim.conv2d(low_level_features,48,[1,1],stride=1,scope='conv_1x1') 255 | low_level_features_size=tf.shape(low_level_features)[1:3] 256 | 257 | with tf.variable_scope('upsampling_logits'): 258 | #上采样成输入大小 259 | net=tf.image.resize_bilinear(encoder_output,low_level_features_size,name='upsample_1') 260 | net=tf.concat([net,low_level_features],axis=3,name='concat') 261 | net=slim.conv2d(net,256,[3,3],stride=1,scope='conv_3x3_1') 262 | net=slim.conv2d(net,256,[3,3],stride=1,scope='conv_3x3_2') 263 | net=slim.conv2d(net,num_classes,[1,1],activation_fn=None,normalizer_fn=None,scope='conv_1x1') 264 | logits=tf.image.resize_bilinear(net,inputs_size,name='upsample_2') 265 | return logits 266 | return model 267 | 268 | 269 | # In[7]: 270 | 271 | 272 | def atrous_spatial_pyramid_pooling(inputs,output_stride, 273 | batch_norm_decay,is_training,depth=256): 274 | '''实现ASPP 275 | 参数: 276 | inputs:输入四维向量 277 | output_stride:决定空洞卷积膨胀率 278 | batch_norm_decay:同上函数 279 | is_training:是否训练 280 | depth:输出通道数 281 | 返回值: 282 | ASPP后的输出 283 | ''' 284 | with tf.variable_scope('aspp'): 285 | if output_stride not in [8,16]: 286 | raise ValueError('out_stride整错了') 287 | #膨胀率 288 | atrous_rates=[6,12,18] 289 | if output_stride ==8: 290 | atrous_rates=[2*rate for rate in atrous_rates] 291 | with slim.arg_scope(resnet_v2.resnet_arg_scope(batch_norm_decay=batch_norm_decay)): 292 | with slim.arg_scope([slim.conv2d], 293 | weights_initializer=slim.xavier_initializer(), 294 | 295 | normalizer_fn=slim.batch_norm, 296 | normalizer_params={'is_training': is_training, 'decay': batch_norm_decay}): 297 | inputs_size=tf.shape(inputs)[1:3] 298 | #slim.conv2d默认激活函数为relu,padding=SAME 299 | conv_1x1=slim.conv2d(inputs,depth,[1,1],stride=1,scope='conv_1x1') 300 | #空洞卷积rate不为1 301 | conv_3x3_1=slim.conv2d(inputs,depth,[3,3],stride=1,rate=atrous_rates[0],scope='conv_3x3_1') 302 | conv_3x3_2=slim.conv2d(inputs,depth,[3,3],stride=1,rate=atrous_rates[1],scope='conv_3x3_2') 303 | conv_3x3_3=slim.conv2d(inputs,depth,[3,3],stride=1,rate=atrous_rates[2],scope='conv_3x3_3') 304 | with tf.variable_scope('image_level_features'): 305 | #池化 306 | image_level_features=tf.reduce_mean(inputs,axis=[1,2],keep_dims=True,name='global_average_pooling') 307 | image_level_features=slim.conv2d(image_level_features,depth,[1,1],stride=1,scope='conv_1x1') 308 | #双线性插值 309 | image_level_features=tf.image.resize_bilinear(image_level_features,inputs_size,name='upsample') 310 | net=tf.concat([conv_1x1,conv_3x3_1,conv_3x3_2,conv_3x3_3,image_level_features],axis=3,name='concat') 311 | return net 312 | 313 | -------------------------------------------------------------------------------- /utils/preprocessing.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[1]: 5 | 6 | 7 | ''' 主要进行相关数据预处理''' 8 | from PIL import Image 9 | import numpy as np 10 | import tensorflow as tf 11 | 12 | #三色通道的平均值 13 | _R_MEAN=123.68 14 | _G_MEAN=116.78 15 | _B_MEAN=103.94 16 | 17 | #主要为各分类上色 18 | label_colors=[(0,0,0),#0=背景 19 | #1=飞机, 2=自行车, 3=鸟, 4=船, 5=瓶子 20 | (128,0,0),(0,128,0),(128,128,0),(0,0,128),(128,0,128), 21 | #6=公交车, 7=小汽车, 8=猫, 9=椅子, 10=牛 22 | (0,128,128),(128,128,128),(64,0,0),(192,0,0),(64,128,0), 23 | #11=晚饭桌, 12=狗, 13=马, 14=摩托车, 15=人 24 | (192,128,0),(64,0,128),(192,0,128),(64,128,128),(192,128,128), 25 | #16=盆栽, 17=羊, 18=沙发, 19=火车, 20=电视或显示屏 26 | (0,64,0),(128,64,0),(0,192,0),(128,192,0),(0,64,128)] 27 | 28 | 29 | # In[3]: 30 | 31 | 32 | def decode_labels(mask,num_image=1,num_classes=21): 33 | '''给图片上色 34 | 参数: 35 | mask:shape是[batch,h,w,1]像素值为每一个像素点的类别 36 | num_image:每次处理图片的长数 37 | num_classes:分类类别数 38 | 返回值: 39 | 返回被上色的分割图像 40 | ''' 41 | n,h,w,c=mask.shape 42 | assert (n>=num_image),'num_image %d 不能比批次 %d 大' %(n,num_image) 43 | outputs=np.zeros((num_image,h,w,3),dtype=np.uint8) 44 | for i in range(num_image): 45 | #定义一个长宽为h,w的rgb图像 46 | img=Image.new('RGB',(len(mask[i,0]),len(mask[i]))) 47 | pixels=img.load() 48 | for j_,j in enumerate(mask[i,:,:,0]): 49 | for k_,k in enumerate(j): 50 | #如果类别在区间内,给图片上色 51 | if k=max_scale: 124 | raise ValueError('尺度大小搞错了') 125 | shape=tf.shape(image) 126 | height=tf.to_float(shape[0]) 127 | width=tf.to_float(shape[1]) 128 | #生成随机尺度 129 | scale=tf.random_uniform([],minval=min_scale,maxval=max_scale,dtype=tf.float32) 130 | 131 | new_height=tf.to_int32(height*scale) 132 | new_width=tf.to_int32(width*scale) 133 | #双线性插值 134 | image=tf.image.resize_images(image,[new_height,new_width], 135 | method=tf.image.ResizeMethod.BILINEAR) 136 | #最近邻 137 | label=tf.image.resize_images(label,[new_height,new_width], 138 | method=tf.image.ResizeMethod.NEAREST_NEIGHBOR) 139 | return image,label 140 | 141 | 142 | # In[9]: 143 | 144 | 145 | def random_crop_or_pad_image_and_label(image,label,crop_height,crop_width,ignore_label): 146 | '''随机裁剪填补图像 147 | 参数: 148 | image:输入图像[h,w,c] 149 | label:输出label[h,w,1] 150 | crop_height,crop_width:新图像尺寸 151 | ignore_label:被忽略的类别 152 | 返回值: 153 | 处理后的image,label 154 | ''' 155 | #因为0填充所以要把0减去,否则填充之后原来的0就变成1了 156 | label=label-ignore_label 157 | label=tf.to_float(label) 158 | shape=tf.shape(image) 159 | height=shape[0] 160 | width=shape[1] 161 | image_and_label=tf.concat([image,label],axis=2) 162 | image_and_label_pad=tf.image.pad_to_bounding_box( 163 | image_and_label,0,0, 164 | tf.maximum(crop_height,height), 165 | tf.maximum(crop_width,width)) 166 | image_and_label_crop=tf.random_crop( 167 | image_and_label_pad,[crop_height,crop_width,4]) 168 | image_crop=image_and_label_crop[:,:,:3] 169 | label_crop=image_and_label_crop[:,:,3:] 170 | label_crop+=ignore_label 171 | label_crop=tf.to_int32(label_crop) 172 | return image_crop,label_crop 173 | 174 | 175 | # In[10]: 176 | 177 | 178 | def random_filp_left_right_image_and_label(image,label): 179 | '''随机左右翻转图像 180 | 参数: 181 | image:输入图像[h,w,c] 182 | label:输出label[h,w,1] 183 | 返回值: 184 | 处理后的image,label 185 | ''' 186 | uniform_random=tf.random_uniform([],0,1.0) 187 | #对比阈值决定翻转 188 | mirror_cond=tf.less(uniform_random,0.5) 189 | #tf.cond是判断语句依据概率来翻转 190 | image=tf.cond(mirror_cond,lambda: tf.reverse(image,[1]),lambda:image) 191 | label=tf.cond(mirror_cond,lambda:tf.reverse(label,[1]),lambda:label) 192 | return image,label 193 | 194 | 195 | 196 | # In[11]: 197 | 198 | 199 | def eval_input_fn(image_filenames,label_filenames=None,batch_size=1): 200 | '''将图像文件夹处理成模型接收data格式 201 | 参数: 202 | image_filenames:图片目录 203 | label_filenames:测试数据没有label 204 | 把batch_size:测试默认batch为1 205 | 返回值: 206 | data形式的数据包含image和label 207 | ''' 208 | #读取文件中的图片 209 | def _parse_function(filename,is_label): 210 | #is_label对于测试数据为None 211 | if not is_label: 212 | image_filename,label_filename=filename,None 213 | else : 214 | image_filename,label_filename=filename 215 | image_string=tf.read_file(image_filename) 216 | image=tf.image.decode_image(image_string) 217 | image=tf.to_float(tf.image.convert_image_dtype(image,dtype=tf.uint8)) 218 | image.set_shape([None,None,3]) 219 | image=mean_image_subtraction(image) 220 | if not is_label: 221 | return image 222 | else: 223 | label_string = tf.read_file(label_filename) 224 | label = tf.image.decode_image(label_string) 225 | label = tf.to_int32(tf.image.convert_image_dtype(label, dtype=tf.uint8)) 226 | label.set_shape([None, None, 1]) 227 | return image,label 228 | if label_filenames is None: 229 | input_filenames=image_filenames 230 | else: 231 | input_filenames=(image_filenames,label_filenames) 232 | #生成data格式 233 | dataset=tf.data.Dataset.from_tensor_slices(input_filenames) 234 | if label_filenames is None: 235 | dataset=dataset.map(lambda x: _parse_function(x,False)) 236 | else: 237 | dataset=dataset.map(lambda x,y:_parse_function((x,y),True)) 238 | dataset=dataset.prefetch(batch_size)#和batch一起用加快处理速度 239 | dataset=dataset.batch(batch_size) 240 | #生成迭代器 241 | iterator=dataset.make_one_shot_iterator() 242 | if label_filenames is None: 243 | images=iterator.get_next() 244 | labels=None 245 | else: 246 | images,labels=iterator.get_next() 247 | return images,labels 248 | 249 | --------------------------------------------------------------------------------