Using the MindX SDK Pipeline for Visualized Process Orchestration

  1. Create a pipeline file.

    On the menu bar of MindStudio, choose Ascend > MindX SDK Pipeline to create a pipeline file.

  2. Orchestrate the process.
    1. On the new pipeline file editing page, select the following plugins in the plugin library on the left, drag them to the drawing board on the right, and sort them from left to right, as shown in Figure 1.
      • appsrc
      • mxpi_imagedecoder
      • mxpi_imageresize
      • mxpi_tensorinfer
      • mxpi_dataserialize
      • appsink
      Figure 1 Selecting and dragging the required plugins
    2. Drag the connection points of the plugin block to connect each module in sequence, as shown in Figure 2. (You can click at the bottom to arrange the order.)
      Figure 2 Sorting and connecting each plugin
  3. Set plugin parameters.
    1. Click appsrc0 and modify the parameters on the right by referring to Figure 3.
      • Set blocksize to 40960000.
      Figure 3 appsrc0 plugin parameters

    2. Click mxpi_imageresize0 and modify the parameters on the right by referring to Figure 4.
      • Set resizeHeight to 256.
      • Set resizeWidth to 256.
      Figure 4 mxpi_imageresize0 plugin parameters
    3. Click mxpi_tensorinfer0 and modify the parameters on the right by referring to Figure 5.
      • modelPath indicates the .om model file after model conversion. Select face_mask_detection.om in the models directory.
      Figure 5 mxpi_tensorinfer0 plugin parameters
    4. Click mxpi_dataserialize0 and modify the parameters on the right by referring to Figure 6.
      • Set outputDataKeys to the previous plugin, that is, mxpi_tensorinfer0.
      Figure 6 mxpi_dataserialize0 plugin parameters
    5. Click appsink0 and modify the parameters on the right by referring to Figure 7.
      • Set blocksize to 409600000.
      Figure 7 appsink0 plugin parameters
    6. Select all plugins in the drawing board, right-click them, and choose Set Stream Name from the shortcut menu, as shown in Figure 8.
      Figure 8 Selecting all plugins
    7. In the Save Stream Name dialog box, set Stream Name to detection, as shown in Figure 9.
      Figure 9 Setting Stream Name
    8. Select all plugins again, right-click them, and choose Set Device Id from the shortcut menu. In the Save Device ID dialog box, change the value of Device Id to 0, as shown in Figure 10.
      Figure 10 Setting the device ID
  4. Click on the toolbar, name the pipeline face_mask_detection, and click Save.