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

[FIX] Enable YOLOX training on different devices #7912

Merged
merged 2 commits into from
May 8, 2022

Conversation

solyaH
Copy link
Contributor

@solyaH solyaH commented May 5, 2022

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

YOLOX training is only available on Cuda. Make it possible to run on an arbitrary device.

Modification

Send tensor to the appropriate device on the random resizing step.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link

CLAassistant commented May 5, 2022

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #7912 (9268b37) into dev (73b4e65) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev    #7912      +/-   ##
==========================================
+ Coverage   64.71%   64.85%   +0.14%     
==========================================
  Files         351      351              
  Lines       28461    28466       +5     
  Branches     4807     4807              
==========================================
+ Hits        18418    18463      +45     
+ Misses       9055     9025      -30     
+ Partials      988      978      -10     
Flag Coverage Δ
unittests 64.83% <100.00%> (+0.12%) ⬆️

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

Impacted Files Coverage Δ
mmdet/models/detectors/yolox.py 79.59% <100.00%> (+51.02%) ⬆️
mmdet/core/bbox/samplers/random_sampler.py 75.00% <0.00%> (-5.56%) ⬇️
mmdet/models/detectors/cornernet.py 94.87% <0.00%> (-5.13%) ⬇️
mmdet/models/dense_heads/corner_head.py 68.33% <0.00%> (-1.39%) ⬇️
mmdet/datasets/samplers/infinite_sampler.py 24.69% <0.00%> (-0.63%) ⬇️
mmdet/datasets/pipelines/transforms.py 76.00% <0.00%> (+0.03%) ⬆️
mmdet/datasets/custom.py 61.45% <0.00%> (+0.20%) ⬆️
mmdet/models/dense_heads/yolox_head.py 79.38% <0.00%> (+0.51%) ⬆️
mmdet/models/backbones/csp_darknet.py 100.00% <0.00%> (+1.16%) ⬆️
mmdet/core/bbox/assigners/max_iou_assigner.py 73.68% <0.00%> (+1.31%) ⬆️
... and 7 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 73b4e65...9268b37. Read the comment docs.

@ZwwWayne ZwwWayne merged commit 5146c3b into open-mmlab:dev May 8, 2022
ZwwWayne pushed a commit that referenced this pull request Jul 18, 2022
* Enable yolox training on different devices

* Enable yolox resize test on cpu
ZwwWayne pushed a commit to ZwwWayne/mmdetection that referenced this pull request Jul 19, 2022
* Enable yolox training on different devices

* Enable yolox resize test on cpu
SakiRinn pushed a commit to SakiRinn/mmdetection-locount that referenced this pull request Mar 17, 2023
* Enable yolox training on different devices

* Enable yolox resize test on cpu
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.

None yet

4 participants