In [1]:
import pandas as pd
import numpy as np
import tifffile as tif
import cv2
import matplotlib.pyplot as plt

from importlib import reload
import os, gc, glob

from shapely import wkt
from skimage import measure, morphology

import utils
import global_vars

Outline

  • load prediction masks
  • threshold the masks
    • find decent thresholds for each class, using train data and labels
  • generate wkt
    • turn masks into polygons
    • turn pollygons into wkt
  • write each wkt to a file

In [2]:
im_names = glob.glob(os.path.join(global_vars.DATA_DIR, 'bin_masks', 'train_16x16','*.tif'))
label_list = list()
train_pred_list = list()

for name in im_names:
    prediction = tif.imread(name)
    train_pred_list.append(prediction[:,:,1:])
    shape = prediction.shape[:2]
    label_list.append(utils.load_all_lab(name.split('/')[-1].split('.')[0], 835))

In [3]:
len(train_pred_list)


Out[3]:
25

In [4]:
thresholds = list()

for i in range(8):
    best_threshold = utils.find_thresh(train_pred_list, label_list,i)
    thresholds.append(best_threshold)

In [5]:
#this method is based on solution posted in forum for differentiating river from standing water. 
def get_standing_river(im_mask, water_ind = -2):
    empty = np.zeros(im_mask.shape[:2])
    if im_mask[:,:,water_ind].sum() > 50000:
        return im_mask[:,:,-2], empty
    else:
        return empty, im_mask[:,:,-2]

def remove_large(train_mask, limit):
    tl = measure.regionprops(measure.label(train_mask))
    for i in tl:
        if i.area > limit:
            c = i.coords
            for k in range(c.shape[0]):
                train_mask[c[k,0], c[k,1]] = 0
    return train_mask

def make_car_truck(vehicles):
    car = remove_large(vehicles.copy(),200)
    car = morphology.remove_small_objects(car, 12)
    
    truck = remove_large(vehicles.copy(),800)
    truck = morphology.remove_small_objects(truck, 30)
    return car, truck

In [19]:
thresholds


Out[19]:
[0.5, 0.25, 0.6, 0.25, 0.4, 0.7, 0.7, 0.1]

In [20]:
files = glob.glob(os.path.join(global_vars.DATA_DIR, 'bin_masks', 'test_16x16','*.tif'))

for file in files:
    preds = tif.imread(file)
    new_preds = np.zeros(list(preds.shape[:2])+[8])
    for i in range(8):
        new_preds[:,:,i] = preds[:,:,i+1] > thresholds[i]
        
    new_preds = new_preds.astype(np.uint8)
    preds = new_preds.copy()
    
    new_preds = np.zeros((list(preds.shape[:2])+[10]), dtype=bool)
    new_preds[:,:,:6] = preds[:,:,:6]
    river, water = get_standing_river(preds.copy())
    new_preds[:,:,6] = river
    new_preds[:,:,7] = water
    
    car, truck = make_car_truck(preds[:,:,-1])
    
    new_preds[:,:,8] = car
    new_preds[:,:,9] = truck
    
    pred_df = utils.simple_to_wkt(new_preds, file[-12:-4], list(range(1,11)))
    tmp_path = os.path.join(global_vars.DATA_DIR,'submissions','subm16x16',file[-12:-4]+ '_wkt.csv') 
    pred_df.to_csv(tmp_path)
    print(file)


/media/d/ssd2/dstl/bin_masks/test_16x16/6100_0_0.tif
/home/d/anaconda3/envs/tf/lib/python3.5/site-packages/skimage/morphology/misc.py:122: UserWarning: Only one label was provided to `remove_small_objects`. Did you mean to use a boolean array?
  warn("Only one label was provided to `remove_small_objects`. "
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_4_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_4_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_1_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_1_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_3_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_0_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_3_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6010_2_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6070_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6110_1_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6020_1_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6160_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_2_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_2_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6130_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6090_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_4_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_3_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_3_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6100_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6050_1_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6060_0_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6080_4_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_0_2.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6150_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_3_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6030_0_3.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6120_0_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6140_2_4.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6180_2_1.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6040_4_0.tif
/media/d/ssd2/dstl/bin_masks/test_16x16/6170_4_3.tif

In [ ]: