- Install requirements
pip install -r requirements.txt
- Prepare a directory with images
- Run the benchmark
python benchmark.py --data-dir <path to directory with images> --images <number of images> --runs <number of runs> --print-package-versions
for example
python benchmark.py --data-dir '/hdd/ILSVRC2012_img_val' --images 2000 --runs 5 --print-package-versions
To use Pillow-SIMD instead of Pillow as a torchvision backend:
- Uninstall Pillow
pip uninstall -y pillow
- Install Pillow-SIMD
pip install pillow-simd