1 Star 0 Fork 1

xzmagic / sophon-inference

forked from hong_liu / sophon-inference 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
   _____             __                      ____      ____
  / ___/____  ____  / /_  ____  ____        /  _/___  / __/__  ________  ____  ________
  \__ \/ __ \/ __ \/ __ \/ __ \/ __ \______ / // __ \/ /_/ _ \/ ___/ _ \/ __ \/ ___/ _ \
 ___/ / /_/ / /_/ / / / / /_/ / / / /_____// // / / / __/  __/ /  /  __/ / / / /__/  __/
/____/\____/ .___/_/ /_/\____/_/ /_/     /___/_/ /_/_/  \___/_/   \___/_/ /_/\___/\___/
          /_/

Sophon-Inference

Guide to deploying deep-learning inference networks and deep vision primitives on Sophon TPU. image

SAIL: Sophon Artificial Intelligent Library for online deployment.

  • It's a wrapper of bmruntime, bmdecoder, bmcv, bmlib;
  • Provide both C++ and Python APIs;
  • Automatically manage memory of tensors;
## Prerequisites and Compilation

- **BMNNSDK2**                        Required
- **CMake**                           Required
- **OpenCV3(at least 3.4.6)**         Required for C++ samples
- **Python3**                         Optional for python samples
- **Sphinx**                          Optional for documents

```shell
# install bmnnsdk2
cd bmnnsdk2/scripts
# extract libs adaptable to the OS
./install_lib.sh nntc
# remove old driver and install the new one, 'pcie' for x86_64 and 'arm_pcie' for aarch64
sudo ./remove_driver_pcie.sh      # for x86_64
sudo ./uninstall_driver_pcie.sh   # for x86_64
# configure the environment. 'pcie' for x86_64 and 'arm_pcie' for aarch64
source ./envsetup_pcie.sh         # for x86_64

# compilation
mkdir build
cd build
cmake ..
make

Samples

Image Classification

ID Input Decoder Preprocessor Data Type Model Mode Model Number TPU Number Multi-Thread
1 image opencv opencv fp32/int8 resnet-50 static 1 1 N
2 image opencv opencv fp32/int8 resnet-50 static 1 1 Y
3 image opencv opencv fp32/int8 resnet-50 static 1 2 Y
4 image opencv opencv fp32/int8 resnet-50 static 2 1 Y

Object Detection

ID Input Decoder Preprocessor Data Type Model Mode Batch Size Multi-Thread
1 video/image opencv opencv fp32/int8 ssd_vgg static 1 N
2 video/image bm-ffmpeg bmcv fp32/int8 ssd_vgg static 1 N
3 video bm-ffmpeg bmcv fp32/int8 ssd_vgg static 4 N
4 video/image bm-opencv bm-opencv fp32/int8 ssd_vgg static 1 N
5 video/image bm-opencv bmcv fp32/int8 ssd_vgg static 1 N
6 video opencv opencv fp32/int8 yolov3 static 1 Y
7 video bm-ffmpeg bmcv fp32/int8 yolov3 static 1 Y
  • Attention: 4 and 5 are only for SOC mode, 7 is only for CPP test.

Face Detection

ID Input Decoder Preprocessor Data Type Model Mode
1 image opencv opencv fp32 mtcnn dynamic

C++ Samples Usage Instructions

Python Samples Usage Instructions

Documnets

Online English doc

Online Chinese doc

PDF English doc

PDF Chinese doc

Testing

Result files of each examples to compare are in directories: ./release/qa_test/sc5_tests/cpp_OR_python/CASE_NAME/verify_files/

FAQ

FAQ link

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • haipeng.wan - Initial work
  • hong.liu - Initial work
  • juntao.tong - Initial work
  • lian.he - Initial work
  • mike.wu - Initial work
  • tong.liu - Initial work
  • zhenpeng.xiao - Initial work

See also the list of Contributors who participated in this project.

Coding Style Guide

This project contains codes written in C++, Python and Shell. We refer to Google Style Guides with some minor modifications.

Coding Style Guide

License

This project is licensed under the Apache License, Version 2.0.

License Detail

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/xzmagic/sophon-inference.git
git@gitee.com:xzmagic/sophon-inference.git
xzmagic
sophon-inference
sophon-inference
master

搜索帮助