Imagenet32_Scripts
Imagenet32_Scripts copied to clipboard
Some updates I found useful
hi, I tried working with this repository and found it useful for generating new datasets (thanks, by the way).
In order to get it to work I had to make a few changes I thought could be useful to others:
- np.imread was since deprecated, so I replaced it was imageio.imread for the same effect.
- get_ordered_folders() proved problematic when using the --every_nth option, so I replaced it with a scan of the folder.
- In addition, I wanted a dataset I can plug-and-train in existing pytorch networks, so I add an optional/example file that gives a TorchVision.Dataset class, based on the files generated by the scripts. It also have a "statistics" function that extract the mean/stderr per channel for normalization. It's not a production-level code by I am sure it can help some users.
I am running it at the moment and it seems to be training well.
Hi @yanivbl6
Thanks for your interest,
- np.imread was since deprecated, so I replaced it was imageio.imread for the same effect.
I would prefer to keep the old code, in the paper we explicitly mention which library version was used to generate the data.
As for the other changes I don't really have time to check if everything works as it should.
However, since your changes might be useful for others, here is what we could do:
You add them to your repository, You give me short paragraph with the description and with a link to your repository and I add it to the README.md
Let me know what you think.
Cheers, Patryk