Development Workflow
Figure 1 shows the workflow of developing and running an inference service in MindStudio. In-depth development is an advanced SDK feature designed for senior developers.
- Determine the service process.
Modularize the service process based on functions such as object detection, image classification, and attribute recognition. For details, see Figure 1.
- Search for proper plugins.
Match service functions based on the function description and specifications of existing SDK plugins. If the plugins provided by the SDK cannot meet your requirements, you can develop custom plugins. For details, see Developing a Plugin, and "Existing Plugin Introduction" and "Plugin Development Description" in the mxManufacture User Guide or mxVision User Guide.
- Prepare model files and datasets.
Add model files and datasets for inference based on the actual application scenario of plugins. (The path of the model to be loaded cannot contain spaces.)
- Convert your model.
Before adding a model file, you need to convert the model trained in a third-party framework to an .om offline model adapted to the Ascend AI Processor by referring to Model Conversion. For details about how to convert the model of an SDK sample project, see 4 to 6 in Using an SDK Sample Project. For details about model conversion and related parameter settings, see the ATC Instructions.
- Add one or more model files.
Upload the prepared model files to a user-defined directory of the application project.
- Prepare inference data.
Prepare the data required for inference and upload the data to the application project directory.
- Convert your model.
- Orchestrate the process.
For details, see Orchestrating a Visualized Process, and "Process Orchestration" and "Data Flow" in the mxManufacture User Guide or mxVision User Guide.
- Integrate the service.
Use C++ or Python for programming, call the service stream management API MxStreamManager to initialize the stream, load the service stream configuration file (*.pipeline), obtain the output data from the specified stream based on StreamName in the stream configuration file, and destroy the stream.
For details about available APIs, see "API Reference (C++)" and "API Reference (Python)" in the mxManufacture User Guide or mxVision User Guide.
- Build and run the application.
For details, see Building and Running an Application Project.
MindX SDK Ascend application projects support the profiling function. For details, see Performance Analysis.
