Spaces:
Sleeping
Sleeping
Commit
·
d533db3
1
Parent(s):
7470a7b
feat
Browse files
utils.py
CHANGED
|
@@ -68,9 +68,8 @@ def post_process_grounded_object_detection_with_queries(
|
|
| 68 |
prob = p[mask]
|
| 69 |
query = q[mask]
|
| 70 |
result = {"scores": score, "boxes": box, "queries": query}
|
| 71 |
-
|
| 72 |
results.append(result)
|
| 73 |
-
assert results['scores'].shape == results['boxes'].shape == results['queries'].shape, "scores, boxes and queries must have the same shape, but got {} and {}".format(results['scores'].shape, results['boxes'].shape, results['queries'].shape)
|
| 74 |
return results
|
| 75 |
|
| 76 |
|
|
|
|
| 68 |
prob = p[mask]
|
| 69 |
query = q[mask]
|
| 70 |
result = {"scores": score, "boxes": box, "queries": query}
|
| 71 |
+
assert score.shape[0] == box.shape[0] == query.shape[0], "scores, boxes and queries must have the same length, but got {} and {} and {}".format(score.shape[0], box.shape[0], query.shape[0])
|
| 72 |
results.append(result)
|
|
|
|
| 73 |
return results
|
| 74 |
|
| 75 |
|