Spaces:
Runtime error
Runtime error
Commit ·
3b33d39
1
Parent(s): 8a1a659
dc dc dc
Browse files- src/utils.py +1 -0
src/utils.py
CHANGED
|
@@ -8,6 +8,7 @@ import time
|
|
| 8 |
config = yaml.safe_load(open("./config/config.yaml"))
|
| 9 |
|
| 10 |
def get_random_image_id(class_idx, data_dir):
|
|
|
|
| 11 |
path = os.path.join(data_dir, 'images', str(class_idx))
|
| 12 |
images = os.listdir(path)
|
| 13 |
ids = [int(img.split('.')[0]) for img in images if img.endswith('.png')]
|
|
|
|
| 8 |
config = yaml.safe_load(open("./config/config.yaml"))
|
| 9 |
|
| 10 |
def get_random_image_id(class_idx, data_dir):
|
| 11 |
+
print(f'getting random image id for class index: {class_idx}')
|
| 12 |
path = os.path.join(data_dir, 'images', str(class_idx))
|
| 13 |
images = os.listdir(path)
|
| 14 |
ids = [int(img.split('.')[0]) for img in images if img.endswith('.png')]
|