UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant lucc1
Participant
254 Views
Registered: ‎01-23-2019

yolov3_tiny_3l_model

Jump to solution
Did anyone used the yolov3 tiny 3l model with Xilinx Darknet2Caffe flow? It is the yolov3 tiny 3l model, with 3 yolo output layers model, from darknet rather than the base yolov3 tiny model which only has 2 yolo output layers. Any issues, pointers, or recommendations? Luc
--
Luc Chouinard
FPGA Architect & AI Specialist
Teledyne Imaging
Teledyne Lumenera
0 Kudos
1 Solution

Accepted Solutions
Participant lucc1
Participant
58 Views
Registered: ‎01-23-2019

Re: yolov3_tiny_3l_model

Jump to solution
Was able to run the yolo tiny 3l (3 yolo output layers) model, same number of output layers as the full yolo model. It is a bit slower in term of FPS than the 2l (2 yolo output layers) as it is a bit deeper ie 28 layers vs 21 layers, but has better accuracy specially if you have object at different scales to recognize. Nothing specifically different to do beside having to identify the specific yolo output layers "names" during the darknet to caffe flow. This can be marked as SOLVED. Luc
--
Luc Chouinard
FPGA Architect & AI Specialist
Teledyne Imaging
Teledyne Lumenera

View solution in original post

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
223 Views
Registered: ‎03-21-2008

Re: yolov3_tiny_3l_model

Jump to solution

Yolov3_tiny_3l should work with the Darknet2Caffe flow, but first you will need to make one modification to the .cfg file and retrain. There is a mismatch between how Darknet and Caffe handel max pooling layers of stride 1, which will cause a Caffe error. Tiny Yolov3 as well as Tiny Yolov3_3l both contain such a layer.

The solution is to comment out the layer in the .cfg file and retrain:

Capture.PNG

If you already have pretrained weights, you can probbaly load these in and then continue the training in Darknet rather than starting from scratch.

Once you convert to Caffe and quantize and compile with the DNNK tools, you can then use the Yolov3 sw examples in AI SDK install. See the following post on how to use a custom Yolov3 model with the AI SDK Yolo examples:

https://forums.xilinx.com/t5/Machine-Learning/Using-custom-models-with-AI-SDK-v2-0-5-sw-samples/m-p/1011156#M1979v3

If you follow the instructions in that post, one of the things that you will do is to create a DPU prototext file that is used by the AI SDK post processing library.

If you are doing letterboxing of the input images, then make sure the line is_tf line is set to true (Example for Tiny Yolov3 below)

ai_sdk_prototxt.png

 

 

 

 

 

Xilinx Employee
Xilinx Employee
221 Views
Registered: ‎03-21-2008

Re: yolov3_tiny_3l_model

Jump to solution

I have created a Tutorial on how to use Tiny Yolov3 with the AI SDK examples.  The process for Tiny Yolov3_3l should be almost identical.  The tutorial is not relased yet, but contact me if you want it and I can send it to you.

 

0 Kudos
Participant lucc1
Participant
59 Views
Registered: ‎01-23-2019

Re: yolov3_tiny_3l_model

Jump to solution
Was able to run the yolo tiny 3l (3 yolo output layers) model, same number of output layers as the full yolo model. It is a bit slower in term of FPS than the 2l (2 yolo output layers) as it is a bit deeper ie 28 layers vs 21 layers, but has better accuracy specially if you have object at different scales to recognize. Nothing specifically different to do beside having to identify the specific yolo output layers "names" during the darknet to caffe flow. This can be marked as SOLVED. Luc
--
Luc Chouinard
FPGA Architect & AI Specialist
Teledyne Imaging
Teledyne Lumenera

View solution in original post

0 Kudos