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

MMMosaic bug fix #231

Merged
merged 1 commit into from
Nov 23, 2022
Merged

Conversation

k-washi
Copy link
Contributor

@k-washi k-washi commented Nov 13, 2022

Fix index of image_scale with y2 with bottom_left implemented in _mosaic_combine

Motivation

MMMosaic bug fix

Original Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
    data = fetcher.fetch(index)
  File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/ubuntu/zrn_road_sign_detection_experiments/EasyCV/package/easycv/datasets/detection/mix.py", line 107, in __getitem__
    results = transform(results)
  File "/home/ubuntu/zrn_road_sign_detection_experiments/EasyCV/package/easycv/datasets/detection/pipelines/mm_transforms.py", line 109, in __call__
    results = self._mosaic_transform(results)
  File "/home/ubuntu/zrn_road_sign_detection_experiments/EasyCV/package/easycv/datasets/detection/pipelines/mm_transforms.py", line 174, in _mosaic_transform
    mosaic_img[y1_p:y2_p, x1_p:x2_p] = img_i[y1_c:y2_c, x1_c:x2_c]
ValueError: could not broadcast input array from shape (1333,1819,3) into shape (1291,1819,3)

Modification

Fixed image_scale index from 1 to 0

@CLAassistant
Copy link

CLAassistant commented Nov 13, 2022

CLA assistant check
All committers have signed the CLA.

@wenmengzhou
Copy link
Collaborator

please merge master and rerun the lint test

@wenmengzhou wenmengzhou merged commit a36e0e3 into alibaba:master Nov 23, 2022
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