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

New batch inference #3564

Merged
merged 15 commits into from
Sep 3, 2020
Merged

New batch inference #3564

merged 15 commits into from
Sep 3, 2020

Conversation

yhcao6
Copy link
Collaborator

@yhcao6 yhcao6 commented Aug 16, 2020

No description provided.

@yhcao6 yhcao6 added the WIP Working in progress label Aug 16, 2020
configs/test/mask_rcnn_r50_fpn_1x_coco.py Outdated Show resolved Hide resolved
dict(type='RandomFlip'),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add the corresponding description at the tutorial part since it seems that the default config must be modified.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In the tutorial, please also add a note that batch inference is not recommended for unfixed image sizes since it would be even slower and hurt the performance.

mmdet/models/roi_heads/standard_roi_head.py Show resolved Hide resolved
tools/test.py Outdated Show resolved Hide resolved
mmdet/models/detectors/base.py Outdated Show resolved Hide resolved
mmdet/models/roi_heads/standard_roi_head.py Outdated Show resolved Hide resolved
mmdet/models/roi_heads/test_mixins.py Outdated Show resolved Hide resolved
@Johnson-Wang
Copy link
Collaborator

Johnson-Wang commented Aug 26, 2020

Since this PR would change the interfaces when inference with batch size=1, it's better to make sure all models are compatible. is it convenient to run a benchmark test for all the pretrained models?

@yhcao6 yhcao6 removed the WIP Working in progress label Aug 29, 2020
@codecov
Copy link

codecov bot commented Aug 29, 2020

Codecov Report

Merging #3564 into master will increase coverage by 0.05%.
The diff coverage is 59.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3564      +/-   ##
==========================================
+ Coverage   61.01%   61.06%   +0.05%     
==========================================
  Files         205      216      +11     
  Lines       13827    15315    +1488     
  Branches     2344     2607     +263     
==========================================
+ Hits         8436     9352     +916     
- Misses       4962     5498     +536     
- Partials      429      465      +36     
Flag Coverage Δ
#unittests 61.06% <59.01%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmdet/apis/inference.py 20.73% <0.00%> (ø)
mmdet/apis/test.py 13.08% <0.00%> (+0.47%) ⬆️
mmdet/core/bbox/__init__.py 100.00% <ø> (ø)
mmdet/core/bbox/assigners/max_iou_assigner.py 72.36% <ø> (ø)
mmdet/models/detectors/fast_rcnn.py 43.75% <ø> (+4.86%) ⬆️
mmdet/models/losses/cross_entropy_loss.py 100.00% <ø> (ø)
mmdet/models/roi_heads/point_rend_roi_head.py 21.81% <0.00%> (-2.93%) ⬇️
mmdet/models/roi_heads/htc_roi_head.py 31.83% <2.32%> (-2.63%) ⬇️
mmdet/core/bbox/assigners/grid_assigner.py 28.00% <28.00%> (ø)
mmdet/models/dense_heads/sabl_retina_head.py 30.41% <30.41%> (ø)
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f93c00f...5f33731. Read the comment docs.

tools/test.py Outdated Show resolved Hide resolved
@Johnson-Wang
Copy link
Collaborator

Johnson-Wang commented Aug 31, 2020

I wonder if it is possible to summarize the tested scripts and configs to ensure compatibility. I think there are still several scripts left for compatibility check. To name a few, pytorch2onnx, webcam_demo etc.

@hellock hellock merged commit e5072a3 into open-mmlab:master Sep 3, 2020
@hellock hellock mentioned this pull request Sep 12, 2020
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.

3 participants