https://github.com/modeltc/imagenet-s
Robustness for real-world system noise
https://github.com/modeltc/imagenet-s
Last synced: 3 months ago
JSON representation
Robustness for real-world system noise
- Host: GitHub
- URL: https://github.com/modeltc/imagenet-s
- Owner: ModelTC
- Created: 2021-08-09T04:06:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T07:49:22.000Z (about 4 years ago)
- Last Synced: 2025-12-04T10:16:40.109Z (6 months ago)
- Language: Python
- Size: 3.99 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ImageNet-S
Robustness for real-world system noise
## Usage 1 --> Generate dataset on file system
from imagenet_s_gen import ImageTransfer
ImageTransfer(root_dir='/your/val/images/root/path', meta_file='/meta/val.txt',
save_root='/your/save/root/path', decoder_type='pil',
transform_type='val', resize_type='pil-bilinear').write_to_filesystem()
## Usage 2 --> Generate one image real time (recommend)
from imagenet_s_gen import ImageTransfer
image_gen = ImageTransfer(root_dir='/your/val/images/root/path', meta_file='/meta/val.txt',
save_root='', decoder_type='pil',
transform_type='val', resize_type='pil-bilinear')
# generate numpy image on index 0
numpy_image, label = image_gen.getimage(0)