Development Workflow
Develop an inference application through process orchestration. For the development process, see Figure 1.
Key steps in each phase:
- Preparations
- Refer to the typical service process to divide functions into modular and process-oriented functions based on the specific service requirements.
- Search for a proper Vision SDK plugin based on the functions of each module. You can use the plugins provided in the Vision SDK plugin library or develop custom plugins. For details, see (Optional) Developing a Plugin.
- Prepare a proper model based on the inference requirements. Convert the model if necessary. For details, see CANN ATC Instructions.
- Postprocess the data output by the model to provide confidence level and other results for reference.
- Process orchestration
- Understand how the service process is implemented through orchestration and how the data structure is transferred between plugins. For details, see Service Process.
- Prepare a pipeline file to connect service plugins based on the service process. For details, see Introduction to the Pipeline Configuration File.
- Understand the usage and restrictions of multi-input/output plugin process orchestration.
- Understand the code process orchestration mode.
- Service integration
Call the service stream management API MxStreamManager to initialize a stream, load the service stream configuration file (*.pipeline), obtain the output data from the specified stream based on StreamName in the stream configuration file (see Service Integration), and destroy the stream.
- Compilation (only for C/C++)
Configure environment variables, prepare CMakeLists.txt, and perform compilation.
- Script building and running
Execute the executable file generated after compilation and run and verify the application.
The C++ and Python directories in {Vision installation path}/samples/mxVision/ of the installation package contain process orchestration samples. For details about the execution procedure, see README.md in the corresponding directory. The compilation and execution script is run.sh in the corresponding directory. Before execution, change the CANN-related environment variables in the run.sh script to the actual CANN installation path.