detect_labels(self, **kwargs) Method

Invoke the face detection interface and return the face detection results
request syntax

mage = Image(uri="fds://cnbj2.fds.api.xiaomi.com/vision-test/test_img.jpg")
detect_labels_param = DetectLabelsParam(maxLabels = 5, minConfidence= 0.1)
detect_labels_request = DetectLabelsRequest(image=image, param=detect_labels_param)
labels_list = vision_client.detect_labels(detect_labels_request)

Parameters

detect_labels_request : DetectLabelsRequest object, you must

When the user invokes the object detection interface, mandatory information and data must also be provided. See DetectLabelsRequest 

Response Syntax

{"labels": [
                {
                    "confidence": 0.25356695,
                    "name": "woman,adult female"
                },
                {
                    "confidence": 0.20326138,
                    "name": "female child,girl,little girl"
                }
            ]
}

labels List of objects identified

Name String
Category Name of the identified item
Confidence float
Confidence for the corresponding name