-
-
Notifications
You must be signed in to change notification settings - Fork 657
Expand file tree
/
Copy pathconvert_script.txt
More file actions
53 lines (43 loc) · 1.71 KB
/
Copy pathconvert_script.txt
File metadata and controls
53 lines (43 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
python3 ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/mo.py \
--input_model onnx/efficientnet_anomaly_detection_segmentation.onnx \
--input x.1 \
--output_dir openvino/efficientnet_anomaly_detection_segmentation/FP32 \
--data_type FP32
python3 ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer/mo.py \
--input_model onnx/efficientnet_anomaly_detection_segmentation.onnx \
--input x.1 \
--output_dir openvino/efficientnet_anomaly_detection_segmentation/FP16 \
--data_type FP16
docker run --gpus all -it --rm \
-v `pwd`:/workspace/resources \
-e LOCAL_UID=$(id -u $USER) \
-e LOCAL_GID=$(id -g $USER) \
pinto0309/openvino2tensorflow:latest bash
source /opt/intel/openvino_2021/bin/setupvars.sh
cd resources
openvino2tensorflow \
--model_path openvino/efficientnet_anomaly_detection_segmentation/FP32/efficientnet_anomaly_detection_segmentation.xml \
--output_pb True
pb_to_saved_model \
--pb_file_path saved_model/model_float32.pb \
--inputs inputs:0 \
--outputs Identity:0
saved_model_to_tflite \
--saved_model_dir_path saved_model \
--output_no_quant_float32_tflite True \
--output_weight_quant_tflite True \
--output_float16_quant_tflite True \
--output_integer_quant_tflite True \
--string_formulas_for_normalization 'data / 255' \
--output_tfjs True \
--output_tftrt True \
--output_coreml True
saved_model_to_tflite \
--saved_model_dir_path saved_model \
--output_onnx True \
--onnx_opset 13
${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/myriad_compile \
-m saved_model/openvino/FP16/efficientnet_anomaly_detection_segmentation.xml \
-VPU_NUMBER_OF_SHAVES 4 \
-VPU_NUMBER_OF_CMX_SLICES 4 \
-o saved_model/openvino/myriad/efficientnet_anomaly_detection_segmentation.blob