-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Properly handle maskrcnn and keypoints w.r.t. V2 in detection references #7742
Conversation
NicolasHug
commented
Jul 13, 2023
- a bunch of cleanups and better error messages
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
|
||
ds = ds_fn(p, image_set=image_set, transforms=get_transform(is_train, args), use_v2=args.use_v2) | ||
num_classes, mode = {"coco": (91, "instances"), "coco_kp": (2, "person_keypoints")}[args.dataset] | ||
with_masks = "mask" in args.model |
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.
Maybe we should remove the get_masks
parameter of get_coco()
and just make it part of the mode
parameter, i.e. allow "instances", "instances_masks", and "keypoints".
ooooor just completely change the parametrization of get_coco()
to something more friendly.
In addition to that, the way we magically specify keypoints or masks (through dataset name or through model name) is pretty terrible right now.
I feel like we should address that for good, but I'd prefer doing it in another PR
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.
Yes, I agree that it would be better that args.dataset
could parametrize data type instead of the model name.
args.dataset
can be "coco, "coco_kp" and "coco_masks", for example.
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.
Looks good to me
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.
Thanks Nicolas!
Hey @NicolasHug! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
…n references (#7742) Summary: Co-authored-by: Philip Meier <github.pmeier@posteo.de> Reviewed By: matteobettini Differential Revision: D48642313 fbshipit-source-id: 2bf2bdbaef94dc7851646581bb922fc69fc42e77