diff --git a/main.py b/main.py index 94f8adada7720e0e9bf0bd914f82ae3df8adbe86..cff8cfa14edbd2aa38db1c0dc685a9169eb385c7 100644 --- a/main.py +++ b/main.py @@ -42,7 +42,6 @@ def cal_hist(a, b, n): return np.bincount(n * a[k].astype(np.int32) + b[k], minlength=n ** 2).reshape(n, n) def resize_long(img, long_size=513): - print(img) h, w, _ = img.shape if h > w: new_h = long_size @@ -93,9 +92,7 @@ def eval_batch(eval_net, img_lst, crop_size=513, flip=True): batch_img = np.zeros((4, 3, crop_size, crop_size), dtype=np.float32) resize_hw = [] for l in range(batch_size): - print(img_lst) img_ = img_lst[l] - print(img_) img_, resize_h, resize_w = pre_process(img_, crop_size) batch_img[l] = img_ resize_hw.append([resize_h, resize_w]) @@ -151,14 +148,13 @@ def net_eval(): msk_path = './datasets/SegmentationClass/' + line.replace('\n', '') + '.png' img_ = cv2.imread(img_path) msk_ = cv2.imread(msk_path, cv2.IMREAD_GRAYSCALE) - print(img_path) - print(img_) batch_img_lst.append(img_) batch_msk_lst.append(msk_) bi += 1 if bi == 4: batch_res = eval_batch_scales(eval_net, batch_img_lst, scales=[1.0], base_crop_size=513, flip=True) + print(batch_msk_lst) for mi in range(16): hist += cal_hist(batch_msk_lst[mi].flatten(), batch_res[mi].flatten(), 6)