Skip to content

Commit c8f7ce5

Browse files
authored
Update README.md
1 parent 674a5df commit c8f7ce5

File tree

1 file changed

+5
-3
lines changed
  • quantization/image_classification/trt/resnet50

1 file changed

+5
-3
lines changed

quantization/image_classification/trt/resnet50/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ Following is the end-to-end example using ORT quantization tool to quantize ONNX
33

44
## Environment setup
55
### dataset
6-
First, prepare dataset for calibration as well as evaluation.
7-
We suggest to use ImageNet 2012 classification dataset to do the model calibration and evaluation. In addition to the sample code we provide below, TensorRT model optimizer which leverages torchvision.datasets already provides
8-
the ability to work with ImageNet dataset.
6+
First, prepare the dataset for calibration. TensorRT recommends calibration data size to be at least 500 for CNN and ViT models.
7+
Generally, the dataset used for calibration should differ from the one used for evaluation. However, to simplify the sample code, we will use the same dataset for both calibration and evaluation. We recommend utilizing the ImageNet 2012 classification dataset for this purpose.
8+
9+
In addition to the sample code we provide below, TensorRT model optimizer which leverages torchvision.datasets already provides the ability to work with ImageNet dataset.
910

1011
#### Prepare ImageNet dataset
1112
You can either download from [Kaggle](https://www.kaggle.com/c/imagenet-object-localization-challenge/data) or origianl image-net website: val [tarball](https://image-net.org/data/ILSVRC/2012/ILSVRC2012_img_val.tar) and devkit [tarball](https://image-net.org/data/ILSVRC/2012/ILSVRC2012_devkit_t12.tar.gz)
@@ -79,6 +80,7 @@ wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/
7980
| |-- ILSVRC2012_val_00003014.JPEG
8081
...
8182
```
83+
Lastly, download `synset_words.txt` from https://github.com/HoldenCaulfieldRye/caffe/blob/master/data/ilsvrc12/synset_words.txt into `ILSVRC2012` (top-level folder)
8284

8385
## Quantize an ONNX model
8486

0 commit comments

Comments
 (0)