nvdla / sw

NVDLA SW
Other
489 stars 193 forks source link

Does nvdla support object detection #67

Open Adithyak1998 opened 6 years ago

Adithyak1998 commented 6 years ago

I trained a model on DIGITS for object detection. I followed this website: https://github.com/NVIDIA/DIGITS/tree/master/examples/object-detection I then downloaded the model which included deploy.prototxt and a .caffemodel file.

I tried to use nvdla to compile but encountered the following error: Command: ./nvdla_compiler --prototxt obj_detect.prototxt --caffemodel obj_detect.caffemodel Output:

creating new wisdom context...
opening wisdom context...
parsing caffe network...
libnvdla<1> error: parsing layer type Power index 0
(DLA) Error 0x00000004: Unable to parse caffemodel: "obj_detect.prototxt" (in ParseTest.cpp, function parseCaffeNetwork(), line 91)
(DLA) Error 0x00000004: (propagating from ParseTest.cpp, function parseAndCompile(), line 164)
(DLA) Error 0x00000004: (propagating from main.cpp, function launchTest(), line 87)

I did see issues with similar errors for mobilenet (which is put under "future release"). This it the same case with object detection?

prasshantg commented 6 years ago

@Adithyak1998 power layer is not yet supported. Adding this feature to future release of compiler

Adithyak1998 commented 6 years ago

May I know the ETA for this

prasshantg commented 6 years ago

We will try to get it released in next compiler release coming by end of this week or early next week.

Adithyak1998 commented 6 years ago

Ok, but NVDLA verilog HW IP supports object detection right?

prasshantg commented 6 years ago

Please share exact prototxt you are using to confirm the layers used.

Adithyak1998 commented 6 years ago

These ars the prototxt files I used: https://raw.githubusercontent.com/NVIDIA/caffe/caffe-0.15/examples/kitti/detectnet_network.prototxt https://raw.githubusercontent.com/NVIDIA/caffe/caffe-0.15/examples/kitti/detectnet_network-2classes.prototxt

Both of them have a power layer in them. I just wanted to clarify if the NVDLA hardware supports that layer

prasshantg commented 6 years ago

In fact, layer for which you are getting error is not for deploy phase but just for training or validation phase. Currently we are supporting layers for deploy phase only. Prototxt that you are using is all-in-one and looks like parser is not detecting that this layer is not for deploy phase.

Checking more how it can be resolved. You can try using prototxt for deploy phase instead of all-in-one.

Adithyak1998 commented 6 years ago

I'm sorry but I don't understand what you mean by prototxt for deploy phase Where can I find one?

prasshantg commented 6 years ago

Refer https://github.com/BVLC/caffe/wiki/Using-a-Trained-Network:-Deploy to understand what is prototxt for deploy

prasshantg commented 6 years ago

Confirmed no issue in parser and this layer is marked for deploy phase, will plan support for it in next release

layer { name: "deploy_transform" type: "Power" bottom: "data" top: "transformed_data" power_param { shift: -127 } include: { phase: TEST not_stage: "val" } }

Adithyak1998 commented 6 years ago

Is power layer supported in the parser now?

DrVijayK commented 6 years ago

An update on ETA for Power layer support in compiler will be highly appreciated.

raghavgurbaxani commented 6 years ago

Yes,

I was able to run the RCNN caffemodel without ROI Pooling :)

Worked fine for me.

zaddan commented 6 years ago

@raghavgurbaxani where did you get the RCNN caffemodel from?

raghavgurbaxani commented 6 years ago

@zaddan I found it on the Caffe model zoo. Hope this helps

zaddan commented 6 years ago

@raghavgurbaxani I looked inside caffe model zoo, and the only RCNN that I found was faster-rcnn and if I am not mistaken their models have ROI Pooling in them. Could you help me find the exact model you tried?

Adithyak1998 commented 6 years ago

@raghavgurbaxani Do you mean to say that we have to locate ROI before giving input to NVDLA?

If not, what is the alternative for ROI Pooling layer which NVDLA supports?

raghavgurbaxani commented 6 years ago

@zaddan @Adithyak1998

I used this model, worked fine for me

https://github.com/BVLC/caffe/tree/master/models/bvlc_reference_rcnn_ilsvrc13

arvindhbti commented 5 years ago

@zaddan @Adithyak1998

I used this model, worked fine for me

https://github.com/BVLC/caffe/tree/master/models/bvlc_reference_rcnn_ilsvrc13

Yeah it is working fine for me also.

@raghavgurbaxani can you tell me that how to visualize the output because it is giving like-

-1.89844 -2.11719 -1.95312 -1.87207 -2.08789 -2.13086 -2.07617 -3.13086 .........

@raghavgurbaxani how can i map the exact output.Thanks.

neroangelo296 commented 5 years ago

@zaddan @Adithyak1998 I used this model, worked fine for me https://github.com/BVLC/caffe/tree/master/models/bvlc_reference_rcnn_ilsvrc13

Yeah it is working fine for me also.

@raghavgurbaxani can you tell me that how to visualize the output because it is giving like-

-1.89844 -2.11719 -1.95312 -1.87207 -2.08789 -2.13086 -2.07617 -3.13086 .........

@raghavgurbaxani how can i map the exact output.Thanks.

@arvindhbti, Have you found a solution to the visualization problem yet?