Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6375 Discussions

Quantization of non-vision domain models

Buvana_R
Beginner
1,264 Views

Hello,

 

I am trying to use DL Workbench to perform model optimization plus performance tuning with INT8 quantization of my model, which is not a vision-domain model. Its input is a tensor of size 1000 x 192. 

 

To create the calibration dataset for the quantization process, I saved my data as tif/jpg image using PIL.Image and supplied that to the quantizer.

However, I get the error:
ValueError: could not broadcast input array from shape (3,1000,192) into shape (1000,192)

I also tried the route of creating *.npy files for my calibration dataset and supplying the same. But it looks like the workbench does not understand that format.

Exception: Can not read the image: /home/workbench/.workbench/datasets/7/0.npy


Do you have any reference document or code that I can look at which illustrates quantization of non-vision domain models?

Thank you,

regards,

Buvana

0 Kudos
4 Replies
Zulkifli_Intel
Moderator
1,225 Views

Hello Buvana Ramanan,

 

Thank you for reaching out to us.

 

For INT8 quantization using DL Workbench, it requires an appropriate dataset. Note that sample datasets must consist of a small sampling of images and be in ImageNet, Pascal Visual Object Classes (Pascal VOC), Common Objects in Context (COCO), Common Semantic Segmentation, Labeled Faces in the Wild (LFW), Visual Geometry Group Face 2 (VGGFace2), or unannotated format. To learn more about the formats, refer to Dataset Types.

 

We’ll check on the information for the dataset that is not in image format and get back to you soon.

 

Sincerely,

Zulkifli 


0 Kudos
Mikhail_F_Intel
Employee
1,217 Views

Hello Buvana Ramanan,

 

As of the current moment OpenVINO DL Workbench doesn't explicitly support non-visual use cases. At the current moment I could recommend you to explore OpenVINO Post Training Optimization tool (POT)  https://docs.openvinotoolkit.org/latest/pot_README.html that is a CLI tool that being used by DL Workbench under the hood to do INT8 conversion. POT supports use-cases outside of CV, so you could check if it solves your issue. 

Regards,

Mikhail

0 Kudos
Zulkifli_Intel
Moderator
1,189 Views

Hello Buvana,

 

Have you tried the recommendation from Mikhail?

 

Sincerely,

Zulkifli


0 Kudos
Munesh_Intel
Moderator
1,129 Views

Hi Buvana,

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,

Munesh


0 Kudos
Reply