libffcv / ffcv-imagenet

Train ImageNet *fast* in 500 lines of code with FFCV
Apache License 2.0
136 stars 34 forks source link

DEFAULT_CROP_RATIO wrong? #9

Open ByungKwanLee opened 2 years ago

ByungKwanLee commented 2 years ago

You remarked below settings of image resolution as 500px.

# Required environmental variables for the script:
export IMAGENET_DIR=/path/to/pytorch/format/imagenet/directory/
export WRITE_DIR=/your/path/here/

# Starting in the root of the Git repo:
cd examples;

# Serialize images with:
# - 500px side length maximum
# - 50% JPEG encoded
# - quality=90 JPEGs
./write_imagenet.sh 500 0.50 90

However, train_imagenet.py has a below environment variable https://github.com/libffcv/ffcv-imagenet/blob/e97289fdacb4b049de8dfefefb250cc35abb6550/train_imagenet.py#L94

I think it may be 224/500. Is it right?

vchiley commented 2 years ago

Standard I1k training with a 224 img size input

  1. resizes the image to 256
  2. crops out a 224 resolution img

where 224/256 is the crop ratio.