Spaces:
Runtime error
Runtime error
second commit
Browse files
app.py
CHANGED
@@ -102,8 +102,8 @@ def predict_on_frames(dir, mod_dir):
|
|
102 |
#for sorting the file names properly
|
103 |
files.sort(key = lambda x: int(x.stem[6:]))
|
104 |
|
105 |
-
for
|
106 |
-
filename = Path(dir,
|
107 |
#print(filename)
|
108 |
#reading each files
|
109 |
img = Image.open(str(filename))
|
@@ -112,7 +112,7 @@ def predict_on_frames(dir, mod_dir):
|
|
112 |
pixel_values = img_ftr["pixel_values"].to(device)
|
113 |
# forward pass to get class logits and bounding boxes
|
114 |
outputs = model_pt(pixel_values=pixel_values)
|
115 |
-
mod_img_path = Path(mod_dir,
|
116 |
save_predictions(img, outputs, mod_img_path)
|
117 |
|
118 |
# Convert frames to video
|
|
|
102 |
#for sorting the file names properly
|
103 |
files.sort(key = lambda x: int(x.stem[6:]))
|
104 |
|
105 |
+
for file in stqdm(files, desc="Generating... this is a slow task"):
|
106 |
+
filename = Path(dir, file)
|
107 |
#print(filename)
|
108 |
#reading each files
|
109 |
img = Image.open(str(filename))
|
|
|
112 |
pixel_values = img_ftr["pixel_values"].to(device)
|
113 |
# forward pass to get class logits and bounding boxes
|
114 |
outputs = model_pt(pixel_values=pixel_values)
|
115 |
+
mod_img_path = Path(mod_dir, file.name)
|
116 |
save_predictions(img, outputs, mod_img_path)
|
117 |
|
118 |
# Convert frames to video
|