Update app.py
Browse files
app.py
CHANGED
|
@@ -49,12 +49,12 @@ def get_sample_images(image_folder, format=[('.jpg', '.jpeg'), ('.png')]):
|
|
| 49 |
img_file_list = os.listdir(image_folder)
|
| 50 |
img_file_list.sort()
|
| 51 |
|
| 52 |
-
# Filter out only the image files (assuming images have extensions like '.jpg')
|
| 53 |
image_files = [image_folder +'/' + file for file in img_file_list if file.lower().endswith(format[0])]
|
| 54 |
mask_files = [image_folder +'/' + file for file in img_file_list if file.lower().endswith(format[1])]
|
| 55 |
|
| 56 |
if mask_files == []:
|
| 57 |
-
image_files = [
|
| 58 |
return image_files
|
| 59 |
|
| 60 |
return [list(pair) for pair in zip(image_files, mask_files)]
|
|
|
|
| 49 |
img_file_list = os.listdir(image_folder)
|
| 50 |
img_file_list.sort()
|
| 51 |
|
| 52 |
+
# Filter out only the image files (assuming images have extensions like '.jpg' or '.png')
|
| 53 |
image_files = [image_folder +'/' + file for file in img_file_list if file.lower().endswith(format[0])]
|
| 54 |
mask_files = [image_folder +'/' + file for file in img_file_list if file.lower().endswith(format[1])]
|
| 55 |
|
| 56 |
if mask_files == []:
|
| 57 |
+
image_files = [[file] for file in image_files]
|
| 58 |
return image_files
|
| 59 |
|
| 60 |
return [list(pair) for pair in zip(image_files, mask_files)]
|