Update app.py
Browse files
app.py
CHANGED
|
@@ -50,10 +50,11 @@ def get_sample_images(image_folder, format=[('.jpg', '.jpeg'), ('.png')]):
|
|
| 50 |
img_file_list.sort()
|
| 51 |
|
| 52 |
# Filter out only the image files (assuming images have extensions like '.jpg')
|
| 53 |
-
image_files = [
|
| 54 |
-
mask_files = [
|
| 55 |
|
| 56 |
if mask_files == []:
|
|
|
|
| 57 |
return image_files
|
| 58 |
|
| 59 |
return [list(pair) for pair in zip(image_files, mask_files)]
|
|
|
|
| 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 = [[image] for image in image_files]
|
| 58 |
return image_files
|
| 59 |
|
| 60 |
return [list(pair) for pair in zip(image_files, mask_files)]
|