how to change input size of model on eIQ software

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to change input size of model on eIQ software

1,992 Views
jasonliu1
Contributor I

Hi all,

I recently started training an fpn-ssd-mobilenetv2 model(which is one of the base models provided) on eIQ with custom dataset, and I was wondering is there a way to change the input size of the model by any chance to a custom size(ex. from 320 to 640)? Thanks very much!

Labels (1)
0 Kudos
4 Replies

1,977 Views
weilly_li
Contributor IV

Hi, Jason

I think some method can solve your issue ....
(1) Special input size When it converter Tensorflow Lite
(2) Trying "resize_tensor_input" method .. like as
       interpreter=tf.lite.Interpreter("/root/posenet_text.tflite")
       input_details = interpreter.get_input_details()
       interpreter.resize_tensor_input(input_details[0]['index'], (1, 705, 527, 3))

Weilly

0 Kudos

1,982 Views
anthony_huereca
NXP Employee
NXP Employee

Hi Jason,

  That particular model included with eIQ portal expects a 320x320 image. However it is possible to bring in your own custom models (or other models you might find in a model zoo) by placing them in the <NXP eIQ Portal Install Dir>\plugins folder

 

  There's then a guide to how expose different parameters of that model to the eIQ Portal GUI at C:\nxp\eIQ_Toolkit_v1.0.5\docs\CustomModels.md 

  The best way to learn how to import custom models would be to look at the code for the predefined models already included as part of eIQ Portal and use that as a guide for when you import your own models. For example, you can see in \plugins\detection\boxes\fpn\fpn_ssd.py where the default VOC-fpn_ssd_mobilenet_v2-320.h5 model is picked up.

-Anthony 

0 Kudos

1,971 Views
jasonliu1
Contributor I

Hi,

so if I change the input size in the file \plugins\detection\boxes\fpn\fpn_ssd.py, but since the model is for 320x320, would that mean that the model is still training with 320x320 images but now it can take in a 640x640 image for detection?

0 Kudos

1,938 Views
anthony_huereca
NXP Employee
NXP Employee

Hi Jason,

  eIQ Portal will automatically scale the input images that you're training on into the dimensions that the model is expecting when doing the training. But the model itself will still be using the 320x320 dimensions. 

-Anthony 

0 Kudos