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

Motmetrics upgrade #263

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

ahuller3
Copy link

@ahuller3 ahuller3 commented Aug 3, 2021

Reformats data (uuids from string to int) and deals with invalid distances to make compatible with motmetrics version 1.2 which significantly improves runtime

makes changes to make data entries compatable with motmetrics version 1.2 for faster runtime
@johnwlambert
Copy link
Contributor

Thanks for the PR, @ahuller3. I'll take a look!

@johnwlambert
Copy link
Contributor

Looks like there are a few type complaints by mypy:

argoverse/evaluation/eval_tracking.py:164: error: Need type annotation for "all_uuids" (hint: "all_uuids: Dict[<type>, <type>] = ...")
argoverse/evaluation/eval_tracking.py:213: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:214: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:216: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:217: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:218: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:219: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:220: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:222: error: Non-overlapping container check (element type: "int", container item type: "str")
argoverse/evaluation/eval_tracking.py:223: error: Argument 1 to "append" of "list" has incompatible type "int"; expected "str"
argoverse/evaluation/eval_tracking.py:244: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:245: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:246: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:247: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:248: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:249: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:250: error: Invalid index type "int" for "Dict[str, Dict[str, Any]]"; expected type "str"
argoverse/evaluation/eval_tracking.py:252: error: Argument 1 to "append" of "list" has incompatible type "int"; expected "str"

@@ -154,8 +149,9 @@ def eval_tracks(
path_datasets = glob.glob(os.path.join(path_dataset_root, "*"))
num_total_gt = 0

path_counter = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks like we don't use this path_counter elsewhere, can we remove it?

@johnwlambert
Copy link
Contributor

Could you update the requirements file as well, where themotmetrics version is listed?

if bbox[3] > 0 and in_distance_range_pose(np.zeros(3), center, d_min, d_max):
track_label_uuid = gt_data[i]["track_label_uuid"]
if gt_data[i]["track_label_uuid"] not in track_label_uuids:
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Anna, could you add a brief inline comment here explaining the logic for what we are doing here?

@@ -165,7 +159,7 @@ def eval_tracks(
path_track_data = sorted(
glob.glob(os.path.join(os.fspath(path_tracker_output), "per_sweep_annotations_amodal", "*"))
)

all_uuids: Dict[str, int] = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

could we add a brief inline comment here explaining what the all_uuids dictionary is for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants