Metadata Proto File

Google Protobuf Data Structure Definition File (MxpiDumpData.proto)

syntax = "proto3";

package MxTools;

message MxpiDumpData
{
    Buffer buffer = 1;
    repeated MetaData metaData = 2;
}

message Buffer
{
    bytes bufferData = 1;
}

message MetaData
{
    string key = 1;
    string content = 2;
    string protoDataType = 3;
}

Google Protobuf Data Structure Definition File (MxpiDataType.proto)

syntax = "proto3";

package MxTools;

// Stores video and image frames, including frame information and data information.
message MxpiFrame
{
    MxpiFrameInfo frameInfo = 1;
    MxpiVisionList visionList = 2;   // To be consistent with the VPC, the list is used.
}

message MxpiFrameInfo                // Frame information
{
    uint32 channelId = 1;
    uint32 frameId = 2;
    bool isEos = 3;
}

message MxpiVisionList               // Video and image data list
{
    repeated MxpiVision visionVec = 1;
}

message MxpiVision                         // Video and image data structure
{
    repeated MxpiMetaHeader headerVec = 1; // Vector for storing plugin information
    MxpiVisionInfo visionInfo = 2;
    MxpiVisionData visionData = 3;
}

message MxpiMetaHeader               // Data structure header, used for serialization
{
    string parentName = 1;           // This parameter will be deprecated in future releases. Use dataSource instead.
    int32 memberId = 2;              // MxpiVision index stored in MxpiVisionList
    string dataSource = 3;           // Index name of the dependency data. Use this index obtain metedata.
}

enum MxpiMemoryType {
    MXPI_MEMORY_HOST = 0;
    MXPI_MEMORY_DEVICE = 1;
    MXPI_MEMORY_DVPP = 2;
    MXPI_MEMORY_HOST_MALLOC = 3;
    MXPI_MEMORY_HOST_NEW = 4;
}

enum MxpiDataType {                   // Data type, including 8-bit unsigned integer and 32-bit floating point number.
    MXPI_DATA_TYPE_UINT8 = 0;
    MXPI_DATA_TYPE_FLOAT32 = 1;
}
message MxpiVisionInfo                // Video and image description information
{
    uint32 format = 1;               // Image format. For details, see MxbasePixelFormat in DvppWrapper.h.
    uint32 width = 2;
    uint32 height = 3;
    uint32 widthAligned = 4;
    uint32 heightAligned = 5;
    uint32 resizeType = 6;            // Resizing type. For details, see RESIZETYPE in MxPluginsUtils.h.
    float keepAspectRatioScaling = 7; // Scaling ratio. The value range is [1/32, 16].
    repeated MxpiVisionPreProcess preprocessInfo = 8;
}

message MxpiVisionPreProcess          // Image pre-processing information, including image width and height and coordinates for cropping and pasting.
{
    uint32 widthSrc = 1;
    uint32 heightSrc = 2;
    uint32 cropLeft = 3;
    uint32 cropRight = 4;
    uint32 cropTop = 5;
    uint32 cropBottom = 6;

    uint32 pasteLeft = 7;
    uint32 pasteRight = 8;
    uint32 pasteTop = 9;
    uint32 pasteBottom = 10;

    uint32 interpolation = 11;
    string elementName = 12;
}
message MxpiVisionData              // Video and image data content
{
uint64 dataPtr = 1;             // Pointer to the video and image memory
    int32 dataSize = 2;
    uint32 deviceId = 3;
    MxpiMemoryType memType = 4;
uint64 freeFunc = 5;            // Function for destroying the video and image memory
    bytes dataStr = 6;              // Base64 encoding is automatically performed when the byte data is serialized into JSON.
    MxpiDataType dataType = 7;      
    uint64 matPtr = 8;              
}
message MxpiObjectList              // Object list
{
    repeated MxpiObject objectVec = 1;
}

