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

Questions in converting cityscapes dataset #9

Open
jfzhuang opened this issue May 6, 2021 · 3 comments
Open

Questions in converting cityscapes dataset #9

jfzhuang opened this issue May 6, 2021 · 3 comments

Comments

@jfzhuang
Copy link

jfzhuang commented May 6, 2021

Thanks for your excellent work and kindly code releasing. I have a problem when reproducing the cityscapes experiment.

Following your tutorial, I have reproduced the experimental results, 44.37 vs. 51.73 with 6.79 improvement under the cutmix setting. When delving deep into the codes, I notice that you implement a downsample_label_img function for downsampling ground truth in the convert_cityscapes.py. However, it is more common to use nearest downsampling method in cv2 or PIL. Then, I replace the downsample_label_img function with the following:
y_img = cv2.resize(y_img, (1024, 512), interpolation=cv2.INTER_NEAREST)
and re-conduct the cityscapes experiment. The results degrades greatly, 43.79 vs. 47.02 with only 3.23 improvement.

I wonder the reason why a different downsample method affects the result greatly and the motivation to reimplement a downsample method rather than using a common one.

@jfzhuang jfzhuang changed the title Problems in converting cityscapes dataset Questions in converting cityscapes dataset May 6, 2021
@Britefury
Copy link
Owner

Britefury commented May 6, 2021

Hi, thank you for exploring this. I have to admit I didn't give it much thought. When downsampling an RGB image you tend to get better results - at least visually - by using a local mean approach, so I tried to replicate this for labels as best I could. I didn't consider alternatives.

Out of curiosity, do your results arise from a single run or from the average of multiple runs?

@jfzhuang
Copy link
Author

jfzhuang commented May 6, 2021

Thanks for your quick reply and resolve my concern. The results arise from a single run.

@Britefury
Copy link
Owner

Sure thing.

You may find that taking the average of a few runs will close the gap between the results from various downsampling methods.

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

2 participants