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.
6404 Discussions

Getting error while optimization of faster_rcnn_inceptionv2_coco model using POT toolkit

raushan
Novice
806 Views

Hi,

I'm trying to optimize my faster_rcnn_inceptionv2_coco model using POT command line. i have passed below configuration file

{
/* Model parameters */

"model": {
"model_name": "model_name", // Model name
"model": "/home/ubuntu/Desktop/fine_tuned_model/shape/frozen_inference_graph.xml", // Path to model (.xml format)
"weights": "/home/ubuntu/Desktop/fine_tuned_model/shape/frozen_inference_graph.bin" // Path to weights (.bin format)
},

/* Parameters of the engine used for model inference */

"engine": {
"config": "/opt/intel/openvino_2021/deployment_tools/tools/post_training_optimization_toolkit/libs/open_model_zoo/tools/accuracy_checker/configs/faster_rcnn_inception_v2_coco.yml" // Path to Accuracy Checker config
},

/* Optimization hyperparameters */

"compression": {
"target_device": "ANY", // Target device, the specificity of which will be taken
// into account during optimization
"algorithms": [
{
"name": "DefaultQuantization", // Optimization algorithm name
"params": {
"preset": "performance", // Preset [performance, mixed, accuracy] which control the quantization
// mode (symmetric, mixed (weights symmetric and activations asymmetric)
// and fully asymmetric respectively)

"stat_subset_size": 300 // Size of subset to calculate activations statistics that can be used
// for quantization parameters calculation
}
}
]
}
}

 

And engine config file as

models:
- name: faster_rcnn_inception_v2_coco
launchers:
- framework: dlsdk
adapter: ssd
inputs:
- name: image_info
type: CONST_INPUT
value: [[600, 1024, 1]]

datasets:
- name: ms_coco_detection_91_classes
annotation_conversion:
converter: mscoco_detection
annotation_file: /home/ubuntu/Desktop/annotations/instances_default.json
has_background: False
sort_annotations: True
use_full_label_map: True
data_source: /home/ubuntu/Desktop/images/
preprocessing:
- type: resize
aspect_ratio_scale: fit_to_window
dst_height: 600
dst_width: 1024
- type: padding
dst_height: 600
dst_width: 1024
pad_type: right_bottom

postprocessing:
- type: faster_rcnn_postprocessing_resize
dst_height: 600
dst_width: 1024

metrics:
- type: coco_precision
max_detections: 100

 

And i'm getting error as KeyError: ('proposals', 0). I have attached the command also.

0 Kudos
1 Reply
Luis_at_Intel
Moderator
758 Views

Hi raushan,


Thanks for reaching out, I apologize for the delay in our response. We are still investigating this issue, from current analysis looks like there might be a need to update the quantization config but I am unclear as to what needs to be changed/updated.

Have you tried to use and modify the config quantization sample files available in /opt/intel/openvino_2021/deployment_tools/tools/post_training_optimization_toolkit/configs/examples/quantization/object_detection dir (faster_rcnn_resnet50_coco or faster_rcnn_resnet101_coco) instead of using the default_quantization_template.json? If possible please share your configs, model files and dataset to replicate the issue, in case you don't want to post them publicly you can send them to us via email.


Regards,

Luis


0 Kudos
Reply