-
Notifications
You must be signed in to change notification settings - Fork 246
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
Update eval_tracking.py #267
base: master
Are you sure you want to change the base?
Conversation
broke eval_tracks into smaller functions
@@ -104,176 +104,149 @@ def get_distance(x1: Dict[str, np.ndarray], x2: Dict[str, np.ndarray], name: str | |||
raise NotImplementedError("Not implemented..") | |||
|
|||
|
|||
def eval_tracks( | |||
def get_frame_data( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @ahuller3, how long does get_frame_data()
take compared to the mot metrics eval function call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was asked to look at PRs in here and I didn't realize until just now that this is still a draft -- sorry for any spam, but I figured I'd submit the comments I have to save you pain later.
acc_c, | ||
acc_i, | ||
acc_o, | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No return type? Also no types on acc_c
, acc_i
, acc_o
...
Also, this function has way too many arguments. It seems like we probably needs a refactor.
|
||
for ind_frame in range(len(path_track_data)): | ||
if ind_frame % 50 == 0: | ||
logger.info("%d/%d" % (ind_frame, len(path_track_data))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably:
logger.info("%d/%d", ind_frame, len(path_track_data))
if ind_frame % 50 == 0: | ||
logger.info("%d/%d" % (ind_frame, len(path_track_data))) | ||
if not os.path.exists(path_gt): | ||
logger.warning("Missing ", path_gt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a placeholder in this log format string.
def write_summary_to_file( | ||
acc_c, | ||
acc_o, | ||
ID_gt_all: List[str], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually have to be List
or can it be Collection
or Iterable
or Sequence
?
Broke eval_tracks into smaller functions. Still needs comments and some type annotations.