Imagenet32_Scripts icon indicating copy to clipboard operation
Imagenet32_Scripts copied to clipboard

Some updates I found useful

Open yanivbl6 opened this issue 5 years ago • 1 comments

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:

  1. np.imread was since deprecated, so I replaced it was imageio.imread for the same effect.
  2. get_ordered_folders() proved problematic when using the --every_nth option, so I replaced it with a scan of the folder.
  3. 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.

yanivbl6 avatar Oct 10 '19 12:10 yanivbl6

Hi @yanivbl6

Thanks for your interest,

  1. 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

PatrykChrabaszcz avatar Oct 19 '19 16:10 PatrykChrabaszcz