모델 최적화기를 사용하여 사용자 정의 SSD MobileNet V2 모델을 IR로 변환하는 단계
사전 교육을 받은 SSD MobileNetV2 모델을 IR로 변환했지만 맞춤 교육을 받은 모델을 변환할 수 없습니다.
- 내보낸 냉동 모델 그래프:
python object_detection/export_inference_graph.py \ --input_type=image_tensor \ --pipeline_config_path={PIPELINE_CONFIG_PATH} \ --output_directory="exported_model" \ --trained_checkpoint_prefix="/content/model/research/helmet_detector/model.ckpt-10000"
- Model Optimizer를 사용하여 냉동 모델 그래프를 IR로 변환하려고 시도했습니다.
python mo_tf.py \ --input_model ./exported_model/frozen_inference_graph.pb \ --tensorflow_use_custom_operations_config 확장/전면/tf/ssd_v2_support.json \ --tensorflow_object_detection_api_pipeline_config ./helment_detector_tf1.config \ --input_shape [1,300,300,3] \ --reverse_input_channels \ --output_dir output_ncs \ --data_type FP16
- 오류가 발생했습니다.
[ 오류] 교체기 "REPLACEMENT_ID"(): 노드 StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/map/while에 대한 속성을 추출하는 동안 예기치 않은 예외가 발생했습니다. 원래 예외 메시지: '^Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField/Assert/Assert'
모델 최적화기 변환 명령에서 TensorFlow* 1 모델( ssd_support_api_v1.15.json)으로 생성된 SSD MobileNetV2 모델에 적합한 사용자 지정 작업 구성 파일을 사용하십시오. 변환 지침은 다음 페이지를 참조하십시오 . 모델 변환 방법
python3 ./openvino/model-optimizer/mo_tf.py --input_model ./detector/exported_model/frozen_inference_graph.pb --tensorflow_use_custom_operations_config ./openvino/model-optimizer/extensions/front/tf/ssd_support_api_v1.15.json --tensorflow_object_detection_api_pipeline_config ./detector/helment_detector_tf1.config --input_shape [1,300,300,3] --reverse_input_channels --data_type FP16