Introduction
Trained models under frameworks such as Caffe and TensorFlow can be converted into offline models supported by the Ascend AI processor by using the offline model generator (OMG). During offline model conversion, you can enable operator scheduling optimization, data re-orchestration in the weight file, model compression via quantization, and memory usage optimization, thereby pre-processing the model without depending on the device.
Functional Architecture
OMG Workflow
Figure 2 shows the model conversion workflow of OMG.
The OMG workflow is described as follows:
- Before using OMG, install the DDK or the Mind Studio IDE on the server and obtain the OMG tool from the specified path. For details, see Preparations.
- Upload the model to be converted to the server where the DDK is located. For details, see Sample.
- Start OMG to convert the model. Enable artificial intelligence pre-processing (AIPP) or quantization as required. For details, see AIPP Configuration and Quantization Configuration.
- The Ascend AI processor introduces the AIPP module for hardware-based image pre-processing including color space conversion (CSC), image normalization (by subtracting the mean value or multiplying a factor), image cropping (by specifying the crop start and cropping the image to the size required by the neural network), and much more. Images output by the DVPP module are aligned images in YUV420SP format. The digital vision pre-processing (DVPP) module does not output RGB images. Therefore, the AIPP module is introduced to convert the aligned YUV420SP images and then crop them to the size required by the model.
- Quantization refers to low-bit quantization of high-precision data, suitable for scenarios that are model-size and performance demanding. This feature results in lightweight models, with reduced storage spaces and transfer latency but improved computation efficiency.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot