Skip to content

Commit

Permalink
Limit IoU to 50 frames
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubevoid committed Apr 17, 2024
1 parent 0780481 commit c058d82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/dataset_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def main(game: str) -> None:
# Calculate IoU between FastSAM and SAM bboxes
iou = calculate_iou(objects_sam, objects_fastsam).squeeze(-1)
num_obj = np.maximum(obj_per_frame_sam, obj_per_frame_fastsam) # per frame
ious = [np.mean(iou[i, : num_obj[i]]) for i in range(num_frames)]
ious = [np.mean(iou[i, : num_obj[i]]) for i in range(min(num_frames, 50))]
# Make new plot of IoUs
plt.figure()
plt.plot(ious, label="Mean IoU")
Expand Down

0 comments on commit c058d82

Please sign in to comment.