Pangu-CV-SemanticSegmentation-2.1.0
Function
The Pangu CV Semantic Segmentation Model can segment a digital image into multiple regions. It is suitable for tasks such as lane segmentation, building segmentation, and screening face status detection at a coal separation plant.
Service API calling method:
- Image inference is supported.
- Image inference services can be deployed as real-time services or edge services.
Authorization Information
An account has required permissions to call all APIs by default. To call this API as an IAM user, the IAM user must be granted the required permissions. For details, see Permissions and Supported Actions.
URI
POST /v1/{project_id}/infer-api/proxy/service/{deployment_id}/v1/rs-server/predictions
For details about how to obtain the URI, see Request URI.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition: Project ID. For details about how to obtain a project ID, see Obtaining the Project ID. Constraints: N/A Value range: N/A Default value: N/A |
| deployment_id | Yes | String | Definition: Model deployment ID. For details about how to obtain the deployment ID, see Obtaining the Model Deployment ID. Constraints: N/A Value range: N/A Default value: N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition: User token. Used to obtain the permission required to call APIs. The token is the value of X-Subject-Token in the response header in Figure 4. Constraints: N/A Value range: N/A Default value: N/A |
| Content-Type | Yes | String | Definition: MIME type of the body in the request. Constraints: N/A Value range: N/A Default value: application/json |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Apig-AppCode | Yes | String | Definition: API key. Used to obtain the permission required to call APIs. The API key is the value of X-Apig-AppCode in the response header in API key authentication. Constraints: N/A Value range: N/A Default value: N/A |
| Content-Type | Yes | String | Definition: MIME type of the body in the request. Constraints: N/A Value range: N/A Default value: application/json |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| img | Yes | String | Definition: Base64-encoded image. The image size cannot exceed 2 KB. By default, only the RGB three-channel images are supported. Constraints:
Value range: N/A Default value: N/A |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| result | Array | Definition: Prediction result. Constraints: N/A Value range: N/A Default value: N/A |
| Parameter | Type | Description |
|---|---|---|
| result | Array | Definition: Prediction result. The prediction result is a two-dimensional array returned after the model performs semantic segmentation on each pixel of the input image. Each element in the array is an integer, indicating a predicted label of the pixel. Constraints: N/A Value range: N/A Default value: N/A |
Example Request
{
"img": "/9j/4Vr2RXhpZgAASUkqAAgAAA....."
} Example Response
{
"result": [
[
0,
...
]
]
} Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot