Replies: 7 comments 7 replies
-
yolov5-v7.0 |
Beta Was this translation helpful? Give feedback.
-
这是来自QQ邮箱的自动回复邮件。邮件我已收到。
|
Beta Was this translation helpful? Give feedback.
-
我已使用此方法解决https://zhuanlan.zhihu.com/p/606440867 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
请问,20240410版本的ncnn交叉编译的头文件不包含以往版本的net.h,新版本是用哪个或者哪几个头文件替代net.h了呢 |
Beta Was this translation helpful? Give feedback.
-
有yolov5分类网络的代码吗 |
Beta Was this translation helpful? Give feedback.
-
Due to version issues, there have been continuous error reports. |
Beta Was this translation helpful? Give feedback.
-
Tutorial - deploy YOLOv5 with ncnn
setup yolov5 pytorch
export torchscript and convert it to ncnn via pnnx
ncnn inference
implement yolov5 post-process in cpp
dynamic shape inference (optional but recommended for faster inference)
Eliminate unnecessary calculations on image padding
For non-square images, such as 640x480, you need to pad them to 640x640 first, and use 640x640 as the input size for inference. In fact, 1/4 of the areas are black parts, and these areas will also bring additional calculations.
Dynamic shape inference can eliminate or minimize the calculation caused by padding.
Eliminate calculations on candidate boxes with low scores
In post-processing, both score and candidate box position generation require sigmoid operation, which is not very fast. Most of the anchor box scores are below the threshold. We can optimize the generation logic of the candidate box and calculate the offset and size of the candidate box only when the threshold is met.
Reduce memory layout conversion and access overhead in post-processing
Post-processing has some memory layout operators such as reshape, transpose, tensor split, concat, etc. These operators will cause more memory access overhead. We can write cpp code to implement the end-to-end post-processing main loop, avoiding these memory layout conversion operations as much as possible.
full cmake project and cpp source
Beta Was this translation helpful? Give feedback.
All reactions