Getting Started: Huawei
Getting Started: Huawei
Getting Started
Issue 01
Date 2020-03-27
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Website: https://www.huawei.com
Email: [email protected]
Contents
1.2 Preparations
Creating a HUAWEI CLOUD Account
Before using Huawei HiLens, you need to apply for a HUAWEI CLOUD account and
complete real-name authentication. By using this account, you can use HUAWEI
CLOUD services and pay only for the services you use. For details, see Account
Registration Process and Real-Name Authentication.
This chapter describes how developers who purchase HiLens Kit devices develop
skills using templates and install the skills to devices. After the installation is
complete, you can view the skill running effect on the Huawei HiLens
management console.
The Safety Helmet Detection Template is used as an example to demonstrate
the entire process from skill development to skill effect viewing. After the skill is
installed, the camera can detect whether workers are wearing safety helmets.
Before you start, carefully complete the preparations described in Preparations.
Figure 2-1 shows the development process.
Preparations
● Register a HUAWEI CLOUD account and perform real-name authentication.
Before using Huawei HiLens, check the account status, which cannot be in
arrears or frozen.
● Purchase a HiLens Kit device and register it with the Huawei HiLens
platform.
Skill Used for skill verification to Use the hash check value
Code prevent fake skills. in the template. You do not
Value need to set this parameter.
Descript Detailed description about the Enter the skill output mode
ion skill, based on the template.
You can enter a maximum of ● HDMI: The video data is
2,048 characters. Special output to the display
characters ~^$%& are not through the HDMI port
allowed. of the device.
● RTMP: The video data is
output to a server in
real time for users to
view.
● H264_FILE: The video
data is output as files to
OBS for users to view.
b. Set the skill content. For details about the parameters, see Table 2-2.
NOTE
In this example, an existing template is used to develop the skill. The skill content
uses the model and code of the template by default. You can use the default
information or edit it as required. The parameters vary if you use an empty
template to develop the skill. For details, see the Huawei HiLens User Guide.
Skill Format of the skill to be You can directly use the template
Format created. Two formats are model and do not need to set
available: Skill package this parameter.
and Container image.
Runtim Runtime language of the You can directly use the template
e logic code. Currently, the model and do not need to set
Langua value can be Python3.7 this parameter.
ge or C/C++. If the C/C++
language is selected for
development, online
code compilation is not
supported. Developers
need to develop and
compile the code offline,
package the code in the
Linux environment, and
upload the package the
OBS.
Functio The startup of a skill uses You can directly use the template
n the code execution file as model and do not need to set
Executi the entry, which is similar this parameter.
on to the main function of
Entry the C language. The
main file must be in the
level-1 directory.
● The main file of a skill
in the Skill package
format must be in the
root directory of the
skill package. For
example, end the file
of a Python skill
with .py.
● For a skill in the
Container image
format, if
ENTTRYPOINT has
been configured for
dockerfile, the
description can be left
blank. Otherwise, you
need to enter the path
to the execution file
within the image.
The file name can
contain a maximum of
1,024 characters,
consisting of letters,
digits, and underscores
(_). Special characters
#~^ are not allowed.
Code Upload mode of the logic If you use a template, you do not
Entry code. need to set this parameter.
Mode ● Online Compilation
Use the logic code for
developing skills
online to
automatically
generate a .zip
package and upload it
to OBS. Huawei
HiLens automatically
creates an OBS bucket
for storing the skill
package. The bucket is
named in the
<project_id>-hilens-
skill format. You can
go to the OBS
console, find the OBS
bucket with the
corresponding name,
and obtain the code
package file edited
online.
● Upload From OBS
You can develop
complex project code
offline, manually
generate a .zip
or .tar.gz package,
upload it to OBS, and
select the .zip
or .tar.gz package
from OBS here.
● Select Container
Image
For skills in the
container image
format, you can
upload their container
image files to SWR in
advance. For details,
see Uploading an
Image Through the
Docker Client.
This chapter describes how developers who purchase HiLens Kit devices develop
skills using HiLens Studio and install the skills to devices. After the installation is
complete, you can view the skill running effect on the Huawei HiLens
management console.
Preparations
● Register a HUAWEI CLOUD account and perform real-name authentication.
Before using Huawei HiLens, check the account status, which cannot be in
arrears or frozen.
● Purchase a HiLens Kit device and register it with the Huawei HiLens
platform.
● Apply for the HiLens Studio OBT permission. For details, see Applying for the
HiLens Studio OBT.
4. Fill in the skill information. In this example, you can directly use the default
parameters. For details about the parameters, see Filling In Basic
Information.
5. Confirm the information and click OK.
The HiLens Studio page is displayed, with the created mask detection skill
project.
3. Open the project source code folder src. In the editing area on the HiLens
Studio page, you can directly edit and add breakpoints to the logic code of
the skill based on your service requirements, and then click the icon on the
left for debugging.
For details about the compilation, cleanup, debugging, and execution
operations, see the readme.txt file.
4. Choose Debug > Start Debugging on the top menu bar of the HiLens Studio
page to execute the code.
After the code is successfully executed, you can view the skill output video in
the Video Output area on the right.
If you use a wireless network, ensure that the router is powered on to ensure network
connectivity.
If you use a wired network, ensure that the device is connected to a router using a
network cable to ensure network connectivity.
2. Log in to the Huawei HiLens management console and choose Skill
Development > HiLens Studio from the left navigation pane to start HiLens
Studio.
The following describes how to release a skill to the skill market on the Huawei
HiLens platform.
1. Click on the right of the HiLens Studio page and click Release in the
HiLens Widget area.
The Release Skill dialog box is displayed.
2. In the Release Skill dialog box, set required parameters and click OK.
– Publish: Select HiLens.
– Billing Policy: Billing policy for releasing the skill to the skill market. The
value can be Free or Charged.
– Specifications Limitation: Maximum number of concurrent channels.
Use the default value.
After the release application is submitted, it will be sent to the Huawei HiLens
background for review. The review will be completed within three working
days.
After the skill is approved, it will be displayed on the Skill Market > Skill
Market page of the Huawei HiLens console.
This chapter describes how to purchase a skill oriented to HiSilicon Hi35xx series
chips to demonstrate the entire process from product creation to skill use. Free
test skills are available in the skill market for trial use, but we do not guarantee
their commercial precision.
Preparations
Register a HUAWEI CLOUD account and perform real-name authentication. Before
using Huawei HiLens, check the account status, which cannot be in arrears or
frozen.
Parameter Description
3. Confirm the product information and click OK. After the product is created,
the Product Management page is automatically displayed.
4. Select the new product and click Download License in the Operation column
to download the license file.
5. The license contains the identity information of the product, which is used for
registration verification with the skill SDK.
This example describes how to purchase the free Human Figure and Vehicle
Detection skill, which is used to develop devices running HiSilicon Hi35xx series
chips.
1. Log in to the Huawei HiLens management console, choose Skill Market >
Skill Market in the left navigation pane to enter the corresponding page.
2. Search for the Human Figure and Vehicle Detection skill in the search box
and click the skill card to enter the skill details page.
3. Click Buy Now. The page for purchasing skills is displayed.
4. Specify parameter Copies. You can retain its default value. The Specifications
is default to Channel(s), indicating that a license can be installed on one
device to use one channel of video.
6. After the purchase is successful, the skill is stored on the Skill Market > My
Skills page.
5 Change History
2020-07-22 Added:
Developing Skills Using HiLens Studio (Developers)
2019-05-16 Added:
● Quick start guide for common users
● Quick start guide for manufacturers