In [1]:
import cv2
import itertools
import matplotlib.pyplot as plt
%matplotlib inline

In [2]:
fs = cv2.FileStorage()

In [3]:
fs.open("D:\\mhmodels_old\\models\\00955.yml.gz", cv2.FileStorage_READ)


Out[3]:
True

In [4]:
depth_img = fs.getNode("depth_img").mat()

In [5]:
uv_space = fs.getNode("uv_space").mat()

In [6]:
segmentation = fs.getNode("segmentation").mat()

In [7]:
import numpy as np

In [8]:
np.max(depth_img)


Out[8]:
1110

In [9]:
plt.imshow(depth_img, cmap='gray')


Out[9]:
<matplotlib.image.AxesImage at 0x1a43915a9e8>

In [10]:
plt.imshow(uv_space[:,:, 0])


Out[10]:
<matplotlib.image.AxesImage at 0x1a4391c7b70>

In [11]:
plt.imshow(uv_space[:,:, 1])


Out[11]:
<matplotlib.image.AxesImage at 0x1a439207da0>

In [12]:
plt.imshow(segmentation[:,:, 0])


Out[12]:
<matplotlib.image.AxesImage at 0x1a43e607828>

In [15]:
segmentation.shape


Out[15]:
(512, 512, 2)

In [16]:
plt.imshow(segmentation[:,:, 1])


Out[16]:
<matplotlib.image.AxesImage at 0x1a43e67af28>

Prepare data


In [49]:
NUM_OF_BINS = 20
IMG_WIDTH = 128
IMG_HEIGHT = 128

BATCH_SIZE = 32

N_CLASSES = NUM_OF_BINS + 1

In [50]:
# Try with horizontal segmetation first
segmentation[:, :, 0].shape # shape (512, 512) ==> want 262144 x N_CLASSES


Out[50]:
(256, 256)

In [51]:
def get_segmentation_labels(data, width, height, n_classes):
    labels = np.zeros( (width, height, n_classes))
    
    for c in range(n_classes):
        labels[:, :, c] = (data == c).astype(int)
    
    labels = np.reshape(labels, (width * height, n_classes))
    return labels

In [52]:
test_labels = get_segmentation_labels(segmentation[:, :, 0], IMG_WIDTH, IMG_HEIGHT, N_CLASSES)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-52-81f8af949a84> in <module>()
----> 1 test_labels = get_segmentation_labels(segmentation[:, :, 0], IMG_WIDTH, IMG_HEIGHT, N_CLASSES)

<ipython-input-51-a1aa18285ba2> in get_segmentation_labels(data, width, height, n_classes)
      3 
      4     for c in range(n_classes):
----> 5         labels[:, :, c] = (data == c).astype(int)
      6 
      7     labels = np.reshape(labels, (width * height, n_classes))

ValueError: could not broadcast input array from shape (256,256) into shape (128,128)

In [34]:
segmentation[300, 280, 0]


---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-34-98f389f4112c> in <module>()
----> 1 segmentation[300, 280, 0]

IndexError: index 300 is out of bounds for axis 0 with size 256

In [35]:
segmentation[300, 320, 0]


---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-35-2e5c46fceef4> in <module>()
----> 1 segmentation[300, 320, 0]

IndexError: index 300 is out of bounds for axis 0 with size 256

In [36]:
test_labels[300*512 + 320, 12]


---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-36-c4a574391c5a> in <module>()
----> 1 test_labels[300*512 + 320, 12]

IndexError: index 153920 is out of bounds for axis 0 with size 65536

Preprocessing


In [37]:
list_paths = [line.strip() for line in open("D:\\mhmodels_hd\\list.txt")]

Save depth_img & horizontal segmentation -> npy


In [53]:
for path in list_paths:
    yml_path = path + ".yml.gz"
    out_depth_path = path + "_depth.npy"
    out_h_seg_path = path + "_h_seg.npy"
    
    out_depth_png_path = path + "_depth_128.png"
    out_h_seg_png_path = path + "_h_seg_128.png"
    
    print("path", path)
    print("1", datetime.now())
    fs = cv2.FileStorage()
    fs.open(yml_path, cv2.FileStorage_READ)
    print("2", datetime.now())
    depth_img = fs.getNode("depth_img").mat()
    segmentation = fs.getNode("segmentation").mat()
    print("3", datetime.now())            
    depth_img = cv2.resize(depth_img, (IMG_WIDTH, IMG_HEIGHT))
    segmentation = cv2.resize(segmentation, (IMG_WIDTH, IMG_HEIGHT))
    
    h_seg_labels = get_segmentation_labels(segmentation[:, :, 0], IMG_WIDTH, IMG_HEIGHT, N_CLASSES)
    
    print(depth_img.shape)
    print(segmentation.shape)
    print(h_seg_labels.shape)
    print("4", datetime.now())
    
#     np.save(out_depth_path, depth_img)
#     np.save(out_h_seg_path, h_seg_labels)
    
    
    
    cv2.imwrite(out_depth_png_path, depth_img)
    cv2.imwrite(out_h_seg_png_path, h_seg_labels)
    
    print("-----")


