cmdbug / TNN_Demo

🍉 移动端TNN部署学习笔记,支持Android与iOS。
GNU General Public License v3.0
69 stars 18 forks source link

Details about Yolov5 #16

Open NoLookDefense opened 2 years ago

NoLookDefense commented 2 years ago

Hi. I am running your demo and feel confused about your YOLOv5 demo.

There is a "layers" parameter in the Yolov5.h: https://github.com/cmdbug/TNN_Demo/blob/f361ba092924902854f336784f7b8fb9bfd21347/iOS_TNN_Demo/TNNDemo/Yolov5.h#L87 std::vector layers{ {"output", 32, {{116, 90}, {156, 198}, {373, 326}}}, {"413", 16, {{30, 61}, {62, 45}, {59, 119}}}, {"431", 8, {{10, 13}, {16, 30}, {33, 23}}}, };

I wonder what's the meanings of these values?

NoLookDefense commented 2 years ago

Also, in the official yolo demo of TNN, https://github.com/Tencent/TNN/examples there's no such parameters to assign the layer information. I wonder have you done any processes in it?

cmdbug commented 2 years ago

"model layer output name", stride, { anchors },

cmdbug commented 2 years ago

Also, in the official yolo demo of TNN, https://github.com/Tencent/TNN/examples there's no such parameters to assign the layer information. I wonder have you done any processes in it?

The official example is over encapsulated, and the internal method is similar.

cmdbug commented 2 years ago

https://github.com/Tencent/TNN/blob/0278cdbfd7480b471c6a7492e6deedfa5d48229d/examples/base/object_detector_yolo.h#L62-L71

https://github.com/Tencent/TNN/blob/0278cdbfd7480b471c6a7492e6deedfa5d48229d/examples/base/object_detector_yolo.cc#L49-L57