Spaces:
Runtime error
Runtime error
trying to add temp dir to solve hf issue
Browse files- inference.py +2 -1
inference.py
CHANGED
@@ -155,6 +155,7 @@ model.dataset_meta['classes'] = classes
|
|
155 |
print(model.cfg.visualizer)
|
156 |
# init visualizer(run the block only once in jupyter notebook)
|
157 |
visualizer = VISUALIZERS.build(model.cfg.visualizer)
|
|
|
158 |
print(dir(visualizer))
|
159 |
# the dataset_meta is loaded from the checkpoint and
|
160 |
# then pass to the model in init_detector
|
@@ -194,7 +195,7 @@ def inference_frame(image):
|
|
194 |
image[cnt],
|
195 |
data_sample=res.numpy(),
|
196 |
draw_gt = None,
|
197 |
-
show=False
|
198 |
)
|
199 |
frame = visualizer.get_image()
|
200 |
frames.append(frame)
|
|
|
155 |
print(model.cfg.visualizer)
|
156 |
# init visualizer(run the block only once in jupyter notebook)
|
157 |
visualizer = VISUALIZERS.build(model.cfg.visualizer)
|
158 |
+
visualizer.img_save_dir ='temp'
|
159 |
print(dir(visualizer))
|
160 |
# the dataset_meta is loaded from the checkpoint and
|
161 |
# then pass to the model in init_detector
|
|
|
195 |
image[cnt],
|
196 |
data_sample=res.numpy(),
|
197 |
draw_gt = None,
|
198 |
+
show=False,
|
199 |
)
|
200 |
frame = visualizer.get_image()
|
201 |
frames.append(frame)
|