path D:\mhmodels_old\models\00007
1 2018-03-02 15:38:50.202164
2 2018-03-02 15:38:50.385022
3 2018-03-02 15:38:50.385022
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:50.385022
-----
path D:\mhmodels_old\models\00015
1 2018-03-02 15:38:50.385022
2 2018-03-02 15:38:50.568514
3 2018-03-02 15:38:50.568514
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:50.584136
-----
path D:\mhmodels_old\models\00034
1 2018-03-02 15:38:50.715594
2 2018-03-02 15:38:50.900003
3 2018-03-02 15:38:50.900003
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:50.900003
-----
path D:\mhmodels_old\models\00036
1 2018-03-02 15:38:50.900003
2 2018-03-02 15:38:51.100879
3 2018-03-02 15:38:51.106407
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:51.111419
-----
path D:\mhmodels_old\models\00044
1 2018-03-02 15:38:51.140073
2 2018-03-02 15:38:51.331351
3 2018-03-02 15:38:51.335397
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:51.339397
-----
path D:\mhmodels_old\models\00046
1 2018-03-02 15:38:51.343417
2 2018-03-02 15:38:51.522624
3 2018-03-02 15:38:51.523127
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:51.523127
-----
path D:\mhmodels_old\models\00052
1 2018-03-02 15:38:51.523127
2 2018-03-02 15:38:51.723115
3 2018-03-02 15:38:51.727162
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:51.731137
-----
path D:\mhmodels_old\models\00053
1 2018-03-02 15:38:51.735167
2 2018-03-02 15:38:51.928665
3 2018-03-02 15:38:51.933177
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:51.936688
-----
path D:\mhmodels_old\models\00074
1 2018-03-02 15:38:51.941702
2 2018-03-02 15:38:52.174342
3 2018-03-02 15:38:52.180358
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:52.184369
-----
path D:\mhmodels_old\models\00077
1 2018-03-02 15:38:52.189410
2 2018-03-02 15:38:52.374447
3 2018-03-02 15:38:52.394040
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:52.398052
-----
path D:\mhmodels_old\models\00092
1 2018-03-02 15:38:52.402086
2 2018-03-02 15:38:52.582681
3 2018-03-02 15:38:52.587700
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:52.591189
-----
path D:\mhmodels_old\models\00096
1 2018-03-02 15:38:52.594688
2 2018-03-02 15:38:52.762656
3 2018-03-02 15:38:52.781332
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:52.784299
-----
path D:\mhmodels_old\models\00100
1 2018-03-02 15:38:52.784299
2 2018-03-02 15:38:52.969674
3 2018-03-02 15:38:52.973684
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:52.978197
-----
path D:\mhmodels_old\models\00102
1 2018-03-02 15:38:52.983711
2 2018-03-02 15:38:53.191842
3 2018-03-02 15:38:53.195852
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:53.198860
-----
path D:\mhmodels_old\models\00103
1 2018-03-02 15:38:53.203874
2 2018-03-02 15:38:53.384779
3 2018-03-02 15:38:53.384779
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:53.400432
-----
path D:\mhmodels_old\models\00105
1 2018-03-02 15:38:53.408323
2 2018-03-02 15:38:53.613872
3 2018-03-02 15:38:53.618886
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:53.622896
-----
path D:\mhmodels_old\models\00107
1 2018-03-02 15:38:53.627944
2 2018-03-02 15:38:53.800396
3 2018-03-02 15:38:53.800396
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:53.816021
-----
path D:\mhmodels_old\models\00124
1 2018-03-02 15:38:53.822170
2 2018-03-02 15:38:54.064075
3 2018-03-02 15:38:54.071605
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:54.076116
-----
path D:\mhmodels_old\models\00132
1 2018-03-02 15:38:54.081630
2 2018-03-02 15:38:54.247648
3 2018-03-02 15:38:54.263271
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:54.263271
-----
path D:\mhmodels_old\models\00142
1 2018-03-02 15:38:54.263271
2 2018-03-02 15:38:54.467634
3 2018-03-02 15:38:54.472189
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:54.475163
-----
path D:\mhmodels_old\models\00143
1 2018-03-02 15:38:54.505069
2 2018-03-02 15:38:54.731489
3 2018-03-02 15:38:54.736493
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:54.739501
-----
path D:\mhmodels_old\models\00144
1 2018-03-02 15:38:54.744513
2 2018-03-02 15:38:54.943246
3 2018-03-02 15:38:54.950277
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:54.953251
-----
path D:\mhmodels_old\models\00145
1 2018-03-02 15:38:54.958262
2 2018-03-02 15:38:55.132162
3 2018-03-02 15:38:55.132162
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:55.132162
-----
path D:\mhmodels_old\models\00146
1 2018-03-02 15:38:55.132162
2 2018-03-02 15:38:55.316902
3 2018-03-02 15:38:55.316902
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:55.316902
-----
path D:\mhmodels_old\models\00147
1 2018-03-02 15:38:55.341114
2 2018-03-02 15:38:55.548031
3 2018-03-02 15:38:55.552041
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:55.557021
-----
path D:\mhmodels_old\models\00152
1 2018-03-02 15:38:55.562050
2 2018-03-02 15:38:55.775087
3 2018-03-02 15:38:55.780092
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:55.783576
-----
path D:\mhmodels_old\models\00155
1 2018-03-02 15:38:55.788113
2 2018-03-02 15:38:55.964111
3 2018-03-02 15:38:55.964111
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:55.964111
-----
path D:\mhmodels_old\models\00156
1 2018-03-02 15:38:55.964111
2 2018-03-02 15:38:56.233259
3 2018-03-02 15:38:56.233259
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:56.233259
-----
path D:\mhmodels_old\models\00158
1 2018-03-02 15:38:56.248886
2 2018-03-02 15:38:56.433214
3 2018-03-02 15:38:56.433214
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:56.433214
-----
path D:\mhmodels_old\models\00160
1 2018-03-02 15:38:56.452206
2 2018-03-02 15:38:56.633294
3 2018-03-02 15:38:56.648915
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:56.648915
-----
path D:\mhmodels_old\models\00166
1 2018-03-02 15:38:56.648915
2 2018-03-02 15:38:56.857259
3 2018-03-02 15:38:56.873395
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:56.876917
-----
path D:\mhmodels_old\models\00169
1 2018-03-02 15:38:56.881415
2 2018-03-02 15:38:57.064744
3 2018-03-02 15:38:57.071902
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:57.075412
-----
path D:\mhmodels_old\models\00170
1 2018-03-02 15:38:57.079923
2 2018-03-02 15:38:57.264878
3 2018-03-02 15:38:57.264878
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:57.264878
-----
path D:\mhmodels_old\models\00187
1 2018-03-02 15:38:57.264878
2 2018-03-02 15:38:57.449639
3 2018-03-02 15:38:57.449639
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:57.465267
-----
path D:\mhmodels_old\models\00191
1 2018-03-02 15:38:57.465267
2 2018-03-02 15:38:57.663105
3 2018-03-02 15:38:57.668140
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:57.672656
-----
path D:\mhmodels_old\models\00196
1 2018-03-02 15:38:57.676701
2 2018-03-02 15:38:57.890317
3 2018-03-02 15:38:57.896332
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:57.900343
-----
path D:\mhmodels_old\models\00197
1 2018-03-02 15:38:57.907361
2 2018-03-02 15:38:58.087271
3 2018-03-02 15:38:58.087271
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:58.087271
-----
path D:\mhmodels_old\models\00204
1 2018-03-02 15:38:58.102924
2 2018-03-02 15:38:58.337980
3 2018-03-02 15:38:58.344998
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:58.351017
-----
path D:\mhmodels_old\models\00208
1 2018-03-02 15:38:58.358034
2 2018-03-02 15:38:58.534207
3 2018-03-02 15:38:58.534207
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:58.534207
-----
path D:\mhmodels_old\models\00221
1 2018-03-02 15:38:58.549829
2 2018-03-02 15:38:58.750110
3 2018-03-02 15:38:58.759428
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:58.762436
-----
path D:\mhmodels_old\models\00222
1 2018-03-02 15:38:58.767450
2 2018-03-02 15:38:58.986813
3 2018-03-02 15:38:58.994531
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:59.000546
-----
path D:\mhmodels_old\models\00230
1 2018-03-02 15:38:59.007564
2 2018-03-02 15:38:59.219213
3 2018-03-02 15:38:59.223245
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:59.227221
-----
path D:\mhmodels_old\models\00231
1 2018-03-02 15:38:59.231265
2 2018-03-02 15:38:59.427823
3 2018-03-02 15:38:59.432836
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:59.435845
-----
path D:\mhmodels_old\models\00233
1 2018-03-02 15:38:59.441892
2 2018-03-02 15:38:59.631311
3 2018-03-02 15:38:59.636322
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:59.639296
-----
path D:\mhmodels_old\models\00236
1 2018-03-02 15:38:59.644309
2 2018-03-02 15:38:59.860506
3 2018-03-02 15:38:59.865533
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:38:59.869532
-----
path D:\mhmodels_old\models\00238
1 2018-03-02 15:38:59.874046
2 2018-03-02 15:39:00.098138
3 2018-03-02 15:39:00.104189
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:00.107162
-----
path D:\mhmodels_old\models\00240
1 2018-03-02 15:39:00.112177
2 2018-03-02 15:39:00.288800
3 2018-03-02 15:39:00.288800
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:00.288800
-----
path D:\mhmodels_old\models\00249
1 2018-03-02 15:39:00.304430
2 2018-03-02 15:39:00.549470
3 2018-03-02 15:39:00.552932
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:00.552932
-----
path D:\mhmodels_old\models\00253
1 2018-03-02 15:39:00.552932
2 2018-03-02 15:39:00.742062
3 2018-03-02 15:39:00.746079
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:00.749559
-----
path D:\mhmodels_old\models\00262
1 2018-03-02 15:39:00.786498
2 2018-03-02 15:39:00.974188
3 2018-03-02 15:39:00.974188
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:00.974188
-----
path D:\mhmodels_old\models\00265
1 2018-03-02 15:39:00.997236
2 2018-03-02 15:39:01.190442
3 2018-03-02 15:39:01.211104
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:01.214112
-----
path D:\mhmodels_old\models\00266
1 2018-03-02 15:39:01.220130
2 2018-03-02 15:39:01.406243
3 2018-03-02 15:39:01.406243
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:01.406243
-----
path D:\mhmodels_old\models\00267
1 2018-03-02 15:39:01.406243
2 2018-03-02 15:39:01.600342
3 2018-03-02 15:39:01.604359
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:01.605452
-----
path D:\mhmodels_old\models\00269
1 2018-03-02 15:39:01.605452
2 2018-03-02 15:39:01.775469
3 2018-03-02 15:39:01.791104
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:01.791104
-----
path D:\mhmodels_old\models\00275
1 2018-03-02 15:39:01.791104
2 2018-03-02 15:39:01.990752
3 2018-03-02 15:39:01.990752
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:02.006383
-----
path D:\mhmodels_old\models\00276
1 2018-03-02 15:39:02.006383
2 2018-03-02 15:39:02.220004
3 2018-03-02 15:39:02.226033
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:02.230031
-----
path D:\mhmodels_old\models\00284
1 2018-03-02 15:39:02.235044
2 2018-03-02 15:39:02.406948
3 2018-03-02 15:39:02.406948
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:02.422546
-----
path D:\mhmodels_old\models\00285
1 2018-03-02 15:39:02.429422
2 2018-03-02 15:39:02.670110
3 2018-03-02 15:39:02.685738
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:02.685738
-----
path D:\mhmodels_old\models\00291
1 2018-03-02 15:39:02.685738
2 2018-03-02 15:39:02.880001
3 2018-03-02 15:39:02.884012
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:02.887999
-----
path D:\mhmodels_old\models\00293
1 2018-03-02 15:39:02.893010
2 2018-03-02 15:39:03.098081
3 2018-03-02 15:39:03.103106
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:03.107141
-----
path D:\mhmodels_old\models\00298
1 2018-03-02 15:39:03.112152
2 2018-03-02 15:39:03.292291
3 2018-03-02 15:39:03.313286
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:03.319266
-----
path D:\mhmodels_old\models\00301
1 2018-03-02 15:39:03.327286
2 2018-03-02 15:39:03.531710
3 2018-03-02 15:39:03.535727
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:03.539697
-----
path D:\mhmodels_old\models\00304
1 2018-03-02 15:39:03.543707
2 2018-03-02 15:39:03.742389
3 2018-03-02 15:39:03.747924
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:03.750933
-----
path D:\mhmodels_old\models\00307
1 2018-03-02 15:39:03.755982
2 2018-03-02 15:39:03.933329
3 2018-03-02 15:39:03.952976
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:03.956987
-----
path D:\mhmodels_old\models\00309
1 2018-03-02 15:39:03.962016
2 2018-03-02 15:39:04.164160
3 2018-03-02 15:39:04.169151
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:04.174163
-----
path D:\mhmodels_old\models\00310
1 2018-03-02 15:39:04.181182
2 2018-03-02 15:39:04.410293
3 2018-03-02 15:39:04.415306
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:04.418312
-----
path D:\mhmodels_old\models\00311
1 2018-03-02 15:39:04.424342
2 2018-03-02 15:39:04.624916
3 2018-03-02 15:39:04.629916
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:04.632924
-----
path D:\mhmodels_old\models\00315
1 2018-03-02 15:39:04.637970
2 2018-03-02 15:39:04.885115
3 2018-03-02 15:39:04.886429
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:04.886429
-----
path D:\mhmodels_old\models\00320
1 2018-03-02 15:39:04.886429
2 2018-03-02 15:39:05.085204
3 2018-03-02 15:39:05.090553
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:05.093585
-----
path D:\mhmodels_old\models\00321
1 2018-03-02 15:39:05.098575
2 2018-03-02 15:39:05.318416
3 2018-03-02 15:39:05.322427
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:05.327415
-----
path D:\mhmodels_old\models\00322
1 2018-03-02 15:39:05.332465
2 2018-03-02 15:39:05.554448
3 2018-03-02 15:39:05.558945
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:05.561946
-----
path D:\mhmodels_old\models\00326
1 2018-03-02 15:39:05.565502
2 2018-03-02 15:39:05.774924
3 2018-03-02 15:39:05.782945
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:05.787961
-----
path D:\mhmodels_old\models\00332
1 2018-03-02 15:39:05.792972
2 2018-03-02 15:39:06.012655
3 2018-03-02 15:39:06.016639
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:06.020657
-----
path D:\mhmodels_old\models\00360
1 2018-03-02 15:39:06.026673
2 2018-03-02 15:39:06.211021
3 2018-03-02 15:39:06.211021
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:06.211021
-----
path D:\mhmodels_old\models\00361
1 2018-03-02 15:39:06.232463
2 2018-03-02 15:39:06.472367
3 2018-03-02 15:39:06.477383
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:06.481392
-----
path D:\mhmodels_old\models\00363
1 2018-03-02 15:39:06.486406
2 2018-03-02 15:39:06.694016
3 2018-03-02 15:39:06.699027
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:06.703057
-----
path D:\mhmodels_old\models\00374
1 2018-03-02 15:39:06.709072
2 2018-03-02 15:39:06.951777
3 2018-03-02 15:39:06.957793
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:06.961804
-----
path D:\mhmodels_old\models\00375
1 2018-03-02 15:39:06.965900
2 2018-03-02 15:39:07.167943
3 2018-03-02 15:39:07.172951
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:07.175953
-----
path D:\mhmodels_old\models\00380
1 2018-03-02 15:39:07.180964
2 2018-03-02 15:39:07.400640
3 2018-03-02 15:39:07.406643
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:07.410681
-----
path D:\mhmodels_old\models\00381
1 2018-03-02 15:39:07.416704
2 2018-03-02 15:39:07.644478
3 2018-03-02 15:39:07.650505
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:07.653974
-----
path D:\mhmodels_old\models\00390
1 2018-03-02 15:39:07.659009
2 2018-03-02 15:39:07.843333
3 2018-03-02 15:39:07.843333
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:07.843333
-----
path D:\mhmodels_old\models\00392
1 2018-03-02 15:39:07.843333
2 2018-03-02 15:39:08.043645
3 2018-03-02 15:39:08.043645
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:08.043645
-----
path D:\mhmodels_old\models\00396
1 2018-03-02 15:39:08.043645
2 2018-03-02 15:39:08.227713
3 2018-03-02 15:39:08.227713
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:08.227713
-----
path D:\mhmodels_old\models\00397
1 2018-03-02 15:39:08.243334
2 2018-03-02 15:39:08.428260
3 2018-03-02 15:39:08.428260
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:08.428260
-----
path D:\mhmodels_old\models\00398
1 2018-03-02 15:39:08.443866
2 2018-03-02 15:39:08.684007
3 2018-03-02 15:39:08.687344
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:08.687344
-----
path D:\mhmodels_old\models\00399
1 2018-03-02 15:39:08.687344
2 2018-03-02 15:39:08.866264
3 2018-03-02 15:39:08.881916
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:08.881916
-----
path D:\mhmodels_old\models\00417
1 2018-03-02 15:39:08.881916
2 2018-03-02 15:39:09.128659
3 2018-03-02 15:39:09.128659
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:09.128659
-----
path D:\mhmodels_old\models\00433
1 2018-03-02 15:39:09.144280
2 2018-03-02 15:39:09.313218
3 2018-03-02 15:39:09.313218
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:09.313218
-----
path D:\mhmodels_old\models\00434
1 2018-03-02 15:39:09.334144
2 2018-03-02 15:39:09.513217
3 2018-03-02 15:39:09.513217
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:09.528819
-----
path D:\mhmodels_old\models\00435
1 2018-03-02 15:39:09.528819
2 2018-03-02 15:39:09.744674
3 2018-03-02 15:39:09.744674
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:09.744674
-----
path D:\mhmodels_old\models\00436
1 2018-03-02 15:39:09.764850
2 2018-03-02 15:39:09.951670
3 2018-03-02 15:39:09.959189
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:09.962698
-----
path D:\mhmodels_old\models\00438
1 2018-03-02 15:39:09.966242
2 2018-03-02 15:39:10.145067
3 2018-03-02 15:39:10.145067
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:10.145067
-----
path D:\mhmodels_old\models\00441
1 2018-03-02 15:39:10.145067
2 2018-03-02 15:39:10.341736
3 2018-03-02 15:39:10.345753
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:10.348730
-----
path D:\mhmodels_old\models\00442
1 2018-03-02 15:39:10.352743
2 2018-03-02 15:39:10.513990
3 2018-03-02 15:39:10.513990
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:10.529594
-----
path D:\mhmodels_old\models\00446
1 2018-03-02 15:39:10.529594
2 2018-03-02 15:39:10.761697
3 2018-03-02 15:39:10.766687
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:10.767691
-----
path D:\mhmodels_old\models\00479
1 2018-03-02 15:39:10.767691
2 2018-03-02 15:39:10.945682
3 2018-03-02 15:39:10.964356
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:10.969105
-----
path D:\mhmodels_old\models\00484
1 2018-03-02 15:39:10.974119
2 2018-03-02 15:39:11.189341
3 2018-03-02 15:39:11.197359
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:11.203376
-----
path D:\mhmodels_old\models\00488
1 2018-03-02 15:39:11.209393
2 2018-03-02 15:39:11.403894
3 2018-03-02 15:39:11.408908
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:11.412953
-----
path D:\mhmodels_old\models\00489
1 2018-03-02 15:39:11.417955
2 2018-03-02 15:39:11.598737
3 2018-03-02 15:39:11.598737
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:11.598737
-----
path D:\mhmodels_old\models\00490
1 2018-03-02 15:39:11.598737
2 2018-03-02 15:39:11.814512
3 2018-03-02 15:39:11.814512
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:11.830139
-----
path D:\mhmodels_old\models\00493
1 2018-03-02 15:39:11.830139
2 2018-03-02 15:39:12.046464
3 2018-03-02 15:39:12.051480
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:12.054515
-----
path D:\mhmodels_old\models\00494
1 2018-03-02 15:39:12.058533
2 2018-03-02 15:39:12.230442
3 2018-03-02 15:39:12.230442
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:12.230442
-----
path D:\mhmodels_old\models\00503
1 2018-03-02 15:39:12.246037
2 2018-03-02 15:39:12.430528
3 2018-03-02 15:39:12.430528
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:12.430528
-----
path D:\mhmodels_old\models\00516
1 2018-03-02 15:39:12.446121
2 2018-03-02 15:39:12.636849
3 2018-03-02 15:39:12.642857
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:12.646340
-----
path D:\mhmodels_old\models\00521
1 2018-03-02 15:39:12.651863
2 2018-03-02 15:39:12.871518
3 2018-03-02 15:39:12.875530
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:12.878540
-----
path D:\mhmodels_old\models\00523
1 2018-03-02 15:39:12.884530
2 2018-03-02 15:39:13.082299
3 2018-03-02 15:39:13.087314
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:13.091330
-----
path D:\mhmodels_old\models\00533
1 2018-03-02 15:39:13.096372
2 2018-03-02 15:39:13.301983
3 2018-03-02 15:39:13.310002
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:13.315018
-----
path D:\mhmodels_old\models\00544
1 2018-03-02 15:39:13.321045
2 2018-03-02 15:39:13.535824
3 2018-03-02 15:39:13.539837
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:13.543398
-----
path D:\mhmodels_old\models\00545
1 2018-03-02 15:39:13.548324
2 2018-03-02 15:39:13.721351
3 2018-03-02 15:39:13.721351
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:13.721351
-----
path D:\mhmodels_old\models\00546
1 2018-03-02 15:39:13.739942
2 2018-03-02 15:39:13.958856
3 2018-03-02 15:39:13.963898
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:13.966878
-----
path D:\mhmodels_old\models\00548
1 2018-03-02 15:39:13.971947
2 2018-03-02 15:39:14.183877
3 2018-03-02 15:39:14.188868
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:14.192876
-----
path D:\mhmodels_old\models\00549
1 2018-03-02 15:39:14.196923
2 2018-03-02 15:39:14.375207
3 2018-03-02 15:39:14.375207
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:14.394390
-----
path D:\mhmodels_old\models\00558
1 2018-03-02 15:39:14.399422
2 2018-03-02 15:39:14.586537
3 2018-03-02 15:39:14.591042
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:14.594026
-----
path D:\mhmodels_old\models\00571
1 2018-03-02 15:39:14.599057
2 2018-03-02 15:39:14.783530
3 2018-03-02 15:39:14.787039
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:14.790548
-----
path D:\mhmodels_old\models\00577
1 2018-03-02 15:39:14.795586
2 2018-03-02 15:39:15.000361
3 2018-03-02 15:39:15.000361
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:15.000361
-----
path D:\mhmodels_old\models\00578
1 2018-03-02 15:39:15.016008
2 2018-03-02 15:39:15.225129
3 2018-03-02 15:39:15.231146
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:15.234191
-----
path D:\mhmodels_old\models\00583
1 2018-03-02 15:39:15.239191
2 2018-03-02 15:39:15.423721
3 2018-03-02 15:39:15.431241
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:15.439264
-----
path D:\mhmodels_old\models\00586
1 2018-03-02 15:39:15.447284
2 2018-03-02 15:39:15.672676
3 2018-03-02 15:39:15.676687
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:15.679661
-----
path D:\mhmodels_old\models\00594
1 2018-03-02 15:39:15.684708
2 2018-03-02 15:39:15.866306
3 2018-03-02 15:39:15.870323
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:15.873325
-----
path D:\mhmodels_old\models\00601
1 2018-03-02 15:39:15.878816
2 2018-03-02 15:39:16.096896
3 2018-03-02 15:39:16.101406
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:16.105418
-----
path D:\mhmodels_old\models\00605
1 2018-03-02 15:39:16.110957
2 2018-03-02 15:39:16.327546
3 2018-03-02 15:39:16.332559
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:16.335532
-----
path D:\mhmodels_old\models\00607
1 2018-03-02 15:39:16.340546
2 2018-03-02 15:39:16.511381
3 2018-03-02 15:39:16.511381
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:16.527008
-----
path D:\mhmodels_old\models\00612
1 2018-03-02 15:39:16.527008
2 2018-03-02 15:39:16.711039
3 2018-03-02 15:39:16.711039
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:16.726707
-----
path D:\mhmodels_old\models\00616
1 2018-03-02 15:39:16.726707
2 2018-03-02 15:39:16.910194
3 2018-03-02 15:39:16.915685
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:16.919195
-----
path D:\mhmodels_old\models\00630
1 2018-03-02 15:39:16.924208
2 2018-03-02 15:39:17.108824
3 2018-03-02 15:39:17.126937
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:17.131513
-----
path D:\mhmodels_old\models\00636
1 2018-03-02 15:39:17.138530
2 2018-03-02 15:39:17.349765
3 2018-03-02 15:39:17.354780
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:17.357787
-----
path D:\mhmodels_old\models\00638
1 2018-03-02 15:39:17.376840
2 2018-03-02 15:39:17.584456
3 2018-03-02 15:39:17.594484
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:17.600499
-----
path D:\mhmodels_old\models\00642
1 2018-03-02 15:39:17.608523
2 2018-03-02 15:39:17.830801
3 2018-03-02 15:39:17.835340
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:17.836585
-----
path D:\mhmodels_old\models\00646
1 2018-03-02 15:39:17.836585
2 2018-03-02 15:39:18.009192
3 2018-03-02 15:39:18.027347
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:18.030832
-----
path D:\mhmodels_old\models\00661
1 2018-03-02 15:39:18.035014
2 2018-03-02 15:39:18.231465
3 2018-03-02 15:39:18.231465
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:18.253347
-----
path D:\mhmodels_old\models\00663
1 2018-03-02 15:39:18.260368
2 2018-03-02 15:39:18.483126
3 2018-03-02 15:39:18.489102
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:18.492110
-----
path D:\mhmodels_old\models\00667
1 2018-03-02 15:39:18.497123
2 2018-03-02 15:39:18.689376
3 2018-03-02 15:39:18.694357
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:18.697393
-----
path D:\mhmodels_old\models\00669
1 2018-03-02 15:39:18.702413
2 2018-03-02 15:39:18.909683
3 2018-03-02 15:39:18.914719
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:18.918243
-----
path D:\mhmodels_old\models\00671
1 2018-03-02 15:39:18.923748
2 2018-03-02 15:39:19.113287
3 2018-03-02 15:39:19.117835
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:19.121312
-----
path D:\mhmodels_old\models\00675
1 2018-03-02 15:39:19.126362
2 2018-03-02 15:39:19.344894
3 2018-03-02 15:39:19.350909
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:19.357942
-----
path D:\mhmodels_old\models\00680
1 2018-03-02 15:39:19.364950
2 2018-03-02 15:39:19.570427
3 2018-03-02 15:39:19.577446
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:19.580492
-----
path D:\mhmodels_old\models\00684
1 2018-03-02 15:39:19.586494
2 2018-03-02 15:39:19.826912
3 2018-03-02 15:39:19.832937
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:19.832937
-----
path D:\mhmodels_old\models\00692
1 2018-03-02 15:39:19.832937
2 2018-03-02 15:39:20.059253
3 2018-03-02 15:39:20.063263
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:20.066261
-----
path D:\mhmodels_old\models\00694
1 2018-03-02 15:39:20.071274
2 2018-03-02 15:39:20.249963
3 2018-03-02 15:39:20.268593
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:20.272582
-----
path D:\mhmodels_old\models\00701
1 2018-03-02 15:39:20.279602
2 2018-03-02 15:39:20.525125
3 2018-03-02 15:39:20.529636
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:20.532644
-----
path D:\mhmodels_old\models\00706
1 2018-03-02 15:39:20.534708
2 2018-03-02 15:39:20.738246
3 2018-03-02 15:39:20.743233
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:20.746240
-----
path D:\mhmodels_old\models\00712
1 2018-03-02 15:39:20.749282
2 2018-03-02 15:39:20.935301
3 2018-03-02 15:39:20.935301
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:20.935301
-----
path D:\mhmodels_old\models\00713
1 2018-03-02 15:39:20.950954
2 2018-03-02 15:39:21.168007
3 2018-03-02 15:39:21.172986
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:21.175994
-----
path D:\mhmodels_old\models\00724
1 2018-03-02 15:39:21.182047
2 2018-03-02 15:39:21.388801
3 2018-03-02 15:39:21.393804
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:21.396791
-----
path D:\mhmodels_old\models\00731
1 2018-03-02 15:39:21.400798
2 2018-03-02 15:39:21.632284
3 2018-03-02 15:39:21.636834
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:21.639842
-----
path D:\mhmodels_old\models\00741
1 2018-03-02 15:39:21.643854
2 2018-03-02 15:39:21.840606
3 2018-03-02 15:39:21.845600
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:21.849619
-----
path D:\mhmodels_old\models\00744
1 2018-03-02 15:39:21.856129
2 2018-03-02 15:39:22.098818
3 2018-03-02 15:39:22.102828
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:22.105040
-----
path D:\mhmodels_old\models\00745
1 2018-03-02 15:39:22.105040
2 2018-03-02 15:39:22.311979
3 2018-03-02 15:39:22.317997
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:22.322006
-----
path D:\mhmodels_old\models\00747
1 2018-03-02 15:39:22.327070
2 2018-03-02 15:39:22.520959
3 2018-03-02 15:39:22.525971
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:22.529984
-----
path D:\mhmodels_old\models\00751
1 2018-03-02 15:39:22.535027
2 2018-03-02 15:39:22.781253
3 2018-03-02 15:39:22.785766
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:22.789210
-----
path D:\mhmodels_old\models\00754
1 2018-03-02 15:39:22.794256
2 2018-03-02 15:39:22.998494
3 2018-03-02 15:39:23.003003
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:23.006517
-----
path D:\mhmodels_old\models\00758
1 2018-03-02 15:39:23.010560
2 2018-03-02 15:39:23.184539
3 2018-03-02 15:39:23.204169
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:23.207658
-----
path D:\mhmodels_old\models\00759
1 2018-03-02 15:39:23.212672
2 2018-03-02 15:39:23.422632
3 2018-03-02 15:39:23.428225
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:23.431233
-----
path D:\mhmodels_old\models\00760
1 2018-03-02 15:39:23.436246
2 2018-03-02 15:39:23.672893
3 2018-03-02 15:39:23.678909
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:23.683926
-----
path D:\mhmodels_old\models\00762
1 2018-03-02 15:39:23.688941
2 2018-03-02 15:39:23.885056
3 2018-03-02 15:39:23.891673
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:23.894682
-----
path D:\mhmodels_old\models\00768
1 2018-03-02 15:39:23.899695
2 2018-03-02 15:39:24.144465
3 2018-03-02 15:39:24.149506
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:24.152510
-----
path D:\mhmodels_old\models\00773
1 2018-03-02 15:39:24.154007
2 2018-03-02 15:39:24.341898
3 2018-03-02 15:39:24.346401
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:24.350387
-----
path D:\mhmodels_old\models\00784
1 2018-03-02 15:39:24.354925
2 2018-03-02 15:39:24.564959
3 2018-03-02 15:39:24.569972
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:24.573487
-----
path D:\mhmodels_old\models\00787
1 2018-03-02 15:39:24.579032
2 2018-03-02 15:39:24.808125
3 2018-03-02 15:39:24.814129
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:24.818157
-----
path D:\mhmodels_old\models\00788
1 2018-03-02 15:39:24.820480
2 2018-03-02 15:39:25.018288
3 2018-03-02 15:39:25.022299
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:25.027327
-----
path D:\mhmodels_old\models\00793
1 2018-03-02 15:39:25.032360
2 2018-03-02 15:39:25.233143
3 2018-03-02 15:39:25.238190
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:25.242168
-----
path D:\mhmodels_old\models\00795
1 2018-03-02 15:39:25.324528
2 2018-03-02 15:39:25.518894
3 2018-03-02 15:39:25.534516
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:25.534516
-----
path D:\mhmodels_old\models\00803
1 2018-03-02 15:39:25.534516
2 2018-03-02 15:39:25.778294
3 2018-03-02 15:39:25.778294
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:25.778294
-----
path D:\mhmodels_old\models\00806
1 2018-03-02 15:39:25.793936
2 2018-03-02 15:39:26.004964
3 2018-03-02 15:39:26.009978
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:26.013989
-----
path D:\mhmodels_old\models\00807
1 2018-03-02 15:39:26.019057
2 2018-03-02 15:39:26.249590
3 2018-03-02 15:39:26.254035
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:26.254035
-----
path D:\mhmodels_old\models\00808
1 2018-03-02 15:39:26.270669
2 2018-03-02 15:39:26.457144
3 2018-03-02 15:39:26.467326
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:26.472339
-----
path D:\mhmodels_old\models\00814
1 2018-03-02 15:39:26.477353
2 2018-03-02 15:39:26.680465
3 2018-03-02 15:39:26.684500
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:26.688510
-----
path D:\mhmodels_old\models\00815
1 2018-03-02 15:39:26.692522
2 2018-03-02 15:39:26.920235
3 2018-03-02 15:39:26.930289
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:26.934270
-----
path D:\mhmodels_old\models\00817
1 2018-03-02 15:39:26.941287
2 2018-03-02 15:39:27.139248
3 2018-03-02 15:39:27.145291
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:27.148310
-----
path D:\mhmodels_old\models\00823
1 2018-03-02 15:39:27.152317
2 2018-03-02 15:39:27.351950
3 2018-03-02 15:39:27.355977
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:27.360978
-----
path D:\mhmodels_old\models\00825
1 2018-03-02 15:39:27.366050
2 2018-03-02 15:39:27.541465
3 2018-03-02 15:39:27.541465
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:27.541465
-----
path D:\mhmodels_old\models\00841
1 2018-03-02 15:39:27.557092
2 2018-03-02 15:39:27.744535
3 2018-03-02 15:39:27.744535
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:27.744535
-----
path D:\mhmodels_old\models\00859
1 2018-03-02 15:39:27.760137
2 2018-03-02 15:39:28.010904
3 2018-03-02 15:39:28.010904
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:28.010904
-----
path D:\mhmodels_old\models\00860
1 2018-03-02 15:39:28.026529
2 2018-03-02 15:39:28.229035
3 2018-03-02 15:39:28.233069
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:28.238058
-----
path D:\mhmodels_old\models\00863
1 2018-03-02 15:39:28.243095
2 2018-03-02 15:39:28.487254
3 2018-03-02 15:39:28.487254
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:28.487254
-----
path D:\mhmodels_old\models\00864
1 2018-03-02 15:39:28.487254
2 2018-03-02 15:39:28.707885
3 2018-03-02 15:39:28.711932
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:28.715908
-----
path D:\mhmodels_old\models\00867
1 2018-03-02 15:39:28.720920
2 2018-03-02 15:39:28.910926
3 2018-03-02 15:39:28.915940
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:28.918946
-----
path D:\mhmodels_old\models\00872
1 2018-03-02 15:39:28.924470
2 2018-03-02 15:39:29.158464
3 2018-03-02 15:39:29.164481
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:29.167490
-----
path D:\mhmodels_old\models\00883
1 2018-03-02 15:39:29.170782
2 2018-03-02 15:39:29.361159
3 2018-03-02 15:39:29.366140
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:29.370151
-----
path D:\mhmodels_old\models\00884
1 2018-03-02 15:39:29.375700
2 2018-03-02 15:39:29.558542
3 2018-03-02 15:39:29.558542
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:29.558542
-----
path D:\mhmodels_old\models\00893
1 2018-03-02 15:39:29.577301
2 2018-03-02 15:39:29.760207
3 2018-03-02 15:39:29.760207
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:29.760207
-----
path D:\mhmodels_old\models\00898
1 2018-03-02 15:39:29.779353
2 2018-03-02 15:39:29.974869
3 2018-03-02 15:39:29.978879
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:29.980424
-----
path D:\mhmodels_old\models\00901
1 2018-03-02 15:39:29.980424
2 2018-03-02 15:39:30.228154
3 2018-03-02 15:39:30.233193
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:30.237587
-----
path D:\mhmodels_old\models\00902
1 2018-03-02 15:39:30.237587
2 2018-03-02 15:39:30.457556
3 2018-03-02 15:39:30.465582
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:30.471600
-----
path D:\mhmodels_old\models\00919
1 2018-03-02 15:39:30.478115
2 2018-03-02 15:39:30.695800
3 2018-03-02 15:39:30.699810
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:30.703786
-----
path D:\mhmodels_old\models\00923
1 2018-03-02 15:39:30.759959
2 2018-03-02 15:39:30.959468
3 2018-03-02 15:39:30.959468
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:30.959468
-----
path D:\mhmodels_old\models\00928
1 2018-03-02 15:39:30.975121
2 2018-03-02 15:39:31.170919
3 2018-03-02 15:39:31.188173
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:31.192183
-----
path D:\mhmodels_old\models\00937
1 2018-03-02 15:39:31.198206
2 2018-03-02 15:39:31.435114
3 2018-03-02 15:39:31.437475
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:31.437475
-----
path D:\mhmodels_old\models\00941
1 2018-03-02 15:39:31.437475
2 2018-03-02 15:39:31.618997
3 2018-03-02 15:39:31.634634
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:31.634634
-----
path D:\mhmodels_old\models\00942
1 2018-03-02 15:39:31.634634
2 2018-03-02 15:39:31.834801
3 2018-03-02 15:39:31.834801
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:31.834801
-----
path D:\mhmodels_old\models\00953
1 2018-03-02 15:39:31.850689
2 2018-03-02 15:39:32.060660
3 2018-03-02 15:39:32.065173
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:32.068181
-----
path D:\mhmodels_old\models\00955
1 2018-03-02 15:39:32.072228
2 2018-03-02 15:39:32.287479
3 2018-03-02 15:39:32.291489
(128, 128)
(128, 128, 2)
(16384, 21)
4 2018-03-02 15:39:32.294463
-----

