Closed mzhaoshuai closed 2 years ago
@lengstrom Thanks for your wonderful work!
I have a question about the parameters of the write_imagenet.py.
write_imagenet.py
From the repo of ffcv, we can see https://github.com/libffcv/ffcv/blob/bfd9b3d85e31360fada2ecf63bea5602e4774ba3/ffcv/fields/rgb_image.py#L337
ffcv
write_mode = self.write_mode as_jpg = None if write_mode == 'smart': as_jpg = encode_jpeg(image, self.jpeg_quality) write_mode = 'raw' if self.smart_threshold is not None: if image.nbytes > self.smart_threshold: write_mode = 'jpg' elif write_mode == 'proportion': if np.random.rand() < self.proportion: write_mode = 'jpg' else: write_mode = 'raw'
The default write mode in https://github.com/libffcv/ffcv-imagenet/blob/main/write_imagenet.py is smart, and the smart_threshold is None. So the script is actually running in RAW write mode?
smart
smart_threshold
RAW
Related issues are https://github.com/libffcv/ffcv-imagenet/issues/1
The script should use proportion as is passed in the actual execution script here: https://github.com/libffcv/ffcv-imagenet/blob/main/write_imagenet.sh
Thx for your reply. I make a mistake.
@lengstrom Thanks for your wonderful work!
I have a question about the parameters of the
write_imagenet.py
.From the repo of
ffcv
, we can see https://github.com/libffcv/ffcv/blob/bfd9b3d85e31360fada2ecf63bea5602e4774ba3/ffcv/fields/rgb_image.py#L337The default write mode in https://github.com/libffcv/ffcv-imagenet/blob/main/write_imagenet.py is
smart
, and thesmart_threshold
is None. So the script is actually running inRAW
write mode?Related issues are https://github.com/libffcv/ffcv-imagenet/issues/1