-
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
RetinaNet object detection (take 2) #2784
Merged
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
50f822c
Add rough implementation of RetinaNet.
hgaiser 022f8e1
Move AnchorGenerator to a seperate file.
8e0804d
Move box similarity to Matcher.
hgaiser ad53194
Expose extra blocks in FPN.
hgaiser 2a5a5be
Expose retinanet in __init__.py.
hgaiser 49e990c
Use P6 and P7 in FPN for retinanet.
hgaiser b5966eb
Use parameters from retinanet for anchor generation.
hgaiser aab1b28
General fixes for retinanet model.
hgaiser c078114
Implement loss for retinanet heads.
hgaiser eae4ee5
Output reshaped outputs from retinanet heads.
hgaiser 3dac477
Add postprocessing of detections.
hgaiser 9981a3c
Small fixes.
hgaiser 5571dfe
Remove unused argument.
hgaiser fc7751b
Remove python2 invocation of super.
hgaiser b942648
Add postprocessing for additional outputs.
hgaiser b619936
Add missing import of ImageList.
hgaiser 8c86588
Remove redundant import.
hgaiser 2934f0d
Simplify class correction.
hgaiser 32b8e77
Fix pylint warnings.
hgaiser 437bfe9
Remove the label adjustment for background class.
9e810d6
Set default score threshold to 0.05.
f7d8c2e
Add weight initialization for regression layer.
d86c437
Allow training on images with no annotations.
72e46f2
Use smooth_l1_loss with beta value.
41c90fa
Add more typehints for TorchScript conversions.
hgaiser b9daa86
Fix linting issues.
hgaiser 97d63b6
Fix type hints in postprocess_detections.
hgaiser eba7e16
Fix type annotations for TorchScript.
9545059
Fix inconsistency with matched_idxs.
4865952
Add retinanet model test.
6e065be
Add missing JIT annotations.
7dc4c6b
Remove redundant model construction
fmassa 640e59b
Fix bugs during training on newer PyTorch and unused params in DDP
fmassa 23cabe3
Cleanup resnet_fpn_backbone
fmassa 214ead7
Use L1 loss for regression
fmassa 44a1333
Disable support for images with no annotations
fmassa c2f6334
Merge branch 'master' of github.com:pytorch/vision into retinanet
fmassa e560039
Fix retinanet tests
fmassa 0647732
Fix Lint
fmassa aa6364f
Add pretrained model
fmassa 9b62169
Add training info for retinanet
fmassa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why switch it to regular l1 loss?
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.
This gives a 1 mAP improvement on the models, and we were still lagging a bit behind on the mAP compared to detectron2 (which has now adopted the L1 loss by default as well, see facebookresearch/detectron2@b0e2687)
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.
Ah nice, wasn't expecting such a difference. What is the mAP that you are getting now? Also, wow, 37.4 mAP. That's impressive.
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.
Here is the mAP scores for the model I'll be uploading, with L1 loss:
It is still lagging behind compared to D2, but it's a bit closer. We might revisit the models in torchvision in the near future to improve mAP with latest training tricks.