Data Generator


In [54]:
from datetime import datetime

In [55]:
def ImageGenerator(list_paths, batch_size, img_width, img_height, n_classes):
    
    list_data = itertools.cycle(list_paths)
    
    while True:
        X = []
        Y = []
        for _ in range(batch_size):
            path = next(list_data)
            depth_path = path + "_depth_128.png"
            h_seg_path = path + "_h_seg_128.png"
            
            depth_img = cv2.imread(depth_path, cv2.IMREAD_UNCHANGED)
            h_seg_labels = cv2.imread(h_seg_path, cv2.IMREAD_UNCHANGED)
            
            X.append(np.expand_dims(depth_img, 3))
            Y.append(h_seg_labels)        
        yield np.array(X), np.array(Y)

In [56]:
img_gen = ImageGenerator(list_paths, BATCH_SIZE, IMG_WIDTH, IMG_HEIGHT, N_CLASSES)

In [43]:
for x_train, y_train in img_gen:
    print(x_train.shape)
    print(y_train.shape)
    plt.imshow(np.squeeze(x_train[0, :, :]))
    print(y_train[0, 150*256 + 140, :])
    break


D:\Miniconda3\envs\env3-gpu\lib\site-packages\ipykernel_launcher.py:16: DeprecationWarning: Both axis > a.ndim and axis < -a.ndim - 1 are deprecated and will raise an AxisError in the future.
  app.launch_new_instance()
