1
0
Fork 0
mirror of https://github.com/qurator-spk/sbb_pixelwise_segmentation.git synced 2025-06-08 19:30:07 +02:00

Update utils.py

Safely get filename without extension
This commit is contained in:
johnlockejrr 2025-05-14 03:27:12 -07:00 committed by GitHub
parent 479a6705c1
commit 0c919d17db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -158,7 +158,7 @@ def data_gen(img_folder, mask_folder, batch_size, input_height, input_width, n_c
# print(img_folder+'/'+n[i])
try:
filename = n[i].split('.')[0]
filename = os.path.splitext(n[i])[0]
train_img = cv2.imread(img_folder + '/' + n[i]) / 255.
train_img = cv2.resize(train_img, (input_width, input_height),