File size: 5,072 Bytes
d8c3cf3 0ba5d2c 6c1dff2 0ba5d2c 6c1dff2 0ba5d2c 71ac56a 0ba5d2c ed03456 963cf83 ed03456 6c1dff2 ed03456 6c1dff2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
---
license: apache-2.0
---
![image/png](https://cdn-uploads.huggingface.co/production/uploads/64c1fef5b9d81735a12c3fcc/HJVKr4UFL51aZ3uqQkgrm.png)
# ResNet-50: Image Classification
ResNet is a network with a better effect on classification problems in the ImageNet competition.
It introduces the concept of residual learning, protects the integrity of information by adding direct channels, and solves problems such as information loss, gradient disappearance, and gradient explosion. The network is also trained. ResNet has different network layers, commonly used are 18-layer, 34-layer, 50-layer, 101-layer, 152-layer. The meaning of ResNet50 means that there are 50-layers in the network. It is currently more commonly used because it takes into account both speed and accuracy.
The model can be found [here](https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py)
## CONTENTS
- [Performance](#performance)
- [Model Conversion](#model-conversion)
- [Inference](#inference)
**Performance**
|Device|SoC|Runtime|Model|Size (pixels)|Inference Time (ms)|Precision|Compute Unit|Model Download|
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|AidBox QCS6490|QCS6490|QNN|ResNet-50|224|3.6|INT8|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS6490/resnet50_int8.qnn.serialized.bin)|
|AidBox QCS6490|QCS6490|QNN|ResNet-50|224|5.9|INT16|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS6490/resnet50_int16.qnn.serialized.bin)|
|AidBox QCS6490|QCS6490|SNPE|ResNet-50|224|3.4|INT8|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS6490/resnet50_int8_htp_snpe2.dlc)|
|AidBox QCS6490|QCS6490|SNPE|ResNet-50|224|4.8|INT16|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS6490/resnet50_int16_htp_snpe2.dlc)|
|APLUX QCS8550|QCS8550|QNN|ResNet-50|224|2.5|INT8|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS8550/resnet50_int8.qnn.serialized.bin)|
|APLUX QCS8550|QCS8550|QNN|ResNet-50|224|3.5|INT16|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS8550/resnet50_int16.qnn.serialized.bin)|
|APLUX QCS8550|QCS8550|SNPE|ResNet-50|224|1|INT8|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS8550/resnet50_int8_htp_snpe2.dlc)|
|APLUX QCS8550|QCS8550|SNPE|ResNet-50|224|1.4|INT16|NPU|[model download](https://huggingface.co/aidlux/ResNet-50/blob/main/Models/QCS8550/resnet50_int16_htp_snpe2.dlc)|
|AidBox GS865|QCS8250|SNPE|ResNet-50|224|9|INT8|NPU|[model download]()|
**Models Conversion**
Demo models converted from [**AIMO(AI Model Optimizier)**](https://aidlux.com/en/product/aimo).
The source model **ResNet-50.onnx** can be found [here](https://huggingface.co/aplux/ResNet-50/blob/main/resnet50.onnx).
The demo model conversion step on AIMO can be found blow:
|Device|SoC|Runtime|Model|Size (pixels)|Precision|Compute Unit|AIMO Conversion Steps|
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
|AidBox QCS6490|QCS6490|QNN|ResNet-50|224|INT8|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS6490/aimo_resnet50_qnn_int8.png)|
|AidBox QCS6490|QCS6490|QNN|ResNet-50|224|INT16|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS6490/aimo_resnet50_qnn_int16.png)|
|AidBox QCS6490|QCS6490|SNPE|ResNet-50|224|INT8|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS6490/aimo_resnet50_snpe_int8.png)|
|AidBox QCS6490|QCS6490|SNPE|ResNet-50|224|INT16|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS6490/aimo_resnet50_snpe_int16.png)|
|APLUX QCS8550|QCS8550|QNN|ResNet-50|224|INT8|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS8550/aimo_resnet50_qnn_int8.png)|
|APLUX QCS8550|QCS8550|QNN|ResNet-50|224|INT16|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS8550/aimo_resnet50_qnn_int16.png)|
|APLUX QCS8550|QCS8550|SNPE|ResNet-50|224|INT8|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS8550/aimo_resnet50_snpe_int8.png)|
|APLUX QCS8550|QCS8550|SNPE|ResNet-50|224|INT16|NPU|[View Steps](https://huggingface.co/aplux/ResNet-50/blob/main/AIMO/QCS8550/aimo_resnet50_snpe_int16.png)|
|AidBox GS865|QCS8250|SNPE|ResNet-50|224|INT8|NPU|[View Steps]()|
## Inference
### Step1: convert model
a. Prepare source model in onnx format. The source model can be found [here](https://huggingface.co/aplux/ResNet-50/blob/main/resnet50.onnx).
b. Login [AIMO](https://aidlux.com/en/product/aimo) and convert source model to target format. The model conversion step can follow **AIMO Conversion Step** in [Model Conversion Sheet](#model-conversion).
c. After conversion task done, download target model file.
### Step2: install AidLite SDK
The installation guide of AidLite SDK can be found [here](https://huggingface.co/datasets/aplux/AIToolKit/blob/main/AidLite%20SDK%20Development%20Documents.md#installation).
### Step3: run demo program
|