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

Tracking_eval refactor #660

Conversation

mengnutonomy
Copy link
Contributor

@mengnutonomy mengnutonomy commented Sep 16, 2021

This PR moves the fields TRACKING_NAMES, PRETTY_TRACKING_NAMES and TRACKING_COLORS from constants.py to the config json file. This way users can use the tracking eval code on custom datasets with different classes.

Copy link
Collaborator

@whyekit-motional whyekit-motional left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

assert set(class_range.keys()) == set(TRACKING_NAMES), "Class count mismatch."

assert set(class_range.keys()) == set(tracking_names), "Class count mismatch."
global TRACKING_NAMES
Copy link
Contributor

@lubing-motional lubing-motional Sep 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you need to define it as global rather than just use self.tracking_names

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert tracking_name in TRACKING_NAMES, 'Error: Unknown tracking_name %s' % tracking_name

It is needed here, and I donot want to change TrackingBox to include extra things.

Copy link
Contributor

@lubing-motional lubing-motional Sep 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, then it's better to define this global variable at the beginning of this file, since it's shared by the 2 classes.

@whyekit-motional whyekit-motional merged commit 5bc5627 into nutonomy:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants