6 Star 7 Fork 8

DeepSpark/DeepSparkInference

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
majorli6 提交于 2024-06-18 15:46 . add ixrt models to model list - part 1

ResNet_V1_D50

Description

Residual Networks, or ResNets, learn residual functions with reference to the layer inputs, instead of learning unreferenced functions. Instead of hoping each few stacked layers directly fit a desired underlying mapping, residual nets let these layers fit a residual mapping.

Setup

Install

# Install libGL
## CentOS
yum install -y mesa-libGL
## Ubuntu
apt install -y libgl1-mesa-dev

pip3 install tqdm
pip3 install onnx
pip3 install onnxsim
pip3 install tabulate
pip3 install ppq
pip3 install mmpretrain
pip3 install mmcv-lite

Download

Dataset: https://www.image-net.org/download.php to download the validation dataset.

Model Conversion

mkdir checkpoints
python3 export_onnx.py --output_model checkpoints/resnet_v1_d50.onnx

Inference

export DATASETS_DIR=/path/to/imagenet_val/
export CHECKPOINTS_DIR=./checkpoints
export RUN_DIR=./
export CONFIG_DIR=config/RESNET_V1_D50_CONFIG

FP16

# Accuracy
bash scripts/infer_resnet_v1_d50_fp16_accuracy.sh
# Performance
bash scripts/infer_resnet_v1_d50_fp16_performance.sh

INT8

# Accuracy
bash scripts/infer_resnet_v1_d50_int8_accuracy.sh
# Performance
bash scripts/infer_resnet_v1_d50_int8_performance.sh

Results

Model BatchSize Precision FPS Top-1(%) Top-5(%)
ResNet_V1_D50 32 FP16 3887.55 0.77544 0.93568
ResNet_V1_D50 32 INT8 7148.58 0.7711 0.93514
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/deep-spark/deepsparkinference.git
git@gitee.com:deep-spark/deepsparkinference.git
deep-spark
deepsparkinference
DeepSparkInference
master

搜索帮助

A270a887 8829481 3d7a4017 8829481