6 Star 7 Fork 7

DeepSpark/DeepSparkInference

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

SqueezeNet 1.1

Description

SqueezeNet 1.1 is a deep learning model for image classification, designed to be lightweight and efficient for deployment on resource-constrained devices.

It was developed by researchers at DeepScale and released in 2016.

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 pycuda
pip3 install opencv-python==4.6.0.66

Download

Pretrained model: https://download.pytorch.org/models/squeezenet1_1-b8a52dc0.pth

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

Model Conversion

mkdir checkpoints 
python3 export_onnx.py --origin_model  /path/to/squeezenet1_1-b8a52dc0.pth --output_model checkpoints/squeezenetv11.onnx

Inference

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

FP16

# Accuracy
bash scripts/infer_squeezenet_v11_fp16_accuracy.sh
# Performance
bash scripts/infer_squeezenet_v11_fp16_performance.sh

INT8

# Accuracy
bash scripts/infer_squeezenet_v11_int8_accuracy.sh
# Performance
bash scripts/infer_squeezenet_v11_int8_performance.sh

Results

Model BatchSize Precision FPS Top-1(%) Top-5(%)
SqueezeNet 1.1 32 FP16 13701 0.58182 0.80622
SqueezeNet 1.1 32 INT8 20128 0.50966 0.77552
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/deep-spark/deepsparkinference.git
git@gitee.com:deep-spark/deepsparkinference.git
deep-spark
deepsparkinference
DeepSparkInference
master

搜索帮助

Cb406eda 1850385 E526c682 1850385