Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def process_video(
|
|
60 |
frame = next(frame_generator)
|
61 |
# list of dict of {"box": box, "mask":mask, "score":score, "label":label}
|
62 |
results = query(frame, labels)
|
63 |
-
|
64 |
detections = sv.Detections.from_transformers(results[0])
|
65 |
final_labels = []
|
66 |
for id in results[0]["labels"]:
|
@@ -80,7 +80,7 @@ def query(image, texts):
|
|
80 |
target_sizes = torch.Tensor([image.shape[:-1]])
|
81 |
|
82 |
results = processor.post_process_object_detection(outputs=outputs, threshold=0.3, target_sizes=target_sizes)
|
83 |
-
|
84 |
return results
|
85 |
|
86 |
|
|
|
60 |
frame = next(frame_generator)
|
61 |
# list of dict of {"box": box, "mask":mask, "score":score, "label":label}
|
62 |
results = query(frame, labels)
|
63 |
+
print("results", results)
|
64 |
detections = sv.Detections.from_transformers(results[0])
|
65 |
final_labels = []
|
66 |
for id in results[0]["labels"]:
|
|
|
80 |
target_sizes = torch.Tensor([image.shape[:-1]])
|
81 |
|
82 |
results = processor.post_process_object_detection(outputs=outputs, threshold=0.3, target_sizes=target_sizes)
|
83 |
+
|
84 |
return results
|
85 |
|
86 |
|