aimagelab / VATr

MIT License
72 stars 4 forks source link

execute python generate_fakes.py --checkpoint files/vatr.pth have wrong #20

Closed yuyukuy534 closed 11 months ago

yuyukuy534 commented 11 months ago

Hello, I get this error "assert len(old_model) == len(checkpoint) " when I execute python generate_fakes.py --checkpoint files/vatr.pth code, what is the reason for this?

vittoriopippi commented 11 months ago

I've just cloned the repo, and the command python generate_fakes.py --checkpoint files/vatr.pth doesn't give me any error...

yuyukuy534 commented 11 months ago

Hello, @vittoriopippi can you send me your generate_fakes. py file, I downloaded it from github and run it all the time with AssertionError

vittoriopippi commented 11 months ago

The downloaded file I've used is what you can find on GitHub. Which checkpoint are you using for the generation?

yuyukuy534 commented 11 months ago

Hello,@vittoriopippi I downloaded vatr.pth and command python generate_fakes. py--checkpoint files/vatr.pth, reporting an error of AssertionError

68a680f94928ff96ea90ab9530d318b
vittoriopippi commented 11 months ago

There is probably something wrong with your checkpoint since the vatr.pth checkpoint I've shared works completely fine. You are probably using a checkpoint trained by yourself. In that case, you should change the arguments of generate_fakes.py to match the same ones you've used during training.

If you have downloaded it, please ensure the checkpoint is downloaded correctly. Check if the checksum is the same as below:

(vatr) user@node:~/VATr$ md5sum files/vatr.pth 
d1386fd46314dd281d9046cd4d6e3852  files/vatr.pth

If not please download it again (link)

yuyukuy534 commented 11 months ago

@vittoriopippi Thank you very much for your timely reply. After I downloaded vatr.pth correctly, I executed the command to report an error of 'KeyError:' img_id '. What caused this?

cebdee8a7df8b7d80ea2c3af81d9844
vittoriopippi commented 11 months ago

Please follow the installation guide in the readme because you are using the wrong files. The IAM-32.pickle I've used differs from the one shared by HWT. My pickle file also includes a unique ID for each image.

https://github.com/aimagelab/VATr#installation

yuyukuy534 commented 11 months ago

Ok, thank you very much for your reply and guidance

yuyukuy534 commented 10 months ago

@vittoriopippi Hello, I have been looking up information to learn how to use OOV_word.text to calculate the FID value of OOV, but I still don't understand it. I hope I can get your guidance and help