Spaces:
Runtime error
Runtime error
Commit
·
338d17a
1
Parent(s):
eb3543f
Update inference.py
Browse files- inference.py +2 -0
inference.py
CHANGED
@@ -296,6 +296,8 @@ def do_confidence_boost(inference, safe_preds, gp=None, batch_size=BATCH_SIZE, b
|
|
296 |
def boost_frame(safe_frame, base_frame, dt, power=1, decay=1):
|
297 |
safe_boxes = safe_frame[:, :4]
|
298 |
boxes = xywh2xyxy(base_frame[:, :4]) # center_x, center_y, width, height) to (x1, y1, x2, y2)
|
|
|
|
|
299 |
ious = box_iou(boxes, safe_boxes)
|
300 |
score = torch.matmul(ious, safe_frame[:, 4])
|
301 |
# score = iou(safe_box, base_box) * confidence(safe_box)
|
|
|
296 |
def boost_frame(safe_frame, base_frame, dt, power=1, decay=1):
|
297 |
safe_boxes = safe_frame[:, :4]
|
298 |
boxes = xywh2xyxy(base_frame[:, :4]) # center_x, center_y, width, height) to (x1, y1, x2, y2)
|
299 |
+
print(type(boxes))
|
300 |
+
print(type(safe_boxes))
|
301 |
ious = box_iou(boxes, safe_boxes)
|
302 |
score = torch.matmul(ious, safe_frame[:, 4])
|
303 |
# score = iou(safe_box, base_box) * confidence(safe_box)
|