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

Mmdet adapter #1545

Merged
merged 30 commits into from
Oct 12, 2022
Merged

Mmdet adapter #1545

merged 30 commits into from
Oct 12, 2022

Conversation

A-Jacobson
Copy link
Contributor

@A-Jacobson A-Jacobson commented Sep 21, 2022

mmdet adapter, tested with yolox and faster-rcnn.

MAP metric, taken from torchmetrics 0.6.0 (last working version)

allowed dict literals in our pre-hook config to accommodate mmdet configs.

maskrcnn/instance segmentation works for some models but needs more testing. Decided not to mention it in these docs as I'm not sure if all/most models work.

@A-Jacobson A-Jacobson requested review from a team as code owners September 21, 2022 11:03
@A-Jacobson A-Jacobson requested a review from Landanjs September 21, 2022 22:52
Copy link
Contributor

@Landanjs Landanjs left a comment

Choose a reason for hiding this comment

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

I think the code itself looks good although I'm not very familiar with using COCOEval and MMdetection, so I might have missed something.

The only obvious issues are with the docstrings. I commented on things that I thought were against our "standard" (although I may be mistaken and we may not have a standard in some cases...). Also, there are a few instances where lists (e.g. for COCO dictionary keys) are not rendered properly on the docs website although I'm not sure the format to get these to render properly.

Couple of questions:

  • Would it be possible to test the MAP torchmetrics? I can imagine this be very difficult, but if it ever gets messed with in the future, it would be nice to be able to tell if it broke. A simple test like checking identical outputs results in a mAP of 1 may even be helpful.
  • Are there references for the model output for both training and testing? Also, a definition for the mmedetection batch (is the test definition sufficient?)? If you think it would be appropriate to add these details to the code, I think it would make it a lot easier to use. If not, let's at least record somewhere

composer/metrics/map.py Show resolved Hide resolved
composer/metrics/map.py Outdated Show resolved Hide resolved
composer/metrics/map.py Outdated Show resolved Hide resolved
composer/metrics/map.py Show resolved Hide resolved
composer/metrics/map.py Show resolved Hide resolved
composer/models/mmdetection.py Outdated Show resolved Hide resolved
composer/models/mmdetection.py Show resolved Hide resolved
composer/models/mmdetection.py Outdated Show resolved Hide resolved
composer/models/mmdetection.py Show resolved Hide resolved
tests/models/test_mmdet_model.py Outdated Show resolved Hide resolved
@A-Jacobson A-Jacobson requested review from Landanjs and eracah October 5, 2022 21:44
Copy link
Contributor

@Landanjs Landanjs left a comment

Choose a reason for hiding this comment

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

LGTM!

  • Question on the ImportError for torchvision in the MAP metric
  • Copying the map dict docstrings in the eval_forward() function
  • Nits (feel free to ignore as you see fit)

Approving as a peace offering 😁

composer/metrics/map.py Outdated Show resolved Hide resolved
composer/metrics/map.py Outdated Show resolved Hide resolved
composer/metrics/map.py Outdated Show resolved Hide resolved
composer/metrics/map.py Outdated Show resolved Hide resolved
composer/models/mmdetection.py Outdated Show resolved Hide resolved
composer/models/mmdetection.py Outdated Show resolved Hide resolved
Copy link
Contributor

@eracah eracah left a comment

Choose a reason for hiding this comment

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

LGTM

Landanjs and others added 2 commits October 7, 2022 15:15
Co-authored-by: Landan Seguin <landan@mosaicml.com>
A-Jacobson and others added 8 commits October 10, 2022 16:34
Co-authored-by: Landan Seguin <landan@mosaicml.com>
Co-authored-by: Landan Seguin <landan@mosaicml.com>
Co-authored-by: Landan Seguin <landan@mosaicml.com>
Co-authored-by: Landan Seguin <landan@mosaicml.com>
@A-Jacobson A-Jacobson merged commit 708136b into mosaicml:dev Oct 12, 2022
@A-Jacobson A-Jacobson deleted the mmdet-adapter branch October 12, 2022 01:09
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.

4 participants