Stream Inference
Preparing a Pipeline and Model
Preparing a Model
- Download a model. The following uses YOLOv3 (version 1.6, TensorFlow framework) and ResNet-50 (version 1.7, TensorFlow framework) as examples to describe how to download a model.
- Decompress the packages and save the PB models to the ${MX_SDK_HOME}/sample/mxVision/models/yolov3 and ${MX_SDK_HOME}/sample/mxVision/models/resnet50 directories.
- Convert the model to an OM model by referring to CANN ATC Instructions. The permission on models and model-related files cannot be greater than 640.
Preparing a Pipeline
The sample pipeline is stored in ${MX_SDK_HOME}/sample/mxVision/pipeline/. To modify the element properties of a service stream in the pipeline configuration file or create a new service stream, refer to the pipeline configuration file in the aforementioned path. (The Sample.pipeline file for image processing is used as an example. For details, see Table 2.)
Preparing the Configuration File for Stream Inference
Prepare a configuration file for stream inference by referring to ${MX_SDK_HOME}/sample/mxVision/streamserver/inferConfigRepository/PipelineSample/PipelineConfig.json.