Skip to content

[Bug Fix] Fix TTA resize scale #334

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Jan 7, 2021
Merged

[Bug Fix] Fix TTA resize scale #334

merged 3 commits into from
Jan 7, 2021

Conversation

yamengxi
Copy link
Collaborator

@yamengxi yamengxi commented Jan 7, 2021

No description provided.

@xvjiarui xvjiarui changed the title [fix]fix tta bug [Bug Fix] Fix TTA resize scale Jan 7, 2021
@@ -157,7 +157,7 @@ def _random_scale(self, results):
if self.ratio_range is not None:
if self.img_scale is None:
scale, scale_idx = self.random_sample_ratio(
results['img'].shape[:2], self.ratio_range)
results['img'].shape[:2:-1], self.ratio_range)
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
results['img'].shape[:2:-1], self.ratio_range)
h, w = results['img'].shape[:2]
(w, h), self.ratio_range)

is more intuitive.

@codecov
Copy link

codecov bot commented Jan 7, 2021

Codecov Report

Merging #334 (6f5dfb3) into master (9f071ca) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #334   +/-   ##
=======================================
  Coverage   86.47%   86.47%           
=======================================
  Files          95       95           
  Lines        4761     4762    +1     
  Branches      765      765           
=======================================
+ Hits         4117     4118    +1     
  Misses        499      499           
  Partials      145      145           
Flag Coverage Δ
unittests 86.47% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
mmseg/datasets/pipelines/test_time_aug.py 96.29% <100.00%> (ø)
mmseg/datasets/pipelines/transforms.py 97.12% <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 9f071ca...6f5dfb3. Read the comment docs.

@xvjiarui xvjiarui merged commit 77e8ce3 into open-mmlab:master Jan 7, 2021
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
* fix tta bug

* modify as suggested

* fix test_tta bug
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
…return tuples (open-mmlab#334)

* add outputs for models

* add for pipelines

* finish schedulers

* better naming

* adapt tests as well

* replace dict access with . access

* make schedulers works

* finish

* correct readme

* make  bcp compatible

* up

* small fix

* finish

* more fixes

* more fixes

* Apply suggestions from code review

Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

* Update src/diffusers/models/vae.py

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

* Adapt model outputs

* Apply more suggestions

* finish examples

* correct

Co-authored-by: Suraj Patil <surajp815@gmail.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants