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

Modification of superpixel size #47

Open
Kitsmi opened this issue Jan 7, 2024 · 4 comments
Open

Modification of superpixel size #47

Kitsmi opened this issue Jan 7, 2024 · 4 comments

Comments

@Kitsmi
Copy link

Kitsmi commented Jan 7, 2024

Hello author, I have two questions to ask.
Firstly, if I still use the BSDS500 dataset, I can set the superpixel size to 20 × 20 or 21 × 21 or any other value?
Secondly, how can I modify the code to achieve this? Directly modifying the downsize as shown in the figure may result in an error. I made some changes to the code myself, but the result was not ideal. I think I overlooked some important parameters. Thank you.
image

@fuy34
Copy link
Owner

fuy34 commented Jan 7, 2024

Thanks for your interest in our work. Not sure the exactly reason based on your description. But here are a few things you may want to check

  1. whether the image size is dividable by 20 or 21 in both height and width dimension
  2. whether the downsized image can be dividable by 16

if the answer to any of them is negative, please consider using a similar resizing strategy we implemented here.

@Kitsmi
Copy link
Author

Kitsmi commented Jan 9, 2024

Thank you for your reply. I have ensured that the size of the input image is a multiple of 20 as you said. Although the model training can proceed normally, the results are not ideal.
image

The generated superpixel image will produce many regular grid shapes.
5096_img_sPixel

And I am not sure if any other code should be changed. For example, the code in the 'train_util' or 'loss', I didn't explain it clearly before. I tried to modify the code in the 'train_util' and 'loss' before and it was able to train normally, but the results were not ideal.
Like this
image

And the results:
5096_img_sPixel
14092_img_sPixel

Another point is that when I did the first step of 'Data preparation', the generated images were mostly black. I'm not sure if this is normal or what version is problematic.
image
8143_2_label

@fuy34
Copy link
Owner

fuy34 commented Jan 9, 2024

It sounds you re-trained the model. And there is some training issue. You may want to debug your training code.

The label are close to black because it is started with 1, 2, 3 etc. You can check the value if they looks normal to you.

@DevKPro
Copy link

DevKPro commented Feb 4, 2024

Hello Kitsmi, have you resolved the issue? I encountered a similar problem as yours.

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

3 participants