Publishing 2019 R1 content
[platform/upstream/dldt.git] / tools / calibration / README.md
1 # OpenVINO™ Calibration Python* package
2 The Inference Engine `openvino.tools.calibration` Python\* package includes types to calibrate a given FP32 model so that you can run it in low-precision 8-bit integer mode while keeping the input data of this model in the original precision.  
3 The package has the following dependencies:
4 * `openvino.tools.accuracy_checker` package
5 * `openvino.tools.benchmark` package.  
6
7 Please, refer to https://docs.openvinotoolkit.org for details.
8
9 ## Usage
10 You can use the `openvino.tools.calibration` package in a simple way:
11 ```Python
12 import openvino.tools.calibration as calibration
13
14 with calibration.CommandLineProcessor.process() as config:
15     network = calibration.Calibrator(config).run()
16     if network:
17         network.serialize(config.output_model)
18 ```
19 ### Explanation
20 1. Import openvino.tools.calibration types:
21 ```Python
22 import openvino.tools.calibration as calibration
23 ```
24
25 2. Read configuration and process the model:
26 ```Python
27 config = calibration.CommandLineProcessor.process()
28 ```
29
30 3. Serialize result model:
31 ```Python
32 network.serialize(config.output_model)
33 ```