Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Tiny YOLO on NCS

idata
Employee
4,539 Views

I've been trying to find a way to run an object detection network on the NCS. After a while trying and converting different models I finally found a one that seems to work; Tiny YOLO. I haven't yet found a way to convert the weights from darknet to caffe to NCS, but with empty weights the performance looks promising. Under 150ms per image!

 

python3 mvNCProfile.pyc yolo_tiny_deploy.prototxt -s 12

 

mvNCProfile v02.00, Copyright @ Movidius Ltd 2016

 

__ WARNING: using empty weights __

 

USB: Transferring Data…

 

Time to Execute : 140.52 ms

 

USB: Myriad Execution Finished

 

Time to Execute : 121.39 ms

 

USB: Myriad Execution Finished

 

USB: Myriad Connection Closing.

 

USB: Myriad Connection Closed.

 

Network Summary

 

Detailed Per Layer Profile

 

Layer Name MFLOPs Bandwidth MB/s time(ms)

 

0 scale1 173.408 1173.26 8.81

 

1 pool1 3.211 811.31 7.55

 

2 scale2 462.422 964.80 14.30

 

3 pool2 1.606 956.24 3.20

 

4 scale3 462.422 698.33 9.92

 

5 pool3 0.803 1008.54 1.52

 

6 scale4 462.422 428.05 8.38

 

7 pool4 0.401 1001.39 0.76

 

8 scale5 462.422 205.36 11.13

 

9 pool5 0.201 980.96 0.39

 

10 scale6 462.422 308.66 10.08

 

11 pool6 0.100 944.83 0.20

 

12 scale7 462.422 809.99 11.64

 

13 scale8 231.211 596.90 8.98

 

14 fc9 0.025 2146.64 16.40

 

Total inference time 113.27

 

Does anyone have experience converting the weights? Or knowledge how to draw the bounding boxes based on the YOLO output layer? It appears to output 1470 values.

0 Kudos
27 Replies
idata
Employee
854 Views

@victorv, yes, I mean full yolov2. The layer of reroute and reorg should be supported by NCS at least.

0 Kudos
idata
Employee
854 Views

@xhuan28, agree with @victorv. I don't plan to release anything publicly, but you can make any object detector model work by executing custom layers within Caffe. Usually, custom layers are not that heavy to process. Ideally, Movidius should integrate calls to NCS into Caffe using e.g. engine: NCS parameter.

0 Kudos
idata
Employee
854 Views

MDK licensees could write custom Caffe layers for NCS - not sure if non-MDK users can do this.

 

Reorg layer in darknet is the same as Reshape in Caffe. The route layer in darknet is not supported in current released Caffe. You can safely drop the route layer with minimal performance impact on time and mAP.

0 Kudos
idata
Employee
854 Views

This is a brilliant project. I basically bought this thing to run Yolo on it and here you've done it :) Thanks so much @dagofff .

0 Kudos
idata
Employee
854 Views

I have tried to generate custom model of yolo tiny for ncs, but cannot make the model that can convert to caffemodel by the prototxt. Which cfg file to train on darknet?

0 Kudos
idata
Employee
854 Views

I create a repo for running yolov2 for ncs in https://github.com/duangenquan/YoloV2NCS. It contains some c/c++ implementation for the cregionlayer, a pythonwrapper and model convertor for yolov2 to caffe. Hope this helps.

0 Kudos
idata
Employee
854 Views

that is good for me also.

 

could you share movie clip about runnig yolo with ncs?
0 Kudos
Reply