Giter VIP home page Giter VIP logo

nnie's Introduction

用C++重新封装了一下NNIE的代码。把sample里面大部分的那坨垃圾代码全部弃用了,主要贡献如下:

1.高度模块化,主要分三步,1.load_model;2.run_model,3.postprocess。1,2所有的模型共用,通过2可以得到output的tensor,每个模型只需写自己的后处理来解析output的Tensor即可。

2.代码量是sample代码的几十分之一,结构清晰简单易懂

3.yolov3后处理完全自己重写,速度非常快

4.遗弃sample中所有的全局变量,防止多线程跑多个模型时出现的线程安全问题。亲测,在多线程跑多个模型正常,互不影响,重构的C++代码是线程安全的。

编译:

1.依赖环境: opencv4.0 需要用海思的交叉编译工具编译opencv4.0的库,然后替换掉third_party/opencv4

2.切换到nnie下目录下,make生成可执行文件

3.将可执行文件和模型以及测试图片考到板子上运行。

nnie's People

Stargazers

lovely bear avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.