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

Support resize data augmentation according to original image size #291

Merged
merged 9 commits into from
Dec 15, 2020

Conversation

Junjun2016
Copy link
Collaborator

Support resize data augmentation according to original image size (img_scale=None and ratio_range is tuple).

@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #291 (99a364b) into master (9046512) will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #291      +/-   ##
==========================================
+ Coverage   84.68%   84.88%   +0.19%     
==========================================
  Files          90       90              
  Lines        4414     4425      +11     
  Branches      705      710       +5     
==========================================
+ Hits         3738     3756      +18     
+ Misses        536      531       -5     
+ Partials      140      138       -2     
Flag Coverage Δ
unittests 84.88% <100.00%> (+0.19%) ⬆️

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

Impacted Files Coverage Δ
mmseg/datasets/pipelines/loading.py 97.05% <ø> (ø)
mmseg/datasets/pipelines/test_time_aug.py 96.29% <100.00%> (+16.29%) ⬆️
mmseg/datasets/pipelines/transforms.py 97.98% <100.00%> (+0.01%) ⬆️

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 9046512...3ab955e. Read the comment docs.

Comment on lines 21 to 22
and multiply it with the image scale. When img_scale is None, img_scale is
the shape of image in results (img_scale = results['img'].shape[:2]).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
and multiply it with the image scale. When img_scale is None, img_scale is
the shape of image in results (img_scale = results['img'].shape[:2]).
and multiply it with the image scale. When img_scale is None, the image is resized based on the original size.

Comment on lines 105 to 109
if self.img_scale is None and mmcv.is_list_of(self.img_ratios, float):
img_scale = results['img'].shape[:2]
self.img_scale = [(int(img_scale[0] * ratio),
int(img_scale[1] * ratio))
for ratio in self.img_ratios]
Copy link
Collaborator

Choose a reason for hiding this comment

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

self.img_scale is set after first __call__, so for the second image, it won't set again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed it and please check it again!

@xvjiarui xvjiarui merged commit 061a295 into open-mmlab:master Dec 15, 2020
@hellock
Copy link
Member

hellock commented Dec 16, 2020

Task linked: CU-herb9d Resize data aug

bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
…en-mmlab#291)

* Support resize data augmentation according to original image size (img_scale=None and retio_range is tuple)

* fix docstring

* fix bug

* add unittest

* img_scale=None in TTA

* fix bug

* add unittest

* fix typos

* fix bug
wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this pull request Dec 3, 2023
* udp for bottom_up paradigm in 'switch' method

* fix some code style, pylint problems

* fix two code style, pylint problems

* fix some code style, pylint problems

* fix some code style, pylint problems

* UDP for top-down paradigm

* fix code style problems

* fix some code style problems

* fix some code style problems

* fix some code style and explanation problems

* fix some code style problems

* simplify the implementation of 'pose_dark' and fix its usage error in top-down paradigm.

* fix some code style problems

* fix the conflict

* fix the code style problems in JointsMSELoss_Combined and fix the testing problem by setting the default kpd as '0.0546875'.

* fix some code style problems

* fix some code style problems

* fix some code style problems

* fix some code style problems

* fix some code style problems

* add a config for unbiased data processing with GaussianHeatmap target in top-down paradigm and hrnet structure for bottom-up paradigm
sibozhang pushed a commit to sibozhang/mmsegmentation that referenced this pull request Mar 22, 2024
* [Feature] Add motion decoder.

* Fix the bad double loop with numpy broadcast and slice.

* Remove FFMpegDecodeMotionVector and fix review issues.

Minor.

* Minor.

* Minor fix.

* Minor fix and change changelog.

* Minor fix for pyint.

* Rename the field mvs.

Minor fix changelog.

* More unittest.

* Revised according to review.

Fix typo.

* Minor fix.

* parse vectors to staticmethod..

fix.
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