-
-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
179 additions
and
222 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,116 @@ | ||
xhost +local: && \ | ||
docker run --gpus all -it --rm \ | ||
-v `pwd`:/home/user/workdir \ | ||
-v /tmp/.X11-unix/:/tmp/.X11-unix:rw \ | ||
--device /dev/video0:/dev/video0:mwr \ | ||
--net=host \ | ||
-e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \ | ||
-e DISPLAY=$DISPLAY \ | ||
--privileged \ | ||
pinto0309/openvino2tensorflow:latest | ||
|
||
cd workdir | ||
|
||
|
||
MODEL=nanodet | ||
H=320 | ||
W=320 | ||
|
||
$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer/mo.py \ | ||
--input_model ${MODEL}_${H}x${W}.onnx \ | ||
--data_type FP32 \ | ||
--output_dir openvino/${H}x${W}/FP32 | ||
$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer/mo.py \ | ||
--input_model ${MODEL}_${H}x${W}.onnx \ | ||
--data_type FP16 \ | ||
--output_dir openvino/${H}x${W}/FP16 | ||
mkdir -p openvino/${H}x${W}/myriad | ||
${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/myriad_compile \ | ||
-m openvino/${H}x${W}/FP16/${MODEL}_${H}x${W}.xml \ | ||
-ip U8 \ | ||
-VPU_NUMBER_OF_SHAVES 4 \ | ||
-VPU_NUMBER_OF_CMX_SLICES 4 \ | ||
-o openvino/${H}x${W}/myriad/${MODEL}_${H}x${W}.blob | ||
|
||
|
||
MODEL=nanodet | ||
H=416 | ||
W=416 | ||
|
||
$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer/mo.py \ | ||
--input_model ${MODEL}_${H}x${W}.onnx \ | ||
--data_type FP32 \ | ||
--output_dir openvino/${H}x${W}/FP32 | ||
$INTEL_OPENVINO_DIR/deployment_tools/model_optimizer/mo.py \ | ||
--input_model ${MODEL}_${H}x${W}.onnx \ | ||
--data_type FP16 \ | ||
--output_dir openvino/${H}x${W}/FP16 | ||
mkdir -p openvino/${H}x${W}/myriad | ||
${INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/myriad_compile \ | ||
-m openvino/${H}x${W}/FP16/${MODEL}_${H}x${W}.xml \ | ||
-ip U8 \ | ||
-VPU_NUMBER_OF_SHAVES 4 \ | ||
-VPU_NUMBER_OF_CMX_SLICES 4 \ | ||
-o openvino/${H}x${W}/myriad/${MODEL}_${H}x${W}.blob | ||
|
||
|
||
|
||
|
||
|
||
MODEL=nanodet | ||
H=320 | ||
W=320 | ||
openvino2tensorflow \ | ||
--model_path onnx/openvino/nanodet_320x320/FP32/nanodet_320x320.xml \ | ||
--output_saved_model True \ | ||
--output_h5 True \ | ||
--output_pb True \ | ||
--output_no_quant_float32_tflite True \ | ||
--output_weight_quant_tflite True \ | ||
--output_float16_quant_tflite True | ||
--model_path openvino/${H}x${W}/FP32/${MODEL}_${H}x${W}.xml \ | ||
--output_saved_model \ | ||
--output_pb \ | ||
--output_no_quant_float32_tflite \ | ||
--output_weight_quant_tflite \ | ||
--output_float16_quant_tflite \ | ||
--output_integer_quant_tflite \ | ||
--string_formulas_for_normalization 'data / 255' \ | ||
--output_integer_quant_type 'uint8' \ | ||
--output_tfjs \ | ||
--output_tftrt \ | ||
--output_coreml \ | ||
--weight_replacement_config replace.json | ||
mv saved_model saved_model_${MODEL}_${H}x${W} | ||
|
||
openvino2tensorflow \ | ||
--model_path openvino/${H}x${W}/FP32/${MODEL}_${H}x${W}.xml \ | ||
--output_saved_model \ | ||
--string_formulas_for_normalization 'data / 255' \ | ||
--output_integer_quant_type 'uint8' \ | ||
--output_edgetpu \ | ||
--weight_replacement_config replace.json | ||
mv saved_model/model_full_integer_quant_edgetpu.tflite saved_model saved_model_${MODEL}_${H}x${W} | ||
rm -rf saved_model | ||
|
||
MODEL=nanodet | ||
H=416 | ||
W=416 | ||
openvino2tensorflow \ | ||
--model_path openvino/${H}x${W}/FP32/${MODEL}_${H}x${W}.xml \ | ||
--output_saved_model \ | ||
--output_pb \ | ||
--output_no_quant_float32_tflite \ | ||
--output_weight_quant_tflite \ | ||
--output_float16_quant_tflite \ | ||
--output_integer_quant_tflite \ | ||
--string_formulas_for_normalization 'data / 255' \ | ||
--output_integer_quant_type 'uint8' \ | ||
--output_tfjs \ | ||
--output_tftrt \ | ||
--output_coreml \ | ||
--weight_replacement_config replace.json | ||
mv saved_model saved_model_${MODEL}_${H}x${W} | ||
|
||
openvino2tensorflow \ | ||
--model_path onnx/openvino/nanodet_416x416/FP32/nanodet_416x416.xml \ | ||
--output_saved_model True \ | ||
--output_h5 True \ | ||
--output_pb True \ | ||
--output_no_quant_float32_tflite True \ | ||
--output_weight_quant_tflite True \ | ||
--output_float16_quant_tflite True | ||
--model_path openvino/${H}x${W}/FP32/${MODEL}_${H}x${W}.xml \ | ||
--output_saved_model \ | ||
--string_formulas_for_normalization 'data / 255' \ | ||
--output_integer_quant_type 'uint8' \ | ||
--output_edgetpu \ | ||
--weight_replacement_config replace.json | ||
mv saved_model/model_full_integer_quant_edgetpu.tflite saved_model saved_model_${MODEL}_${H}x${W} | ||
rm -rf saved_model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.