Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ground truth tracking video #216

Open
wants to merge 61 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
73ea420
modify id switches
nikk-nikaznan Jun 5, 2024
768b81e
change the mota and test
nikk-nikaznan Jun 5, 2024
3036b06
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jun 5, 2024
f18a44c
change the variable
nikk-nikaznan Jun 14, 2024
6c0b0ed
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jun 18, 2024
a851e9f
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jun 21, 2024
611bd60
some bug fixed, load from checkpoint
nikk-nikaznan Jun 24, 2024
11bded7
Merge branch 'nikkna/id_switches' of github.com:SainsburyWellcomeCent…
nikk-nikaznan Jun 24, 2024
4b9a794
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jun 24, 2024
cfe67ca
change list type, add gt_ids
nikk-nikaznan Jun 25, 2024
7de7561
fixed the error id switches
nikk-nikaznan Jun 25, 2024
25f36c7
changes id switches
nikk-nikaznan Jun 25, 2024
de0b9cd
fixing some test and type hint
nikk-nikaznan Jun 27, 2024
5e56e1a
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jun 27, 2024
6aa1b63
fixing test, parametrize the test with additional test
nikk-nikaznan Jun 28, 2024
05faa18
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jun 28, 2024
a592c1a
cleane dup
nikk-nikaznan Jun 28, 2024
eefcf33
checking some test
nikk-nikaznan Jun 28, 2024
f0bcf65
rebase
nikk-nikaznan Jun 28, 2024
da0c62b
cleaned up
nikk-nikaznan Jun 28, 2024
01cb0f4
test works
nikk-nikaznan Jun 28, 2024
3ca1872
test works
nikk-nikaznan Jun 28, 2024
4d32f77
aded specific example
nikk-nikaznan Jun 28, 2024
ff059ea
some more test
nikk-nikaznan Jun 28, 2024
1195854
Update crabs/tracker/evaluate_tracker.py
nikk-nikaznan Jul 3, 2024
67fe295
Update crabs/tracker/evaluate_tracker.py
nikk-nikaznan Jul 3, 2024
9bf3a73
combine gt functions, fix test
nikk-nikaznan Jul 3, 2024
93915e1
rename test
nikk-nikaznan Jul 3, 2024
e1a8537
cleaned up linting
nikk-nikaznan Jul 3, 2024
d6401e1
adding some more description
nikk-nikaznan Jul 3, 2024
64ae8e8
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jul 3, 2024
73ae064
change the nested folder structure for output
nikk-nikaznan Jul 3, 2024
163cc06
adding device to cli
nikk-nikaznan Jul 4, 2024
cc6bbcf
Merge branch 'main' into nikkna/id_switches
nikk-nikaznan Jul 5, 2024
f042b2b
attempt yesterday
nikk-nikaznan Jul 5, 2024
56ff81d
small changes in docstring
nikk-nikaznan Jul 5, 2024
73607b4
Update crabs/tracker/utils/io.py
nikk-nikaznan Jul 5, 2024
f8c91a9
Update crabs/tracker/evaluate_tracker.py
nikk-nikaznan Jul 5, 2024
21930ac
changes for gt dict
nikk-nikaznan Jul 5, 2024
0e8a687
predicted as dict
nikk-nikaznan Jul 5, 2024
6e12530
rename varibale, fix test
nikk-nikaznan Jul 5, 2024
36757a5
reviewing id switch
nikk-nikaznan Jul 5, 2024
5b5e1de
commented out the test that fail
nikk-nikaznan Jul 5, 2024
e8f4446
commented out the test that fail
nikk-nikaznan Jul 5, 2024
a464d15
seems working
nikk-nikaznan Jul 5, 2024
98e77c3
small modification for the test
nikk-nikaznan Jul 5, 2024
41ab8cc
cleaned up
nikk-nikaznan Jul 5, 2024
491ae68
cleaned up
nikk-nikaznan Jul 8, 2024
ad8f83e
add gt tracking video
nikk-nikaznan Jul 8, 2024
5a7f32f
Merge branch 'main' into nikkna/gt_tracking_video
nikk-nikaznan Jul 8, 2024
749dc18
cleaned up
nikk-nikaznan Jul 8, 2024
0ee9bfe
adding test
nikk-nikaznan Jul 8, 2024
4db520d
test for predicted dict
nikk-nikaznan Jul 8, 2024
810a536
Merge branch 'main' into nikkna/gt_tracking_video
nikk-nikaznan Jul 9, 2024
7c06e2e
cleaned up from the latest merge in main
nikk-nikaznan Jul 9, 2024
9d0c185
fixed test
nikk-nikaznan Jul 9, 2024
14379e7
cleaned up import
nikk-nikaznan Jul 9, 2024
07c99d4
the revised version
nikk-nikaznan Jul 11, 2024
85b5b98
moved iou function to utils
nikk-nikaznan Jul 11, 2024
29ed15a
Merge branch 'main' into nikkna/gt_tracking_video
nikk-nikaznan Jul 19, 2024
2e1553d
fixed the gt to not save video by default
nikk-nikaznan Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change the variable
  • Loading branch information
nikk-nikaznan committed Jun 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f18a44cf2a42cb76c6c0e6fac699440f7f34c1e7
6 changes: 4 additions & 2 deletions crabs/detection_tracking/tracking_utils.py
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ def calculate_iou(box1: np.ndarray, box2: np.ndarray) -> float:
def count_identity_switches(
prev_frame_ids: Optional[list[list[int]]],
current_frame_ids: Optional[list[list[int]]],
n_gt: int,
current_gt: int,
) -> int:
"""
Count the number of identity switches between two sets of object IDs.
@@ -63,6 +63,8 @@ def count_identity_switches(
List of object IDs in the previous frame.
current_frame_ids : Optional[list[list[int]]]
List of object IDs in the current frame.
current_gt : int
Total ground truth number of crabs in current frame.

Returns
-------
@@ -80,7 +82,7 @@ def count_identity_switches(
n_difference = len(list(current_ids - prev_ids))

if prev_ids != current_ids:
if (len(current_ids) == n_gt) and (n_difference == 0):
if (len(current_ids) == current_gt) and (n_difference == 0):
return 0
else:
return n_difference