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

run test, but do not get predicted png #479

Closed
rock4you opened this issue Apr 14, 2021 · 7 comments
Closed

run test, but do not get predicted png #479

rock4you opened this issue Apr 14, 2021 · 7 comments

Comments

@rock4you
Copy link

./tools/dist_test.sh configs/pspnet/pspnet_r50-d8_512x1024_40k_cityscapes.py
checkpoints/pspnet_r50-d8_512x1024_40k_cityscapes_20200605_003338-2966598c.pth
4 --format-only --eval-options "imgfile_prefix=./pspnet_test_results"

do not get the dir and the png

@dywu98
Copy link

dywu98 commented May 7, 2021

same issure!

@ganyz
Copy link

ganyz commented May 11, 2021

me too

@ganyz
Copy link

ganyz commented May 11, 2021

me too

I understand, in tools/test.py

if args.format_only:
dataset.format_results(outputs, **kwargs)

the cityscape dataset has achieved the function format_results. (see the mmseg/datasets/cityscapes.py)
but the ade20k dataset class hasn't achieved the format_results. ( None in mmseg/datasets/ade.py)
So you have to write the codes yourself for ade dataset.

@xvjiarui
Copy link
Collaborator

Fixed in #544

@ganyz
Copy link

ganyz commented May 12, 2021

Fixed in #544

Thank you!
In addition, I have a question in the new 'ade.py'

       if len(result.shape) == 2:
            # print(result.shape)
            png_filename = osp.join(imgfile_prefix, f'{basename}.png')

            result = result + 1

            output = Image.fromarray(result.astype(np.uint8))
            output.save(png_filename)
            result_files.append(png_filename)

Why the result should add 1 ?
@xvjiarui Thank you! :>

@clownrat6
Copy link
Contributor

Fixed in #544

Thank you!
In addition, I have a question in the new 'ade.py'

       if len(result.shape) == 2:
            # print(result.shape)
            png_filename = osp.join(imgfile_prefix, f'{basename}.png')

            result = result + 1

            output = Image.fromarray(result.astype(np.uint8))
            output.save(png_filename)
            result_files.append(png_filename)

Why the result should add 1 ?
@xvjiarui Thank you! :>

When training, we set reduce_zero_label=True. So, the label value range is from 0-149. But the label value range of test set if from 0-150. So, we add 1.

@clownrat6
Copy link
Contributor

If there aren't any other problems. I will close this issue.

aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this issue Mar 27, 2023
* Unify offset configuration in DDIM and PNDM schedulers

* Format

Add missing variables

* Fix pipeline test

* Update src/diffusers/schedulers/scheduling_ddim.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* Default set_alpha_to_one to false

* Format

* Add tests

* Format

* add deprecation warning

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this issue Mar 27, 2023
* remove match_shape

* ported fixes from open-mmlab#479 to flax

* remove unused argument

* typo

* remove warnings
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

No branches or pull requests

5 participants