dog-qiuqiu / FastestDet

:zap: A newly designed ultra lightweight anchor free target detection algorithm, weight only 250K parameters, reduces the time consumption by 10% compared with yolo-fastest, and the post-processing is simpler
BSD 3-Clause "New" or "Revised" License
768 stars 131 forks source link

FatestDet线程设置没用,同样设置YOLO-fastestv2正常 #45

Open Zi-x opened 1 year ago

Zi-x commented 1 year ago

由于项目需要单线程运行,对于YOLO-fastestv2,在amd平台的虚拟机和rk3588上单线程设置都是正常的,查看cpu占用一般只有一到两个核心高。但是配置在Fastestdet的用同样设置上对于虚拟机平台,1-12cpu都在30-40%,而对于rk3588,1-8cpu都在70%左右。 上述都是设置的单线程。使用 ncnn::Net net; net.opt.num_threads = 1; //此处配置的单线程和下面的ex.set_num_threads(1);保持一致,对于yolofastestv2也是同样的设置 net.load_param("FastestDet.param"); net.load_model("FastestDet.bin"); 但是实际上则不像fastestv2的占用,特别是rk3588上的测试,设置单线程,但8核都在70%左右。

touchinglie commented 4 days ago

作者在知乎说明好像有几层是不能使用多线程的,必须要用单线程处理,数据和速度才正常,ex.set_num_threads(1);是作者固定设置的,多了就木桶效应,还是差不多那个速度