Skip to content

Commit

Permalink
adding some more description
Browse files Browse the repository at this point in the history
  • Loading branch information
nikk-nikaznan committed Jul 3, 2024
1 parent e1a8537 commit d6401e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crabs/tracker/evaluate_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ def evaluate_mota(
Parameters
----------
gt_boxes : np.ndarray
Ground truth bounding boxes of objects.
Ground truth bounding boxes of objects with shape of (N, 4) with (x1, y1, x2, y2).
gt_ids : np.ndarray
Ground truth IDs corresponding to the bounding boxes.
Ground truth IDs corresponding to the bounding boxes with shape of (N, 1).
tracked_boxes : np.ndarray
Tracked bounding boxes of objects.
Tracked bounding boxes of objects with shape of (N, 5) with (x1, y1, x2, y2, id).
iou_threshold : float
Intersection over Union (IoU) threshold for considering a match.
prev_frame_id_map : Optional[Dict[int, int]]
Expand Down
6 changes: 3 additions & 3 deletions crabs/tracker/track_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def update_tracking(self, prediction: dict) -> list[list[float]]:
"""
pred_sort = prep_sort(prediction, self.config["score_threshold"])
tracked_boxes = self.sort_tracker.update(pred_sort)
self.tracked_list.append(tracked_boxes)
self.tracked_bbox_id.append(tracked_boxes)
return tracked_boxes

def run_tracking(self):
Expand All @@ -160,7 +160,7 @@ def run_tracking(self):
# In any case run inference
# initialisation
frame_idx = 0
self.tracked_list = []
self.tracked_bbox_id = []

# Loop through frames of the video in batches
while self.video.isOpened():
Expand Down Expand Up @@ -199,7 +199,7 @@ def run_tracking(self):
if self.args.gt_path:
evaluation = TrackerEvaluate(
self.args.gt_path,
self.tracked_list,
self.tracked_bbox_id,
self.config["iou_threshold"],
)
evaluation.run_evaluation()
Expand Down

0 comments on commit d6401e1

Please sign in to comment.