yolu1055 / conditional-glow

Conditional-Glow for Structured Prediction
26 stars 7 forks source link

valid images are all black for the horse dataset #7

Closed alephpi closed 1 year ago

alephpi commented 1 year ago

Hi, Thank you for your work. I think I encounter the same issue as #3 when running your code. I'm following your instructions in readme and test it on horse dataset. I still get all black images(at least for the first 11000 iterations, i.e. 11 valid images). My folder structure is like the following: image The loss seems to converge around 1. What I provide in the train.txt is like

horse001.jpg
horse002.jpg
...

Could you give any insights? What are the valid images and loss evolution supposed to be? For info: I run the code with latest version of pytorch, numpy and so on(But as I didn't encounter any bugs, I think it should not be the compatibility issue)

alephpi commented 1 year ago

Well, turns out to be the issue of skimage package. From version 0.19, the bg_label parameter for skimage.color.label2rgb function default value will be 0 instead of -1. So better explicitly set it to -1 here. Also, it worths noting in the readme what is the version of skimage package in your original repo. Now I can get valid_images like after 1000 iterations img-1000

yolu1055 commented 1 year ago

Thank you for figuring out this issue. I will update the REAME.