Spaces:
Runtime error
Runtime error
Commit
·
48f8f4c
1
Parent(s):
cb75d38
Update detect_frames.py
Browse files- scripts/detect_frames.py +2 -4
scripts/detect_frames.py
CHANGED
@@ -68,11 +68,9 @@ def detect(in_seq_dir, out_seq_dir, model, device, verbose):
|
|
68 |
|
69 |
inference, image_shapes, width, height = do_detection(dataloader, model, device, verbose=verbose)
|
70 |
|
71 |
-
|
72 |
-
print(type(inference[0]))
|
73 |
-
print(len(inference[0]))
|
74 |
json_obj = {
|
75 |
-
'inference':
|
76 |
'image_shapes': image_shapes,
|
77 |
'width': width,
|
78 |
'height': height
|
|
|
68 |
|
69 |
inference, image_shapes, width, height = do_detection(dataloader, model, device, verbose=verbose)
|
70 |
|
71 |
+
inference_list = [tensor.tolist() for tensor in inference]
|
|
|
|
|
72 |
json_obj = {
|
73 |
+
'inference': inference_list,
|
74 |
'image_shapes': image_shapes,
|
75 |
'width': width,
|
76 |
'height': height
|