Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

ShuffleNetV1 (ixRT)

Model Description

ShuffleNet V1 is a lightweight neural network architecture primarily used for image classification and object detection tasks. It uses techniques such as deep separable convolution and channel shuffle to reduce the number of parameters and computational complexity of the model, thereby achieving low computational resource consumption while maintaining high accuracy.

Supported Environments

GPU IXUCA SDK Release Branch
MR-V100 4.4.0 26.03 release/26.03
MR-V100 4.3.0 25.12 release/25.12

Note: 请切换到与您的 SDK 版本对应的 Release 分支进行测试。请勿直接在 master 分支上运行测试,因为 master 分支可能包含与您的本地 SDK 版本不兼容的最新更改。

切换分支命令示例:git checkout release/26.03

Model Preparation

Prepare Resources

Pretrained model: https://download.openmmlab.com/mmclassification/v0/shufflenet_v1/shufflenet_v1_batch1024_imagenet_20200804-5d6cec73.pth

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

Install Dependencies

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

pip3 install -r ../../ixrt_common/requirements.txt
pip3 install --no-build-isolation mmcv==1.5.3 mmcls==0.24.0

Model Conversion

mkdir checkpoints 
git clone -b v0.24.0 https://github.com/open-mmlab/mmpretrain.git

python3 ../../ixrt_common/export_mmcls.py   \
    --cfg ./mmpretrain/configs/shufflenet_v1/shufflenet-v1-1x_16xb64_in1k.py  \
    --weight  ./shufflenet_v1_batch1024_imagenet_20200804-5d6cec73.pth \
    --output ./checkpoints/shufflenetv1.onnx

Model Inference

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

FP16

# Accuracy
bash scripts/infer_shufflenet_v1_fp16_accuracy.sh
# Performance
bash scripts/infer_shufflenet_v1_fp16_performance.sh

Model Results

Model BatchSize Precision FPS Top-1(%) Top-5(%)
ShuffleNetV1 32 FP16 3619.89 66.17 86.54