Community
cancel
Showing results for 
Search instead for 
Did you mean: 
f__t
Beginner
84 Views

Why mean_value is unnecessary when convert caffe model to IR formart in demo_squeezenet_download_convert_run.bat?

I have a one question about Caffe model converts to  IR format using Model Optimaizer.

There is the following description in list_topologies.yml.
----
  - name: "squeezenet1.1"
    description: "SqueezeNet v1.1 (https://github.com/DeepScale/SqueezeNet/tree/master/SqueezeNet_v1.1)"
    files:
      - name: squeezenet1.1.prototxt
        sha256: d041bfb2ab4b32fda4ff6c6966684132f2924e329916aa5bfe9285c6b23e3d1c
        source: https://raw.githubusercontent.com/DeepScale/SqueezeNet/a47b6f13d30985279789d08053d37013d67d131b/Sque...
      - name: squeezenet1.1.caffemodel
        sha256: 72b912ace512e8621f8ff168a7d72af55910d3c7c9445af8dfbff4c2ee960142
        source: https://github.com/DeepScale/SqueezeNet/raw/a47b6f13d30985279789d08053d37013d67d131b/SqueezeNet_v1.1...
    output: "classification/squeezenet/1.1/caffe"
    postprocessing:
      - $type: regex_replace
        file: squeezenet1.1.prototxt
        pattern: 'dim: 10'
        replacement: 'dim: 1'
    model_optimizer_args:
      - --framework=caffe
      - --data_type=FP32
      - --input_shape=[1,3,227,227]
      - --input=data
      - --mean_values=data[104.0,117.0,123.0]
      - --output=prob
      - --input_model=$dl_dir/squeezenet1.1.caffemodel
      - --input_proto=$dl_dir/squeezenet1.1.prototxt
    framework: caffe
    license: https://github.com/DeepScale/SqueezeNet/blob/master/LICENSE
----

When I run "demo_squeezenet_download_convert_run.bat", caffe model has been converted following:

====
python mo.py --input_model "C:\Users\xxx\Documents\Intel\OpenVINO\openvino_models\models\FP32\classification\squeezenet\1.1\caffe\squeezenet1.1.caffemodel" --output_dir "C:\Users\xxx\Documents\Intel\OpenVINO\openvino_models\ir\FP32\classification\squeezenet\1.1\caffe" --data_type FP32
Model Optimizer arguments:
Common parameters:
        - Path to the Input Model:      C:\Users\xxx\Documents\Intel\OpenVINO\openvino_models\models\FP32\classification\squeezenet\1.1\caffe\squeezenet1.1.caffemodel
        - Path for generated IR:        C:\Users\xxx\Documents\Intel\OpenVINO\openvino_models\ir\FP32\classification\squeezenet\1.1\caffe
        - IR output name:       squeezenet1.1
        - Log level:    ERROR
        - Batch:        Not specified, inherited from the model
        - Input layers:         Not specified, inherited from the model
        - Output layers:        Not specified, inherited from the model
        - Input shapes:         Not specified, inherited from the model
        - Mean values:  Not specified
        - Scale values:         Not specified
        - Scale factor:         Not specified
        - Precision of IR:      FP32
        - Enable fusing:        True
        - Enable grouped convolutions fusing:   True
        - Move mean values to preprocess section:       False
        - Reverse input channels:       False
Caffe specific parameters:
        - Enable resnet optimization:   True
        - Path to the Input prototxt:   C:\Users\xxx\Documents\Intel\OpenVINO\openvino_models\models\FP32\classification\squeezenet\1.1\caffe\squeezenet1.1.prototxt
        - Path to CustomLayersMapping.xml:      extensions\front\caffe\CustomLayersMapping.xml
        - Path to a mean file:  Not specified
        - Offsets for a mean file:      Not specified
Model Optimizer version:        2019.1.1-83-g28dfbfd

[ SUCCESS ] Generated IR model.
[ SUCCESS ] XML file: C:\Users\xxx\Documents\Intel\OpenVINO\openvino_models\ir\FP32\classification\squeezenet\1.1\caffe\squeezenet1.1.xml
[ SUCCESS ] BIN file: C:\Users\xxx\Documents\Intel\OpenVINO\openvino_models\ir\FP32\classification\squeezenet\1.1\caffe\squeezenet1.1.bin
[ SUCCESS ] Total execution time: 3.45 seconds.
====

Here, I have a question.
Why mean_value is unnecessary when convert caffe model to IR formart in demo_squeezenet_download_convert_run.bat?

 

My understanding is that mean_values is necessary when converting caffe model to IR format using mo.py.

It is because it is described below.

https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_C...

 

But, in demo_squeezenet_download_convert_run.bat, mean_values option is not used.

 

Thanks.

0 Kudos
0 Replies
Reply