Overview

Typical Scenarios

The resolution and format of the source image or video can be processed to meet the model requirements. The following is an example of a typical scenario.

Data Processing Modes

Ascend CANN provides two image/video data processing modes, as described in the following table. This section focuses on DVPP-based image/video data processing.

AIPP and DVPP can be used separately or together. In combined applications, DVPP is used first to decode, crop, and resize images or videos. However, due to DVPP hardware restrictions, the image format and resolution after DVPP may not meet the model requirements. Therefore, AIPP is required to further perform color space conversion (CSC), image cropping, and border making.

For example, in the Ascend 310 AI Processor and Ascend 910 AI Processor, DVPP video decoing supports only the output of YUV images. If the model requires RGB images, AIPP is required to perform CSC.

Image/Video Data Processing Mode

Description

Artificial Intelligence Pre-Processing (AIPP)

AIPP implements functions on the AI Core, including image resizing (such as cropping and padding), CSC, mean subtraction, and factor multiplication (for pixel changing).

AIPP supports static and dynamic modes. However, these two modes are mutually exclusive.
  • Static AIPP: If you use this mode and specify the AIPP parameters when converting a model, the AIPP attribute values are saved in the offline model (.om file) after the model is generated. Fixed AIPP configurations are used in each model inference.

    In static AIPP mode, batches share the same set of AIPP parameters.

  • Dynamic AIPP: If you use this mode when converting a model, you can set dynamic AIPP parameters before running the model for inference. Then, different AIPP parameters are used in model execution.

    In dynamic AIPP mode, batches can use different sets of AIPP parameters.

Digital Vision Pre-Processing (DVPP)

DVPP is an embedded image processing unit of an Ascend AI Processor. It provides powerful hardware acceleration capabilities for media processing through AscendCL APIs. It performs functions including resizing, cropping, format conversion, image encoding/decoding, and video encoding/decoding.

Function Support