message MxpiObject		   // Object data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    float x0 = 2;
    float y0 = 3;
    float x1 = 4;
    float y1 = 5;
    repeated MxpiClass classVec = 6; // Class information data structure. The MxpiMetaHeader here is invalid.
    MxpiImageMask imageMask = 7;    // Image semantic segmentation data information
}

message MxpiImageMaskList            // Image semantic segmentation data list
{
    repeated MxpiImageMask imageMaskVec = 1;
}

message MxpiImageMask                // Image semantic segmentation data information, including data class, data shape, and class information.
{
    repeated MxpiMetaHeader headerVec = 1;
    repeated string className = 2;
    repeated int32 shape = 3;
    int32 dataType = 4;
    bytes dataStr = 5;
}
message MxpiClass                   // Class information data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    int32 classId = 2;
    string className = 3;
    float confidence = 4;
}

message MxpiClassList              // Class information list
{
    repeated MxpiClass classVec = 1;
}

message MxpiAttributeList         // Attribute information list
{
    repeated MxpiAttribute attributeVec = 1;
}

message MxpiAttribute            // Attribute information data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    int32 attrId = 2;
    string attrName = 3;
    string attrValue = 4;
    float confidence = 5;
}

message MxpiTrackLetList            
{
    repeated MxpiTrackLet trackLetVec = 1;
}

message MxpiTrackLet                
{
    repeated MxpiMetaHeader headerVec = 1;
    uint32 trackId = 2;
    uint32 age = 3;                 // Number of alive object frames
    uint32 hits = 4;                // Number of frames that successfully match the object
    int32 trackFlag = 5;            // Status
}

message MxpiTensorPackageList		// Model tensor package list
{
    repeated MxpiTensorPackage tensorPackageVec = 1;
}

message MxpiTensorPackage			// Data structure of the model tensor package
{
    repeated MxpiMetaHeader headerVec = 1;
    repeated MxpiTensor tensorVec = 2;
}

message MxpiTensor			    // Data structure of the model tensor
{
    uint64 tensorDataPtr = 1;             // Tensor memory pointer
    int32 tensorDataSize = 2;
    uint32 deviceId = 3;
    MxpiMemoryType memType = 4;
    uint64 freeFunc = 5;            // Tensor memory destruction function
    repeated int32 tensorShape = 6;       // Tensor dimension
    bytes dataStr = 7;
    int32 tensorDataType = 8;
}

message MxpiFeatureVectorList                    // Feature vector list
{
    repeated MxpiFeatureVector featureVec = 1;
}

message MxpiFeatureVector                          // Feature vector data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    repeated float featureValues = 2;
}

message MxpiPoseList                        // Human pose estimation data list
{
    repeated MxpiPose poseVec = 1;
}

message MxpiPose                            // Human pose estimation data information
{
    repeated MxpiMetaHeader headerVec = 1;
    repeated MxpiKeyPoint keyPointVec = 2;
    float score = 3;
}

message MxpiKeyPoint                       // Data information of key human feature points
{
    float x = 1;
    float y = 2;
    int32 name = 3;
    float score = 4;
}
message MxpiKeyPointAndAngleList          // Key point and angle list
{
    repeated MxpiKeyPointAndAngle keyPointAndAngleVec = 1;
}

message MxpiKeyPointAndAngle
{
    repeated MxpiMetaHeader headerVec = 1;
    repeated float keyPointsVec = 2;        // Information about the five key points of the object
    float angleYaw = 3;                     // Yaw angle
    float anglePitch = 4;                   // Tilt angle
    float angleRoll = 5;                    // Roll angle
}
message MxpiTextObjectList                                 // Text object data list
{
repeated MxpiTextObject objectVec = 1;
}

message MxpiTextObject                                     // Data information of the text object, such as the coordinates of the text bounding box, confidence, and detection text.
{
repeated MxpiMetaHeader headerVec = 1;
float x0 = 2;
float y0 = 3;
float x1 = 4;
float y1 = 5;
float x2 = 6;
float y2 = 7;
float x3 = 8;
float y3 = 9;
float confidence = 10;
string text = 11;
}

message MxpiTextsInfoList                                    // Text generation data list
{
repeated MxpiTextsInfo textsInfoVec = 1;
}

message MxpiTextsInfo                                         // Text generation data information
{
repeated MxpiMetaHeader headerVec = 1;
repeated string text = 2;
}

OSD protobuf Data Structure Definition File (MxpiOSDType.proto)

syntax = "proto3";
 
package MxTools;
 
import "MxpiDataType.proto";
 
message MxpiOsdInstancesList                   // Object or class OSD list
{
    repeated MxpiOsdInstances osdInstancesVec = 1;
}
 
message MxpiOsdInstances                      // Data structure of the OSD attribute description
{
    repeated MxpiMetaHeader headerVec = 1;
    repeated MxpiOsdText osdTextVec = 2;        // Text description
    repeated MxpiOsdLine osdLineVec = 3;        // Line description
    repeated MxpiOsdRect osdRectVec = 4;        // Rectangle description
    repeated MxpiOsdCircle osdCircleVec = 5;      // Circle description
}
 
message MxpiOsdText                          // Text attribute data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    string text = 2;                             // Text to be added
    int32 x0 = 3;                               // Add the X coordinate of the text origin.
    int32 y0 = 4;                               // Add the Y coordinate of the text origin.
    int32 fontFace = 5;                          // Font type of the text
    double fontScale = 6;                        // Font size of the text
    bool bottomLeftOrigin = 7;          // The value true indicates that the coordinate origin is the coordinate at the upper left corner of the text. The value false indicates that the coordinate origin is the coordinate at the lower left corner.
    MxpiOsdParams osdParams = 8;     // Instance objects of the OSD public attributes
    bool fixedArea = 9;                // Indicates whether the OSD attribute descriptions are scaled based on the original image proportion.
}
 
message MxpiOsdLine                             // Line attribute data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    int32 x0 = 2;                      // X coordinate of the upper left corner of the line
    int32 y0 = 3;                       // Y coordinate of the upper left corner of the line
    int32 x1 = 4;                      // X coordinate of the lower right corner of the line
    int32 y1 = 5;                      // Y coordinate of the lower right corner of the line
    MxpiOsdParams osdParams = 6;     // Instance objects of the OSD public attributes
}
 
message MxpiOsdRect                   // Rectangle attribute data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    int32 x0 = 2;                        // X coordinate of the upper left corner of the rectangle
    int32 y0 = 3;                        // Y coordinate of the upper left corner of the rectangle
    int32 x1 = 4;                        // X coordinate of the lower right corner of the rectangle
    int32 y1 = 5;                        // Y coordinate of the lower right corner of the rectangle
    MxpiOsdParams osdParams = 6;       // Instance objects of the OSD public attributes
    bool fixedArea = 7;                  // Indicates whether the OSD attribute descriptions are scaled based on the original image proportion.
}
 
message MxpiOsdCircle                           // Circle attribute data structure
{
    repeated MxpiMetaHeader headerVec = 1;
    int32 x0 = 2;                       // X coordinate of the upper left corner of the circle
    int32 y0 = 3;                       // Y coordinate of the upper left corner of the circle
    int32 radius = 4;                    // Radius of the circle
    MxpiOsdParams osdParams = 5;      // Instance objects of the OSD public attributes
}
 
message MxpiOsdParams               // Data structure of OSD public attributes
{
    uint32 scalerB = 1;                // Value of color channel B. The value ranges from 0 to 255.
    uint32 scalerG = 2;                // Value of color channel G. The value ranges from 0 to 255.
    uint32 scalerR = 3;                // Value of color channel R. The value ranges from 0 to 255.
    int32 thickness = 4;               // Thickness
    int32 lineType = 5;                // Line type
    int32 shift = 6;                    // Scaling parameter
}