Feature-request: YOLOv4-tiny (detector) #59
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature-request: YOLOv4-tiny (detector)
Many other features from Darknet were added previously.
There is required only 1 feature:
groups=andgroup_id=to the[route]layer.So if input
WxHxC, it divides input by 2 groupsWxHx(C/2)(there are 2 groups: 0 and 1), and loads the 2nd group_1WxHx(C/2).If there are many layers specified in
layers=parameter, then this will be done for each of the input layers specified inlayer=, then results will be concatenated across channels.Hi @AlexeyAB :)
We'll look into that this week.
Hi @AlexeyAB ,
Yolov4 tiny is now supported on tkDNN.
Tomorrow I will do some performance tests, today my GPU is busy training.
@mive93 Thanks for the Yolov4-Tiny impl
I've tested on Jetson Nano with JetPack 4.4, TensorRT v7.1, 416 input size
For FP32, profile results:
For FP16, profile results:
Hi @JasonDoingGreat,
thanks :)
Here the inference results on the RTX 2080Ti (CUDA 10.2, TensorRT 7.0.0, Cudnn 7.6.5); for yolo4tiny 416x416, on 1200 images of size 416x416.
If needed I can test it on the Xavier or tx2
@mive93 Thanks! Yes, please test it on AGX or NX with max_N.
Here it is.
Results on Xavier AGX, Jetpack 4.3 (CUDA 10.0, CUDNN 7.6.3, tensorrt 6.0.1 ); for yolo4tiny 416x416, on 1200 images of size 416x416.
@AlexeyAB @ceccocats @mive93 , single-handedly destroyed the reputation of google, facebook and nvidia. this is extraordinary.
@mive93 Hi,
Does tkDNN work only with converted weights Darknet->tkDNN?
Or can tkDNN work with yolov4.weights file directly without conversion.
Hi @AlexeyAB,
it is necessary to export to our format.
Hi @mive93 @AlexeyAB,
Is there any accuracy degradation when you convert darknet weights to tkDNN format? What about accuracy loss when inferring in FP16 or INT8 mode? Is there any way to fine-tune the models in FP16 or INT8 mode or perform quantization aware training beforehand? Thanks
Hi @mmaaz60
The conversion of the weights does not lead to accuracy degradation. Actually the only thing we do is splitting weights layer by layer. However yes, I noticed that there is a very tiny accuracy drop. I checked (almost layer by layer) the weights of darknet and tkDNN and the problem is not there, rather on the output of the network. This is due to the different implementation of the operation (IMHO).
For the FP16 mode, the drop from full precision is negligible, while the drop from full precision to INT8 is heavy.
The problem with INT8 is also the calibration step. We have tried with 100/1000 images. Maybe using more, or using more variance would lead to better results.
I hope I covered all your doubts.
Closing for now,
feel free to reopen.
@mive93 Hi,
Have you published a paper with YOLOv4/tiny results on tkDNN or are you planning to do so?
Hi @AlexeyAB
Sorry for the late reply.
Actually yes, we submitted the results to a journal, and we are now under review.
However, you can find here some results: https://git.hipert.unimore.it/edbench/edbench
Anyway, if you need some test I am available to do some, I also have a Xavier NX now ;)
Hi @mive93
You mention in this thread that you reach 319,17 fps for yolov4tiny (int8) on the xavier; However, on the main readme, you mention that you reach 60.61. What is the difference?
Hi @MohammadKassemZein
The difference is that here I'm talking about yolov4Tiny, in the readme of Yolov4 (not tiny).
@mive93 Nice !
I am going to test it now on the Xavier NX.
Thank you.
@mive93 Below are the results on Xavier NX.
Nice @MohammadKassemZein :)
How did you collect those results?
@mive93 I used your framework (tkDNN) on Jetson NX .
yeah I guessed :) Sorry, I was vague.
Have you activated jetson_clocks?
For the measurements, did you use the demo itself, did you wrote your code or did you use this test?
I was using MODE 15W 2CORE (which I guess gives the highest clocking for GPU and CPU).
For the measurements, I used demo itself.
Hi again @mive93
Have you considered adding Mask-RCNN implementation to the framework?
I believe it is a very useful network and its benchmark in terms of FPS is not up to the expectations.
Hi @MohammadKassemZein
Yes we have considered that, but we haven't had the need in any of your project yet.
Therefore for now, we don't plan to port it, but maybe in the future.
Lately, we have ported a semantic segmentation net.
Probably in the future we'll port also something related to instance/panoptic segmentation.