Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / samples / calibration_tool / README.md
index f40c671..6e07559 100644 (file)
@@ -3,12 +3,14 @@
 Inference Engine Calibration Tool calibrates a given FP32 model so that is can be run in low-precision 8-bit integer
 mode while keeping the input data of this model in the original precision.
 
+> **NOTE**: By default, Inference Engine samples and demos expect input with BGR channels order. If you trained your model to work with RGB order, you need to manually rearrange the default channels order in the sample or demo application or reconvert your model using the Model Optimizer tool with `--reverse_input_channels` argument specified. For more information about the argument, refer to **When to Specify Input Shapes** section of [Converting a Model Using General Conversion Parameters](./docs/MO_DG/prepare_model/convert_model/Converting_Model_General.md).
+
 ## Calibration Tool Options
 
 The core command-line options for the Calibration Tool are the same as for
-[Validation Application](./samples/validation_app/README.md). However, the Calibration Tool has the following specific options: `-t`, `-subset`, `-output`, and `-threshold`.
+[Validation Application](./inference-engine/samples/validation_app/README.md). However, the Calibration Tool has the following specific options: `-t`, `-subset`, `-output`, and `-threshold`.
 
-Running the Calibration Tool with the `-h` option yields the following usage message with all CLI options listed:
+Running the Calibration Tool with the `-h` option yields the following usage message:
 ```sh  
 Usage: calibration_tool [OPTION]
 
@@ -25,7 +27,7 @@ Available options:
     -lbl <path>               Labels file path. The labels file contains names of the dataset classes
     -l <absolute_path>        Required for CPU custom layers. Absolute path to a shared library with the kernel implementations.
     -c <absolute_path>        Required for GPU custom kernels. Absolute path to an .xml file with the kernel descriptions.
-    -d <device>               Target device to infer on: CPU (default), GPU, FPGA, or MYRIAD. The application looks for a suitable plugin for the specified device.
+    -d <device>               Target device to infer on: CPU (default), GPU, FPGA, HDDL or MYRIAD. The application looks for a suitable plugin for the specified device.
     -b N                      Batch size value. If not specified, the batch size value is taken from IR
     -ppType <type>            Preprocessing type. Options: "None", "Resize", "ResizeCrop"
     -ppSize N                 Preprocessing size (used with ppType="ResizeCrop")
@@ -35,7 +37,7 @@ Available options:
     -subset                   Number of pictures from the whole validation set tocreate the calibration dataset. Default value is 0, which stands forthe whole provided dataset
     -output <output_IR>       Output name for calibrated model. Default is <original_model_name>_i8.xml|bin
     -threshold                Threshold for a maximum accuracy drop of quantized model. Must be an integer number (percents) without a percent sign. Default value is 1, which stands for accepted accuracy drop in 1%
-    - stream_output           Flag for printing progress as a plain text.When used, interactive progress bar is replaced with multiline output
+    -stream_output            Flag for printing progress as a plain text.When used, interactive progress bar is replaced with multiline output
 
     Classification-specific options:
       -Czb true               "Zero is a background" flag. Some networks are trained with a modified dataset where the class IDs  are enumerated from 1, but 0 is an undefined "background" class (which is never detected)
@@ -53,6 +55,9 @@ The tool options are divided into two categories:
 2. **Network type-specific options** named as an acronym of the network type (<code>C</code> or <code>OD</code>)
    followed by a letter or a word.
 
+You can run the tool with public or pre-trained models. To download the pre-trained models, use the OpenVINO [Model Downloader](https://github.com/opencv/open_model_zoo/tree/2018/model_downloader) or go to [https://download.01.org/opencv/](https://download.01.org/opencv/).
+
+> **NOTE**: Before running the tool on a trained model, make sure the model is converted to the Inference Engine format (`*.xml` + `*.bin`) using the [Model Optimizer tool](./docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
 
 ## Calibrate a Classification Model
 
@@ -68,7 +73,7 @@ named as labels that contain all images of this class and ImageNet*-like format,
 `.txt` file containing list of images and IDs of classes.
 
 For more information on the structure of the datasets, refer to the **Prepare a Dataset** section of the
-[Validation Application document](./samples/validation_app/README.md).
+[Validation Application document](./inference-engine/samples/validation_app/README.md).
 
 If you decide to use the subset of the given dataset, use the ImageNet-like format
 instead of "folder as classes" format. This brings a more accurate calibration as you are likely to get images
@@ -79,11 +84,9 @@ To run the sample you can use classification models that can be downloaded with
 For example, to calibrate the trained Caffe\* `resnet-50` classification model, run the following command:
 
 ```bash
-./calibration_tool -t C -m resnet-50.xml -i ILSVRC2012_val.txt -Czb false -ppType "ResizeCrop" -ppSize 342 -b 1 -d CPU -subset 2000
+./calibration_tool -t C -m <path_to_model>/resnet-50.xml -i ILSVRC2012_val.txt -Czb false -ppType "ResizeCrop" -ppSize 342 -b 1 -d CPU -subset 2000
 ```
 
-> **NOTE**: To run the tool for a model, the model should be first converted to the Inference Engine format (\*.xml + \*.bin) using the [Model Optimizer tool](./docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
-
 ## Calibrate Object Detection Model
 
 This topic demonstrates how to run the Calibration Tool on the Object Detection CNN on a set of images. Please
@@ -96,7 +99,7 @@ format as the SSD CNN should be supported as well.
 
 Before you start calibrating the model, make sure your dataset is in the correct format. For more information,
 refer to the **Prepare a Dataset** section of the
-[Validation Application document](./samples/validation_app/README.md).
+[Validation Application document](./inference-engine/samples/validation_app/README.md).
 
 Once you have prepared the dataset, you can calibrate the model on it by running the following command:
 ```bash
@@ -106,3 +109,5 @@ Once you have prepared the dataset, you can calibrate the model on it by running
 ## See Also
 
 * [Using Inference Engine Samples](./docs/IE_DG/Samples_Overview.md)
+* [Model Optimizer](./docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
+* [Model Downloader](https://github.com/opencv/open_model_zoo/tree/2018/model_downloader)