cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
trived76
Observer
Observer
691 Views
Registered: ‎10-03-2019

More than one image as an input to the network

Hi Xilinx Community,

I am working on a network that accepts 8 images of size 224x224x3 (HxWxC) for the input node. Thus, the input size would be 224x224x3x8 (4D input to the network). Does the DNNDK quantization accept this input size to the Kernel? 

The other way I was thinking to convert this input data to the size 224x224x24 (HxWxC) and then try quantizing it. Please note that here I merged and manipulated the dimension for the channel.

Any help is appreciated. Thanks very much..

0 Kudos
7 Replies
jasonwu
Moderator
Moderator
674 Views
Registered: ‎03-27-2013

Hi @trived76 ,

 

Theoretically both should work. I would try the second way first if I did the test.

Please post the detailed error message if it doesn't work.

 

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
trived76
Observer
Observer
638 Views
Registered: ‎10-03-2019

Hi @jasonwu,

Thanks for the prompt response. I tried merging the 8 images in order to feed the 224 x 224 x 24 input image size to the "ImageDataLayer" for the DECENT phase. However, before I get to the DECENT phase quantization, I could not save the merged image of size 224 x 224 x 24 through OpenCV. It seems that it does not allow this channelwise concatenation for saving the image. 

Is there any specific "image_data_param" that I need to set for reading more than one images in the prototxt file not the batch_size for the DECENT phase (similar to "source", "new_height" and "new_width" image_data_param)?

Thanking you in anticipation.

0 Kudos
trived76
Observer
Observer
588 Views
Registered: ‎10-03-2019

Hi @jasonwu ,

After our discussion, I tried quantizing a small network. It passes the decent phase but in the dnnc compilation, it throws the following error. I need a Reshape layer before the first convolution to separate multiple images from the number of channels. Please find the deploy.prototext file of the network (after successful decent) attached to this message for your kind perusal.

The error I get is the following one:

[DNNC][Error] Unrecognized Caffe layer type [Reshape].
[DNNC][Error] Parsing layer graph failed.

Is there any workaround to have more than one image in the DPU kernel input? It would be great if you could please help me here. Thanks very much. 

0 Kudos
jasonwu
Moderator
Moderator
543 Views
Registered: ‎03-27-2013

Hi @trived76 ,

 

Thanks for your update.

I am afaid that I am not quite familar with Caffe frame work.

Let me try to find someone to help. But it may take sometime.

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
0 Kudos
trived76
Observer
Observer
531 Views
Registered: ‎10-03-2019

Thanks very much Jason. I look forward to hearing from you.
0 Kudos
trived76
Observer
Observer
493 Views
Registered: ‎10-03-2019

Hi Jason,
Did you get a chance to talk with someone about this?
Thanks very much.
0 Kudos
jasonwu
Moderator
Moderator
478 Views
Registered: ‎03-27-2013

Hi @trived76 ,

 

Yes, thanks for reminding.

A colleague helps to go through your debug information. He thinks that it is more like a error message from Caffe.

So have you done the validation for quantized model on GPU?

If not please try to do the test and check if it can pass.

Best Regards,
Jason
-----------------------------------------------------------------------------------------------
Please mark the Answer as "Accept as solution" if the information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
-----------------------------------------------------------------------------------------------
0 Kudos