Tutorial
This is a tutorial on accelerating the inference speed of image classification with ResNet50 using AcuiRT.
Introduction
- Please refer to the Setup to install AcuiRT.
1. Prepare the dataset
-
Prepare a subset of ImageNet.
git clone https://github.com/EliSchwartz/imagenet-sample-images
2. Execute the conversion
-
Run the example script from aibooster-examples. This sample converts ResNet50 to a TensorRT model with int8 quantization to accelerate inference.
python intelligence/acuirt/image_classification_resnet50.py -
The Top-1 accuracy and inference time are displayed for both the PyTorch model inference and the TensorRT model conversion.
-
Example output
PyTorch: Top-1 Accuracy: 887/1000 (88.70%), Average Inference Time: 1618.08μs
AcuiRT: Top-1 Accuracy: 882/1000 (88.20%), Average Inference Time: 415.05μs