Spaces:
Sleeping
Sleeping
| from PIL import Image | |
| import os | |
| folder = "../dataset/test/Heart" | |
| if os.path.exists(folder): | |
| files = os.listdir(folder)[:5] | |
| for f in files: | |
| path = os.path.join(folder, f) | |
| try: | |
| with Image.open(path) as img: | |
| print(f"{f}: {img.size}") | |
| except: | |
| pass | |