Converting a Model

  1. Go to the model conversion page.

    Choose Ascend > Model Converter from the menu bar of MindStudio, or click on the toolbar.

  2. On the Model Information page, set the parameters, as shown in Figure 1. Click Next.
    • Model File: Select the uploaded pre-trained model file (.pb).
    • Target Soc Version: Select a SoC version, for example, Ascend310.
    • Output Path: Output directory of the generated .om model. Select the models folder in the project directory.
    • Input Nodes: Change Shape of data_1 to 1,260,260,3. The original value -1 indicates a dynamic batch. In the current sample, only a single image is involved.
    Figure 1 Model Information
  3. On the Data Pre-Processing page, enable Data Preprocessing and Load Aipp Configuration, as shown in Figure 2. Click Next.
    • Image Pre-procesing Mode: Select Static.
    • Aipp Configuration File: Select the loaded AIPP configuration file. The file is stored in the models directory.
    Figure 2 Data Pre-processing
  4. On the Advanced Options Preview page, confirm the information, and click Finish to start conversion.
  5. If the following information is displayed, the model is successfully converted and the .om file is displayed in the output directory, as shown in Figure 3.
    Model converted successfully.
    Figure 3 Model converted successfully