Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5527 Discussions

INT8 optimization for text classification model

Rahila_T_Intel
Moderator
229 Views

I am trying to convert a FP32 TensorFlow model to INT8. I have done INT8 optimization of models which are trained on images. But, in this case the model is text classification model. I saw so many references to do INT8 conversion in models trained with images. Can you suggest any examples of INT8 optimization for text classification model?

0 Kudos
4 Replies
IntelSupport
Community Manager
205 Views

 

Hi Rahila T,

What is the model topology you used for the text detection? For now, we have a reference config file for quantizing EAST Resnet v1.50 text detection tolology. It is located in <openvino_dir>/deployment_tools/tools/post_optimization_toolkit/configs/example/quantization/text_detection directory.

 

Regards,

Aznie


Rahila_T_Intel
Moderator
201 Views

This is a simple tensorflow model we created, for text classification.

While trying the optimization as per the EAST Resnet v1.50 text detection topology, data source is ICDAR2015, Facing the below error:

ValueError: could not broadcast input array from shape (3,1,512) into shape (1,512)

IntelSupport
Community Manager
188 Views

Hi Rahila T,

Is your sample code detect or specify the 3D text dimension? The ICDAR2015 topology is the text spotting for the 2D dimension. That might be the dimension or arrays are not matched. You'll need to fix that by turning your list into a 2D dimension.

 

Regards,

Aznie


IntelSupport
Community Manager
169 Views

Hi Rahila T,

Thank you for your question. If you need any additional information from Intel, please submit a new question as this thread is no longer being monitored.


Regards,

Aznie


Reply