NVIDIA-AI-IOT / yolo_deepstream

yolo model qat and deploy with deepstream&tensorrt
Apache License 2.0
534 stars 135 forks source link

Does it support YOLOv4-tiny? #1

Open AlexeyAB opened 3 years ago

AlexeyAB commented 3 years ago

@bcao000 Hi, Great work! Does it support YOLOv4-tiny?

mchi-zg commented 3 years ago

no, thanks!

echushe commented 3 years ago

@AlexeyAB
I say YES theoretically. You can use a similar method as in https://github.com/Tianxiaomo/pytorch-YOLOv4 to generate ONNX file of YOLOv4 tiny, and then convert it into TensorRT. As there are slight differences of anchors between YOLOv4 and YOLOv4-tiny, pytorch implementation of YOLO layer in https://github.com/Tianxiaomo/pytorch-YOLOv4/blob/master/tool/yolo_layer.py should be updated a little to fit YOLOv4-tiny before converting it into ONNX.

eyebies commented 3 years ago

came across https://github.com/marcoslucianops/DeepStream-Yolo/blob/master/YOLOV4-TINY.md Please ignore if you have seen this already !

marcoslucianops commented 3 years ago

@AlexeyAB, @eyebies, I added native support for YOLOv4-Tiny using my nvdsinfer_custom_impl_Yolo folder in DeepStream SDK 5.0.1. You can generate TensorRT converted model directly from Darknet cfg and weights and run DeepStream.

Edit: I added native support for YOLOv4 too.

https://github.com/marcoslucianops/DeepStream-Yolo

zhaoedf commented 3 years ago

I tested in deepstream5.0 and it works well! I use yolov4-tiny model from AlexeyAB's repo and train on my custom dataset!

As for tiny, the only difference between it and the yolov4 is the amount of [yolo] layer, so the post-processing should work on both models.

marcoslucianops commented 3 years ago

I tested in deepstream5.0 and it works well!

I use yolov4-tiny model from AlexeyAB's repo and train on my custom dataset!

As for tiny, the only difference between it and the yolov4 is the amount of [yolo] layer, so the post-processing should work on both models.

With my repo, you can use yolov4-tiny or yolov4 without convert to ONNX. It converts directly from yolo.cfg and weights file (like yolov3/yolov2). You will not need edit nvdsparsebbox_Yolo.cpp because mu repo get anchors and masks from cfg file. It supports new_coords, beta_nms and scale_x_y.

satyajitghana commented 3 years ago

any milestone for supporting non-square models ?