(32, 256, 256, 1)
(32, 65536, 21)
[0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Define model


In [57]:
import keras 
from keras import layers
from keras import backend as K

In [69]:
def get_model(img_width, img_height, n_classes):
    depth_input = layers.Input(shape=(img_width, img_height, 1), name='depth_input')
        
    # Block 1
    x = layers.Conv2D(64, 3, activation='relu', padding='same', name='block1_conv1')(depth_input)
    x = layers.Conv2D(64, 3, activation='relu', padding='same', name='block1_conv2')(x)
    x = layers.Conv2D(64, 3, strides=2, activation='relu', padding='same', name='block1_conv3')(x)
    f1 = x
    
#     # Block 2
#     x = layers.Conv2D(128, 3, activation='relu', padding='same', name='block2_conv1')(x)
#     x = layers.Conv2D(128, 3, activation='relu', padding='same', name='block2_conv2')(x)
#     x = layers.Conv2D(128, 3, strides=2, activation='relu', padding='same', name='block2_conv3')(x)
#     f2 = x
    
    # Block 3
    x = layers.Conv2D(256, 3, activation='relu', padding='same', name='block3_conv1')(x)
    x = layers.Conv2D(256, 3, activation='relu', padding='same', name='block3_conv2')(x)
    x = layers.Conv2D(256, 3, strides=2, activation='relu', padding='same', name='block3_conv3')(x)
    f3 = x
    
    o = f3
    
    o = layers.Conv2DTranspose(256, 4, strides=2, activation='relu', padding='same')(o) 
    o = layers.Conv2D(256, 3, activation='relu', padding='same')(o)
    o = layers.concatenate([o, f1], axis=3)
#     o = layers.Conv2DTranspose(256, 5, strides=2, activation='relu', padding='same')(o)
#     o = layers.Conv2D(256, 3, activation='relu', padding='same')(o)
    o = layers.Conv2DTranspose(256, 5, strides=2, activation='relu', padding='same')(o)
    o = layers.Conv2D(n_classes, 1, activation='softmax', padding='same')(o)
    
    o = layers.Reshape((img_width * img_height, n_classes))(o)
    
    model = keras.models.Model(depth_input, o)
    model.summary()
    return model

In [142]:
model = get_model(IMG_WIDTH, IMG_HEIGHT, N_CLASSES)


__________________________________________________________________________________________________
Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
depth_input (InputLayer)        (None, 128, 128, 1)  0                                            
__________________________________________________________________________________________________
block1_conv1 (Conv2D)           (None, 128, 128, 64) 640         depth_input[0][0]                
__________________________________________________________________________________________________
block1_conv2 (Conv2D)           (None, 128, 128, 64) 36928       block1_conv1[0][0]               
__________________________________________________________________________________________________
block1_conv3 (Conv2D)           (None, 64, 64, 64)   36928       block1_conv2[0][0]               
__________________________________________________________________________________________________
block3_conv1 (Conv2D)           (None, 64, 64, 256)  147712      block1_conv3[0][0]               
__________________________________________________________________________________________________
block3_conv2 (Conv2D)           (None, 64, 64, 256)  590080      block3_conv1[0][0]               
__________________________________________________________________________________________________
block3_conv3 (Conv2D)           (None, 32, 32, 256)  590080      block3_conv2[0][0]               
__________________________________________________________________________________________________
conv2d_transpose_16 (Conv2DTran (None, 64, 64, 256)  1048832     block3_conv3[0][0]               
__________________________________________________________________________________________________
conv2d_16 (Conv2D)              (None, 64, 64, 256)  590080      conv2d_transpose_16[0][0]        
__________________________________________________________________________________________________
concatenate_5 (Concatenate)     (None, 64, 64, 320)  0           conv2d_16[0][0]                  
                                                                 block1_conv3[0][0]               
__________________________________________________________________________________________________
conv2d_transpose_17 (Conv2DTran (None, 128, 128, 256 2048256     concatenate_5[0][0]              
__________________________________________________________________________________________________
conv2d_17 (Conv2D)              (None, 128, 128, 21) 5397        conv2d_transpose_17[0][0]        
__________________________________________________________________________________________________
reshape_7 (Reshape)             (None, 16384, 21)    0           conv2d_17[0][0]                  
==================================================================================================
Total params: 5,094,933
Trainable params: 5,094,933
Non-trainable params: 0
__________________________________________________________________________________________________

In [135]:
# weighted pixelwisel loss function

In [143]:
from keras import backend as K
import tensorflow as tf

In [144]:
def weighted_pixelwise_crossentropy(class_weights):
    def loss(y_true, y_pred):
         # Copied and pasted from theano
#         y_pred = K.clip(y_pred, 10e-8, 1.0 - 10e-8)
#         return -K.mean(K.sum(K.prod(y_true * K.log(y_pred), class_weights)))
        y_pred = tf.clip_by_value(y_pred, 10e-8, 1. - 10e-8)
        return tf.reduce_mean(-tf.reduce_sum(tf.multiply(y_true * tf.log(y_pred), class_weights), 1))
    return loss

In [145]:
class_weights = [1.0]*N_CLASSES
class_weights[0] = 0.01
print(class_weights)

pixelwise_crossentropy = weighted_pixelwise_crossentropy(class_weights)


[0.01, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]

In [146]:
model.compile(optimizer=keras.optimizers.Adam(),
              loss=pixelwise_crossentropy,
              metrics=['accuracy'])

In [158]:
epochs = 1
model.fit_generator(img_gen, steps_per_epoch=BATCH_SIZE*1, epochs=epochs)


Epoch 1/1
D:\Miniconda3\envs\env3-gpu\lib\site-packages\ipykernel_launcher.py:16: DeprecationWarning: Both axis > a.ndim and axis < -a.ndim - 1 are deprecated and will raise an AxisError in the future.
  app.launch_new_instance()
32/32 [==============================] - 46s 1s/step - loss: 0.1078 - acc: 0.9990
Out[158]:
<keras.callbacks.History at 0x1a584876828>

In [159]:
model.save("D:\\model_segmentation_0.1078.h5")

In [189]:
for x_train, y_train in img_gen:
    print(x_train.shape)
    print(y_train.shape)
    plt.imshow(np.squeeze(x_train[0, :, :]))
    results = model.predict(x_train[:, :, :, :])
    print(results.shape)
    
    for i in range(10):
        print("----------------------------------")
        print("#", i)
        y = y_train[i, :, :]
        y_pred = results[i, :, :]
        print("truth")
        y_reshape = np.reshape(y, (IMG_WIDTH, IMG_HEIGHT, 21))
        plt.imshow(np.argmax(y_reshape, axis=2))
        plt.show()

        print("predict")
        y_pred_reshape = np.reshape(y_pred, (IMG_WIDTH, IMG_HEIGHT, 21))
        plt.imshow(np.argmax(y_pred_reshape, axis=2))
        plt.show()
    break


D:\Miniconda3\envs\env3-gpu\lib\site-packages\ipykernel_launcher.py:16: DeprecationWarning: Both axis > a.ndim and axis < -a.ndim - 1 are deprecated and will raise an AxisError in the future.
  app.launch_new_instance()
(32, 128, 128, 1)
(32, 16384, 21)
(32, 16384, 21)
----------------------------------
# 0
truth
predict
----------------------------------
# 1
truth
predict
----------------------------------
# 2
truth
predict
----------------------------------
# 3
truth
predict
----------------------------------
# 4
truth
predict
----------------------------------
# 5
truth
predict
----------------------------------
# 6
truth
predict
----------------------------------
# 7
truth
predict
----------------------------------
# 8
truth
predict
----------------------------------
# 9
truth
predict

In [ ]: