El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Video Intelligent Analysis Service/ API Reference/ Algorithm APIs/ Cloud Service APIs/ Creating a Crowd Counting at High Altitudes (Cloud) Job

Creating a Crowd Counting at High Altitudes (Cloud) Job

Updated on 2025-02-28 GMT+08:00

Function

This API is used to create a crowd counting at high altitudes (cloud) job.

URI

POST /v1/{project_id}/infer/services/c-highpoint-crowdcount-cloud/tasks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Job name. It can contain up to 100 characters and can include uppercase and lowercase letters, digits, hyphens (-), and underscores (_).

description

No

String

Job description. It can contain up to 500 characters.

schedule

No

TaskSchedule object

Configuration of a scheduled job. Scheduled jobs do not support OBS input. URL input supports only RTMP and RTSP.

input

Yes

TaskInput object

Input configuration of a job

output

Yes

TaskOutput object

Output configuration of a job. At least one output mode must be configured.

config

No

HighpointCrowdcountServiceConfig object

Job configuration parameters.

service_version

No

String

Service version.

is_saved_as_template

No

Boolean

Whether to save the job configuration as a template.

resource_order_id

No

String

ID of the algorithm capability package, which can be obtained on the page for purchasing an algorithm capability package.

Table 3 TaskSchedule

Parameter

Mandatory

Type

Description

type

Yes

String

Type of a scheduled job. This parameter is mandatory for scheduled jobs. Options: weekly and monthly

timezone

Yes

String

Time zone where a user is located. This parameter is mandatory for scheduled jobs. The value is accurate to the minute.

days_of_week

No

Array of integers

Days in a week when a job is executed. This parameter is mandatory only for weekly jobs. The values 1 to 7 indicate Monday to Sunday respectively.

Minimum: 1

Maximum: 7

days_of_month

No

Array of integers

Days in a month when a job is executed. This parameter is mandatory only for monthly jobs. The values 1 to 31 indicate the first day to the 31st day of a month.

Minimum: 1

Maximum: 31

periods

No

Array<Array<PeriodsData>>

Time segment configuration. Select at least one time segment for executing a weekly or monthly job.

Table 4 PeriodsData

Parameter

Mandatory

Type

Description

begin_at

Yes

String

Start time of a time segment, which is mandatory. The format is hh:mm:ss.

end_at

Yes

String

End time of a time segment, which is mandatory. The format is hh:mm:ss.

Table 5 TaskInput

Parameter

Mandatory

Type

Description

type

Yes

String

Input type of a job. This parameter is mandatory. Options:

  • obs (files stored in OBS, supported only by cloud jobs)
  • vis (video streams from Video Ingestion Service, supported only by cloud jobs)
  • url (specified file URL or stream request URL, supported only by cloud jobs)
  • edgecamera (edge camera bound to IEF, supported only by edge jobs)
  • restful (stream request URL obtained from a user-specified streaming server through a RESTful API, supported by both cloud and edge jobs)
  • vcn (VCN device, supported only by edge jobs)

data

Yes

Array of TaskInputData objects

Input details of a job. The configuration varies according to the input type. Multiple inputs are allowed during creation, but only one input is allowed for update.

vcn

No

TaskInputVcn object

VCN server information. This parameter is mandatory only when the input type is vcn.

Table 6 TaskInputData

Parameter

Mandatory

Type

Description

video_source_id

No

String

Video source ID

stream_name

No

String

Name of a VIS video stream. This parameter is mandatory when the input type is vis.

bucket

No

String

OBS bucket name. This parameter is mandatory when the input type is obs.

Maximum: 63

path

No

String

OBS path. This parameter is mandatory when the input type is obs.

Maximum: 1023

url

No

String

File URL or RESTful request URL for obtaining a video stream. This parameter is mandatory when the input type is url or edgerestful. The value contains a maximum of 1000 characters.

Maximum: 1000

headers

No

Object

Headers carried in the RESTful request for obtaining a video stream. This parameter is optional when the input type is edgerestful. The value is key-value pairs in JSON format. A maximum of 10 key-value pairs are allowed.

certificate_check

No

Boolean

Whether to verify the certificate of the HTTPS request. This parameter is mandatory when the input type is edgerestful. The value can be true or false.

rtsp_path_in_response

No

String

Video stream address in the response body for the RESTful request. This parameter is mandatory when the input type is edgerestful. The value contains a maximum of 1024 characters.

Maximum: 1024

node_id

No

String

ID of an IEF node. This parameter is mandatory only for some services when the input type is edgerestful or vcn.

device_id

No

String

VCN ID. This parameter is mandatory when the input type is vcn.

stream_type

No

Integer

Stream type used for analysis. This parameter is optional when the input type is vcn. The value ranges from 1 to 3. The value 1 indicates primary stream, the value 2 indicates secondary stream 1, and the value 3 indicates secondary stream 2.

Minimum: 1

Maximum: 3

id

No

String

ID of the edge device mounted to IEF. This parameter is mandatory when the input type is edgecamera.

Maximum: 63

Table 7 TaskInputVcn

Parameter

Mandatory

Type

Description

ip

Yes

String

IP address of the VCN server. This parameter is mandatory only when the input type is vcn.

port

Yes

Integer

Port number of the VCN server. This parameter is mandatory only when the input type is vcn.

Minimum: 0

Maximum: 65535

username

Yes

String

Account name of the VCN server. This parameter is mandatory only when the input type is vcn.

password

Yes

String

Password of the VCN server account. This parameter is mandatory only when the input type is vcn.

Table 8 TaskOutput

Parameter

Mandatory

Type

Description

dis

No

TaskOutputDis object

Configuration information when the output type is dis.

webhook

No

TaskOutputWebhook object

Configuration information when the output type is webhook.

event_center

No

Boolean

Whether to send alarms to the event center. This parameter is valid for cloud jobs.

Default: false

Table 9 TaskOutputDis

Parameter

Mandatory

Type

Description

stream_name

Yes

String

DIS stream name. This parameter is mandatory when the dis type is used.

Maximum: 64

data_category

No

Array of strings

List of job output types. This parameter is optional and is required only for some services. The output contains data in the dataCategory list.

Table 10 TaskOutputWebhook

Parameter

Mandatory

Type

Description

url

Yes

String

Result callback address. This parameter is mandatory when the output type is webhook.

Maximum: 1000

headers

Yes

Object

Headers carried in result callback. This parameter is mandatory when the output type is webhook. The value is key-value pairs in JSON format. A maximum of 10 key-value pairs are allowed, and a minimum of 1 key-value pair is allowed.

data_category

No

Array of strings

List of job output types. This parameter is optional and is required only for some services. The output contains data in the dataCategory list.

Table 11 HighpointCrowdcountServiceConfig

Parameter

Mandatory

Type

Description

common

Yes

HighpointCrowdcountCommon object

Runtime job configuration items customized by the service publisher. The value must be in JSON format. For details about the configuration items, see the description of the corresponding algorithm service.

Table 12 HighpointCrowdcountCommon

Parameter

Mandatory

Type

Description

alarm_threshold

No

String

People count alarm thresholds. Default value: 50. The value must be a positive integer. When the number of people in a video frame exceeds the threshold, an alarm is triggered and an alarm image is output in JSON format.

  • If the value of grid_x_number is greater than 0 and the value of grid_y_number is greater than 0, the grid ROI settings are enabled. If you enter more than one value, only the first value is used as the alarm threshold for all grid areas. For example, if you enter 25 36 23 40, the algorithm automatically selects the first value, that is, 25, as the alarm threshold. If the number of people in any grid exceeds this threshold, an alarm image is output.
  • If the value of grid_x_number or grid_y_number is 0, the classic ROI settings are enabled. You can enter different alarm thresholds for each ROI and separate them with spaces. If the alarm threshold list entered by the user is greater than the actual number of ROIs, the alarm threshold within the list is used. If the number of alarm thresholds within the list is less than the actual number of ROIs, use the default value for the rest part. For example, if there are three ROIs and three threshold values (25 30 20) are input, the image is sent as long as one ROI alarm is generated. When there are only two values (25 15) are entered, the threshold of the third ROI will be defaulted to 50. When there are more than three threshold values (such as 25 36 23 40) are entered, the first three values (25 36 23) are automatically selected.
  • Note: The value cannot be an empty string. Otherwise, Postman cannot deliver jobs.

sampling_time_interval

No

Integer

Interval at which video sampling is performed. The default value is 5s. The value range is [5, 3600], seconds.

Minimum: 5

Maximum: 3600

Default: 5

alert_mode

No

String

Alarming mode. Default value: single. There are two alarm modes:

  • single: event alarming. An alarm is reported only when a new alarm event is generated and the number of people reaches the alarm threshold.
  • periodic: periodic alarming. An alarm is reported each time a video sampling interval expires.

visualization_output_sw

No

Integer

Whether to send the edited video image with scenario information on it. The default value is 0, and the value range is [0 1]. By default, when the number of people in each ROI exceeds the alarm threshold, only the structured information of the original image is sent. The detected pedestrians are displayed in video image after this function is enabled. The visualized alarm information on images for different scenarios is as follows:

  • If a pedestrian is detected, it is marked with a red box.
  • Each ROI is marked with a yellow polygon in the image.

Minimum: 0

Maximum: 1

Default: 0

image_compression_ratio

No

Integer

Corresponds to the Image Compression Ratio parameter on the console. The value ranges from 20 to 100. The default value is 90, indicating that the image compression ratio is 90%.

Minimum: 20

Maximum: 100

Default: 90

target_roi

No

String

Corresponds to the Target ROI parameter on the console.

  • The value of this parameter is a JSON string. An escape character must be added in an API call. For details about the JSON format, see Setting target_roi.
  • Example: {"polygons":[{"data":[[43,266], [42,645], [472,644], [416,212]]},{"data":[[311,182], [282,670], [941,661], [835,170]]}]}
  • If this parameter is left blank, the entire area is the detection area by default.

grid_x_number

No

Integer

Corresponds to the Grid X Number parameter on the console. The default value is 0.

  • If the value of grid_y_number is 0, the value of this field is 0, indicating that the classic ROI settings are used, which is subject to target_roi.
  • Values other than 0 indicates the number of grids in the horizontal direction, and each grid corresponds to an independent detection area. For example, if the value is 3, there are three grids in the horizontal direction corresponding to three independent detection areas. Assume that the width of an image is W, the width of grids in a rightmost column are equal to a difference between W and the number (W//3)*2 is rounded down to, and the width of grids in other columns are respectively the number (W//3) is rounded down to.
  • The width of each grid must be greater than 10 pixels, that is, the value range of the number of grids in a horizontal direction is [0, min(the number (W//10) is rounded down to, 500)].

Default: 0

grid_y_number

No

Integer

Corresponds to the Grid Y Number parameter on the console. The default value is 0.

  • If the value of grid_x_number is 0, the value of this field is 0, indicating that the classic ROI settings are used, which is subject to target_roi.
  • Values other than 0 indicates the number of grids in the vertical direction, and each grid corresponds to an independent detection area. For example, if the value is 5, there are five grids in the vertical direction corresponding to five independent detection areas. Assume that the height of an image is H, and the height of a grid in a bottom row is equal to a difference between H and the number (H//5)*4 is rounded down to.
  • The height of each grid must be greater than 10 pixels, that is, the value range of the number of grids in a vertical direction is [0, min(the number (H//10) is rounded down to, 500)].

Default: 0

Response Parameters

Status code: 201

Table 13 Response body parameters

Parameter

Type

Description

id

String

Job ID.

Status code: 400

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Internal service error code

error_msg

String

Error information

Minimum: 0

Maximum: 4096

Example Requests

Create a crowd counting at high altitudes (cloud) job. Use VIS as the input source, and DIS as the output channel.

POST /v1/{project_id}/infer/services/c-highpoint-crowdcount-cloud/tasks

{
  "name" : "highpoint-crowdcount-task",
  "description" : "highpoint-crowdcount task test",
  "input" : {
    "type" : "vis",
    "data" : [ {
      "stream_name" : "highpoint-crowdcount",
      "index" : 0
    } ]
  },
  "output" : {
    "dis" : {
      "stream_name" : "dis-highpoint-crowdcount"
    }
  },
  "service_version" : "3.0",
  "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",
  "config" : {
    "common" : {
      "alarm_threshold" : "5",
      "sampling_time_interval" : 8,
      "visualization_output_sw" : 1,
      "image_compression_ratio" : 80,
      "alert_mode" : "single",
      "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}"
    }
  }
}

Example Responses

None

Status Codes

Status Code

Description

201

The service job has been created.

400

Request error

Error Codes

See Error Codes.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback