当前位置:网站首页>Play with the one-stop plan of cann target detection and recognition [basic]
Play with the one-stop plan of cann target detection and recognition [basic]
2022-07-25 06:26:00 【Hua Weiyun】
Preface
This blog post continues the previous one 《 Get along well with CANN One stop solution for target detection and recognition 【 Introduction 】》, If yes CANN Students who don't understand the one-stop scheme of target detection and recognition , It is recommended to read the previous blog first .
know AclLite
AclLite What is it? ?
CANN The one-stop scheme of target detection and recognition is based on AclLite Developed , that AclLite And what is it ? Simply speaking , It is further encapsulated based on Huawei shengteng's native interface and official interface documents , In particular, it encapsulates the relevant duplicate code in the current open source community sample , A set of simple public interfaces for users .
In a word , Is to simplify development , Reduce based on CANN Difficulty of development . Its function introduction and acquisition method are shown in the figure below :

AclLite brief introduction
Considering the actual development needs and popular applications , Now let's introduce the common processing methods :
The image processing

Video processing

Model reasoning , Common functions and resource management

Applications and multithreading

Apart from the above , In fact, there are other parts , This is not going to unfold one by one , It should be noted that , This is the encapsulation based on the official interface , It belongs to secondary development , It is not recommended to use it as a standard library , But if you want to achieve it quickly , Verify the prototype , It can still be considered .
CANN Analysis of one-stop solution for target detection and recognition
seen 《 Get along well with CANN One stop solution for target detection and recognition 【 Introduction 】》 My friends should know , The original scheme is to detect the input vehicle first , Then classify the detected vehicles by color , It's a test + Cascading tasks of classification . The following describes the processing flow of these two tasks .
Test pretreatment


Video detection preprocessing

Detect the reasoning process

Post test processing flow


Classification pretreatment process

Classification reasoning process

Post classification process

Customize your application
This scheme is to provide a sample for developers , It is convenient for everyone to develop their own applications , We hope to use this scheme as a reference or template , Can quickly realize the development of their own applications , The overall replacement process is shown in the figure below :

Preprocessing

Reasoning process
Analyze the model to be replaced , Configure variables representing the path of the model file , Initialize with the replaced model AclLiteModel Class object , According to the actual needs of the replaced model , Replace the initialization model input interface , And modify the execution interface of the model .
Generally speaking , Replace the model , From preprocessing to model loading , Reasoning and post-processing all need to be changed , Basically, it's refactoring code , But if the pretreatment or post-processing of the model has little difference , Then the changes will be much smaller , such as YOLO The pretreatment and post-treatment of the series are almost the same , It'll be much better .

post-processing

In addition to the above basic processing flow , You can also do it according to your needs , Increase what we want , More flexible functions , Such as dynamic Batch, The specific code modification is shown in the figure below :

Besides , There are also dynamic resolution and dynamic AIPP And so on , But generally speaking , Dynamic characteristics , Although more flexible , But it usually makes the efficiency lower , Personally think that , Unless you have to use it to complete the established function , Otherwise, static is better . After all, reasoning tasks , Efficiency or performance is the more important consideration .
Conclusion
Not much said , Take the last picture of the teacher PPT As an end !

边栏推荐
- Interlocked atom access series of functions
- 51 timer initial value calculation
- 【transformer】DeiT
- Bug notes
- Bubble sort code implementation
- JTAG debugging source level debugging of arm bare board debugging
- Qunhui NPV Suite (NPV server) Download
- Brief introduction of acoustic filter Market
- VB variable types and control statements (basic)
- 【luogu P6629】字符串(Runs)(树状数组)
猜你喜欢

阻塞队列分析

R strange grammar summary

Netease game Flink SQL platform practice

How does vscode enable multiple terminals? How to display horizontally?

Brief introduction of acoustic filter Market

Pdf snapshot artifact

Easy gene chip SEQ analysis method: practical workflow and advanced applications

VSCode 如何开启多个终端?如何横向显示?

The code spell checker plug-in avoids some specific vocabulary errors "XXX": unknown word.cspell
![[node] the service port is occupied error: listen eaddinuse: address already in use::: 9000- how to close the port started by node](/img/06/b90fa310158669696f94f79ef4cc5a.png)
[node] the service port is occupied error: listen eaddinuse: address already in use::: 9000- how to close the port started by node
随机推荐
target_compile_features specified unknown feature “cxx_std_14“ for target
JSON、
VBA common objects
Pic16f877xa instruction system (assembly language)
Define usage method and template
Developers must read: 2022 mobile application operation growth insight white paper
[C language] document processing and operation
有什么能在网上挣钱的项目啊?做自媒体靠谱吗?
NFT: how to improve rentable NFT (erc-4907)
嵌入式c语言开发之宏定义求两个数的最大值的使用技巧
Daily question brushing record (XXVIII)
JVM tuning summary -xms -xmx -xmn -xss
UML modeling tools Visio, rational rose, powerdesign
Blocking Queue Analysis
JS how to delete an element without deleting its child elements
[reprint] pycharm packages.Py program as executable exe
JZ7 重建二叉树
Amazoncaptcha bypasses Amazon IP verification code with 95% success rate
C#读取倍福Beckhoff变量
长安链Solidity智能合约调用原理分析