diff --git a/utils.py b/utils.py index 7c65f18..783f0d3 100644 --- a/utils.py +++ b/utils.py @@ -378,7 +378,7 @@ def provide_patches(dir_img, dir_seg, dir_flow_train_imgs, indexer = 0 for im, seg_i in tqdm(zip(imgs_cv_train, segs_cv_train)): - img_name = im.split('.')[0] + img_name = os.path.splitext(im)[0] if not patches: cv2.imwrite(dir_flow_train_imgs + '/img_' + str(indexer) + '.png', resize_image(cv2.imread(dir_img + '/' + im), input_height, input_width))