Update utils.py

This commit is contained in:
johnlockejrr 2025-05-10 14:58:40 -07:00 committed by GitHub
parent 02b1436f39
commit 479a6705c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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))