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

Torch-based mAP #632

Merged
merged 55 commits into from
Dec 5, 2021
Merged

Torch-based mAP #632

merged 55 commits into from
Dec 5, 2021

Conversation

twsl
Copy link
Contributor

@twsl twsl commented Nov 22, 2021

What does this PR do?

Fixes #587

Simply converted the pycocotools source code to pytorch and torchvision instead of numpy.
The rest in based on @tkupek work.
I plan to rename the file as soon as I know that it's working, right now I still need both for comparison.

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@tkupek
Copy link
Contributor

tkupek commented Nov 22, 2021

Very cool! Thanks for porting that.

@twsl
Copy link
Contributor Author

twsl commented Nov 22, 2021

@tkupek
Copy link
Contributor

tkupek commented Nov 22, 2021

Is that correct, that there are two scores while only one prediction @tkupek?

https://github.com/PyTorchLightning/metrics/blob/57320637b9e19b11f5600fb061ff7b0c841fc515/tests/detection/test_map.py#L61-L63

obviously a bug, you can remove the second score

@Borda Borda added the enhancement New feature or request label Nov 25, 2021
@twsl twsl marked this pull request as ready for review November 26, 2021 02:18
@Borda
Copy link
Member

Borda commented Dec 4, 2021

@twsl over all it looks Great! mind checking the last failing test for new PT versions: tests/detection/test_map.py::test_empty_preds - ValueError: Input boxe...

CHANGELOG.md Show resolved Hide resolved
@Borda Borda requested a review from SkafteNicki December 4, 2021 11:14
@Borda Borda enabled auto-merge (squash) December 4, 2021 22:58
@mergify mergify bot added the ready label Dec 5, 2021
@Borda Borda merged commit 2494e68 into Lightning-AI:master Dec 5, 2021
Borda pushed a commit that referenced this pull request Dec 5, 2021
* First draft
* Remove double score
* Calculate num_class only
* Support empty predictions
* Remove pycocotools from tests
* Fix annotation id evals to false if zero
* Improve method descriptions
* Fix returning metrics if parameters are changed
* Apply suggestions from code review

Co-authored-by: Tobias Kupek <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
Co-authored-by: Justus Schock <[email protected]>
Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: Jirka <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

(cherry picked from commit 2494e68)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

re-implement mAP instead of using COCOtools
6 participants