DataIntelligenceCrew / data-selection

3 stars 0 forks source link

img2vec implementation of feature vectors #8

Closed jiwonac closed 2 years ago

jiwonac commented 2 years ago

get_all_resnet() function converts a list of PIL images from #7 to a list of ResNet-18 feature vectors utilizing the handy img2vec library.

A few things to note:

  1. ResNet-18 expects 244x244 images, since it was developed for ImageNet, not the CIFAR dataset. Note the line self.scaler = transforms.Resize((244, 244)) in img2vec/img_to_vec.py. I do not know if scaling 32x32 images to 244x244 will cause any issues.
  2. I don't have a CUDA-enabled machine at the moment. Pushing the commits now so that others can test them out.