cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Km
Participant
Participant
210 Views
Registered: ‎05-13-2021

Help on Compiling SSD Network

I have trained a custom SSD Mobilenet V2 COCO network (300x300) (Tensorflow 1.15). When I tried to quantize and compile the network for the ZCU102, it is generating the errors due to the preprocessing layers in the network (Its not quantizing without the input nodes). I have seen that Viitis AI Model Zoo has inference graph for the same network. However when I checked my model and Vitis AI Zoo network, the network structure is different. Would you mind telling where actually Vitis AI got its source networks so that I can train that particular network to compile model. Thanks in advance.

0 Kudos
2 Replies
graces
Moderator
Moderator
144 Views
Registered: ‎07-16-2008

What specific errors did you receive?

Do you mean where Vitis AI SSD model got its dataset? You can do "Click here to view details" under Model Details to view more information about models.

https://github.com/Xilinx/Vitis-AI/tree/master/models/AI-Model-Zoo

 

-----------------------------------------------------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs.
-----------------------------------------------------------------------------------------------------------------------
Km
Participant
Participant
124 Views
Registered: ‎05-13-2021

I have used this command to quantize the network, by pacing input nodes as the actual input nodes of the network, which is image_tensor. In which case the quantization happened successfully.

vai_q_tensorflow quantize --input_frozen_graph inference_graph/frozen_inference_graph.pb --input_fn ssd_calib_fn.calib_input --output_dir ssd_quant_out --input_nodes image_tensor --output_nodes raw_detection_scores --input_shapes 1,300,300,3 --calib_iter 10

However, it has issues with compilation, since the network has preprocessing layers after the input. The errors like following

compile_error1.pngcompilation2.png

I have seen in the Vitis AI documentation (Tensorflow 1.x) that if the network has preprocessing layers we should take input nodes as the first node after the preprocessing layers. I tried that but the problem is that, the first layer after the preprocessing is not accepting the input shape and it generating the errors, and its demanding the requirement of actual input node of the network.

 

What I mean by the info about the network is, When I compared the layers of SSD network (Mobilenet V2 COCO 300X300) which I got from Tensorflow ZOO, its not same as the one which I see in Vitis AI zoo (Mobilnet V2 COCO 300X300). I The reason I am asking for the network source is (such as config files, etc). I trained my SSD network with custom dataset, so I can retrain the network which is Vitis AI using with my custom data and deploy in FPGA, since it seems the architecture Vitis AI used was able to deploy in ZCU102.

0 Kudos