Professional Documents
Culture Documents
User Guide
Issue 01
Date 2021-07-14
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: support@huawei.com
Contents
4 Creating a Workspace.......................................................................................................... 23
5 Subscribing to Huawei HiLens Products.......................................................................... 26
5.1 Subscribing to HiLens Studio............................................................................................................................................ 26
5.2 Subscribing to HiLens Device-Edge-Cloud Synergy Platform Service................................................................. 30
5.3 Purchasing HiLens Kit Devices.......................................................................................................................................... 32
5.4 Purchasing Skills.................................................................................................................................................................... 33
5.5 Subscribing to Huawei RPA WeAutomate....................................................................................................................34
5.5.1 Purchasing and Using Huawei RPA WeAutomate..................................................................................................34
5.5.2 Trying the Standalone Edition of Huawei RPA WeAutomate............................................................................ 36
5.6 Managing Orders.................................................................................................................................................................. 38
7 Managing Devices................................................................................................................. 84
7.1 Device Management Overview........................................................................................................................................ 84
7.2 Activating Devices (Purchasing HiLens Device-Edge-Cloud Synergy Platform Service).............................. 85
7.3 Managing Skills on Devices............................................................................................................................................... 88
7.3.1 Skill Management Overview......................................................................................................................................... 88
7.3.2 Installing a Skill.................................................................................................................................................................. 90
7.3.3 Adding Runtime Configurations................................................................................................................................... 91
7.3.4 Subscribing to Skill Messages....................................................................................................................................... 92
7.3.5 Configuring Hard Example Settings............................................................................................................................ 95
7.3.6 Starting or Stopping Skills.............................................................................................................................................. 97
7.3.7 Uninstalling Skills.............................................................................................................................................................. 97
7.4 Viewing Device Information.............................................................................................................................................. 98
7.5 Viewing Device Logs............................................................................................................................................................ 98
7.6 Upgrading HiLens_Device_Agent Firmware.............................................................................................................. 100
7.7 Configuring Cameras......................................................................................................................................................... 101
7.8 Deregistering Devices........................................................................................................................................................ 103
7.9 Viewing Device Alarms..................................................................................................................................................... 104
7.10 Performing One-Click Health Check......................................................................................................................... 106
12 Managing Data..................................................................................................................248
13 Managing Products...........................................................................................................251
13.1 Overview............................................................................................................................................................................. 251
13.2 Managing Products......................................................................................................................................................... 251
13.3 Purchasing Skills (for Devices Running Hi35xx Series Chips)........................................................................... 253
13.4 Distributing Skills............................................................................................................................................................. 253
13.5 Adding or Deleting Skills............................................................................................................................................... 254
NOTE
For details about how to use HiLens Kit devices, see the HiLens Kit User Guide.
The functions users need vary depending on application scenarios. This section
describes the procedures for using Huawei HiLens based on the three types of
users and their application scenarios. You can quickly understand functions
provided by Huawei HiLens by reading Huawei HiLens Function Overview and
click the links in this table to go to the corresponding sections to learn details.
The procedures for using Huawei HiLens are as follows. Only the main procedures
are listed here. For details about other management operations, see Huawei
HiLens Function Overview.
● Common Users Use Skills
● Developers Develop Skills on the Management Console
● Process for Creating Skills Using Trainable Skill Templates
● Using HiLens Studio to Develop Skills
● Manufacturers Manage Products
Prerequisites
● Before using Huawei HiLens, you need to apply for a HUAWEI CLOUD account
and complete real-name authentication. Through this account, you can use all
HUAWEI CLOUD services and pay only for the services you use. For details,
see Account Registration Process and Real-Name Authentication.
● Huawei HiLens depends on other services. Therefore, you need to obtain the
permissions of related services before using Huawei HiLens, including
ModelArts, Object Storage Service (OBS), and Software Repository for
Container (SWR). For details about the relationships between Huawei HiLens
and other services, see Related Services.
Viewing Skill View the device data and see if Managing Data
Performance the skills have achieved the
expected results.
Viewing Skill View the device data and how the skill Managing Data
Performance has been performing.
Releasing Release the skills to the skill market for Releasing Skills
Skills to the other users to purchase and use.
Skill Market
NOTE
● Using trainable skill templates to create skills means to improve the model precision
through training. The logic code of the skills cannot be modified. If you want to modify
the logic code of a skill, you can develop the skill on the Huawei HiLens console. For
details, see Developing Skills on the Console.
● Developing trainable skills occupies OBS resources and incurs charges. For details about
the OBS pricing, see Product Pricing Details.
● Developing skills using trainable skill templates occupies ModelArts training resources
and incurs charges. For details about the ModelArts pricing, see Product Pricing
Details.
Figure 2-3 shows the process of creating skills based on trainable skill templates.
Table 2-3 Procedure for creating skills using trainable skill templates
Step Description Quick Link
NOTE
This section describes only the operations involved in developing skills in HiLens Studio. For
details about how to create a skill on the console, see Developing Skills on the Console.
Connect devices Connect to the HiLens Kit devices Registering a HiLens Kit
to the cloud. you purchase and register them Device
with the Huawei HiLens platform Registering a Device
to interconnect the devices with Using the Intelligent
the cloud. Edge System
Registering a Device
Using SSH
Develop skills. In HiLens Studio, you can create a Creating a Skill Project
skill project, compile and debug Managing Models
the skill code, and run the skill
(only for HDMI output) and view Compiling/Debugging
the output data. Code Using Real-Time
Video Streams on a
Mobile Phone
Figure 2-5 shows the product management procedure, and Table 2-5 describes
the procedure in detail.
Developing Skills Developers You can create skills on the Huawei HiLens
platform by developing and combining
algorithms, models, and logic code, or by
using preset skill templates. In addition, you
can debug a newly developed skill on a test
device.
Then, you can release the skills that have
been debugged to the skill market for more
users to use. In return, you will get the
appropriate amount of reward.
Managing Data ● Common You can view the video data of devices
users registered with Huawei HiLens to see how
● Developer skills perform.
s
3 Permissions Management
Prerequisites
Before granting permissions to a user group, you need to learn about the Huawei
HiLens permissions that can be added to the user group and select the
permissions based on site requirements. For details, see Permissions
Management. For the system policies of other services, see System Permissions.
Procedure
3.3.1 Introduction
You can use IAM to implement fine-grained permissions management for your
Huawei HiLens resources. If your HUAWEI CLOUD account does not need
individual IAM users, then you may skip this section.
By default, new IAM users do not have permissions assigned. You need to add the
users to one or more groups, and attach permissions policies or roles to these
groups. Users inherit permissions from the groups to which they are added and
can perform specified operations on cloud services based on the permissions.
You can grant users permissions by using roles and policies. Roles: A type of
coarse-grained authorization mechanism provided by IAM that defines permissions
related to user responsibilities. Policies: Policies define API-based permissions for
operations on specific resources under certain conditions, allowing for more fine-
grained, secure access control of cloud resources.
NOTE
If you want to allow or deny the access to an API, fine-grained authorization is a good
choice.
An account has all the permissions required to call all APIs, but IAM users must be
assigned the required permissions. The permissions required for calling an API are
determined by the actions supported by the API. Only users who have been
granted permissions allowing the actions can call the API successfully. For
example, if an IAM user queries ECSs using an API, the user must have been
granted permissions that allow the hilens:servers:list action.
Supported Actions
Huawei HiLens provides system-defined policies that can be directly used in IAM.
You can also create custom policies and use them to supplement system-defined
policies, implementing more refined access control. Operations supported by
policies are specific to APIs. The following are common concepts related to
policies:
● Permission: a statement in a policy that allows or denies certain operations.
● Action: added to a custom policy to control permissions for specific
operations.
● Authorization scope: A custom policy can be applied to IAM projects or
enterprise projects or both. Policies that contain actions supporting both IAM
and enterprise projects can be assigned to user groups and take effect in both
IAM and Enterprise Management. Policies that only contain actions for IAM
projects can be used and only take effect for IAM. For details, see Differences
Between IAM and Enterprise Management.
● API: RESTful APIs that can be called in a custom policy.
Huawei HiLens supports the following actions that can be defined in custom
policies:
● Device Management Permissions
● Skill Development Permissions
● Skill Market Permissions
● Product Management Permissions
4 Creating a Workspace
Resource Isolation
Each HUAWEI CLOUD account or IAM account has a default workspace, which
can be used to view all resources created by the current account on Huawei
HiLens.
The table below lists resources that are isolated between different workspaces.
Skill Development > HiLens Studio Skill projects created on HiLens Studio,
skills developed on HiLens Studio, and
devices on which the skills are installed
The table below lists resources that are shared by all workspaces.
Skill Development > Skill Templates Templates built in Huawei HiLens and
templates added to My Favorites by
the current account
Creating a Workspace
1. Log in to the Huawei HiLens console. In the navigation pane, choose
Workspaces.
The Workspaces page is displayed.
2. Click Create Workspace in the upper right corner.
The Create Workspaces page is displayed.
3. Enter the workspace name and description, and click Create Now in the
lower right corner. The Workspaces page is displayed. You can view the newly
created workspace.
The workspace description cannot contain the following characters: #~^$
%&*<>{}[]\/|
Modifying a Workspace
Currently, you can change the name and description of a custom workspace, but
cannot change the name of the default workspace.
Deleting a Workspace
You can delete a workspace that is no longer used to release resources. The
default workspace cannot be deleted.
Follow-up Operations
After creating different workspaces, you can select a workspace from the drop-
down list under Current Workspace in the left navigation pane and use Huawei
HiLens. For details about how to use Huawei HiLens, see Procedures for Using
Huawei HiLens.
For details about how these products and services are priced, see "Billing" in the
Service Overview.
Edition Description
The difference between the basic edition and professional edition of HiLens Studio
lies in whether dedicated inference resources are used exclusively. For details
about the basic edition, see Table 5-1. For details about the professional edition,
see Table 5-2.
Parameter Description
Parameter Description
4. Confirm the order information and click Submit in the lower right corner.
5. On the displayed payment page, select a payment method, check the order
details, and click Pay. Enter your payment password to purchase HiLens
Studio.
Follow-up Operations
After purchasing HiLens Studio, you can develop skills in it. For details, see
Development Environment HiLens Studio.
Application Scenario
● If you register more than one device, you need to purchase the HiLens device-
edge-cloud synergy platform service. After you activate the devices on the
Device Management page, you can install basic skills you developed in the
console, in HiLens Studio, or using trainable skill templates onto these devices.
● To install skills purchased from the skill marketplace, there is no need to
purchase the HiLens device-edge-cloud synergy platform service or activate
any permission.
● If you have only registered device, there is also no need to purchase the
HiLens device-edge-cloud synergy platform service or activate any permission.
Subscription
1. Log in to the Huawei HiLens console. In the navigation pane, choose
Subscription > Order Management.
The My Skills page is displayed.
2. Click Subscription in the upper right corner.
The Buy Huawei HiLens Product page is displayed.
3. Fill in the information based on Table 5-6, read Notes and Notice, and click
Buy Now.
Required Duration The duration for using the service can be 1 Year, 3
Years, or 5 Years. The counting starts when your
device is first activated.
For example, if you purchased the HiLens device-
edge-cloud synergy platform service for three years
on January 1, 2019, and activated a device on June
1, 2019 for the first time, then you can install self-
developed basic skills on this device from June 1,
2019 to June 1, 2022.
4. Confirm the order and click Submit in the lower right corner.
5. On the displayed payment page, select a payment method, check the order
details, and click Pay. Enter your payment password to purchase the service.
Renewing an Order
You can renew the HiLens device-edge-cloud synergy platform service upon
expiration. The device is automatically activated upon renewal.
NOTE
4. On the Renew page, drag the slider to select the Renewal Duration, which
can be 1 year, 3 years, or 5 years.
If you want to set a unified renewal date (Actual renewal duration = Currently
selected duration + Duration from the current expiration data to the new
expiration data):
a. Click on the right. In the displayed Set Renewal Date dialog box,
select the renewal date from the Change To drop-down list, and click
Yes.
b. Select Renew on the standard renewal date, the X day of every
month.
5. Click Pay in the lower right corner. On the displayed payment page, select a
payment method, check the order details, and click Pay. Enter your payment
password to renew the order.
After the payment is made, a message is displayed indicating that the order is
paid successfully. Return to the Huawei HiLens console, choose Device
Management > Devices, and check whether the status of the activated
device is updated about 30 seconds later.
Follow-up Operations
After purchasing the HiLens device-edge-cloud synergy platform service, you must
activate your devices before you can install basic skills you developed onto these
devices. For details, see Activating Devices (Purchasing HiLens Device-Edge-
Cloud Synergy Platform Service).
Huawei HiLens allows you to manage HiLens Kit devices, develop and install skills
on the cloud. You can purchase HiLens Kit devices one-off on the HUAWEI CLOUD
official website.
Procedure
1. Log in to the Huawei HiLens console. In the navigation pane, choose
Subscription > Order Management.
The My Skills page is displayed.
2. Click Subscription in the upper right corner.
The Buy Huawei HiLens Product page is displayed.
3. Enter the required information based on Table 5-7, and click Buy Now in the
lower right corner.
The page for purchasing HiLens Kit is displayed.
Parameter Description
Billing Mode HiLens Kit supports the One-off billing mode only.
Follow-up Operations
After purchasing a HiLens Kit device, register it with Huawei HiLens for device
management. For details, see Registering HiLens Kit Devices.
Parameter Description
Log in to the Huawei HiLens console. In the navigation pane, choose Subscription
> Tools/Plugins. Click the Huawei RPA WeAutomate card. The Basic
Information page of Huawei RPA WeAutomate is displayed by default. On this
page, you can view a detailed description of Huawei RPA WeAutomate.
Before using Huawei RPA WeAutomate, you need to purchase and activate it by
performing the following steps:
Parameter Description
Parameter Description
4. Click Submit.
After you submit the application, an approval process will take place.
5. Choose Subscription > Tools/Plugins and click Huawei RPA WeAutomate
card. Then, click Try Online on the page displayed.
The WeAutomate management center is displayed.
6. Click Menu in the upper left corner of the page and choose RPA Orchestrator
> License.
The License page is displayed.
7. Click Global License to go to the Global License tab page, and then copy the
ESN number.
2. Click Menu in the upper left corner of the page and choose RPA Orchestrator
> License.
The License page is displayed.
3. Click Global License to go to the Global License tab page, and click Upload.
The dialog box for uploading a file is displayed.
4. Select the .zip package that contains the license file obtained in Step 3:
Activating the Tool, and click Upload (or Open).
5. After the upload is complete, click Import.
Then, you can use Huawei RPA WeAutomate.
Log in to the Huawei HiLens console and choose Subscription > Tools/Plugins.
Click the Huawei RPA WeAutomate card. The Basic Information page of Huawei
RPA WeAutomate is displayed by default. On this page, you can view a detailed
description of Huawei RPA WeAutomate.
Before purchasing Huawei RPA WeAutomate, you can try the standalone edition.
– WeAutomate Studio
i. Download WeAutomate Studio to your local PC. The default name is
HUAWEI_AntRobot_Studio_2.13.0-SPC2.exe.
ii. Double-click the .exe file you downloaded and install it as prompted.
iii. Run the application after the installation is complete. Click on the
left and click License.
iv. Copy the ESN.
– WeAutomate Assistant
i. Download WeAutomate Assistant to your local PC. The default name
is HUAWEI_AntRobot_Assistant_2.13.0.zip.
ii. Decompress the .zip file you downloaded. Open
HUAWEI_AntRobot_Assistant_2.13.0>ADC_1.5.RC30_Component_P
KG_IPA-Agent. Double-click install.bat, and install it as prompted.
iii. Run the application after the installation is complete. Click in the
upper right corner and select Settings.
The General tab page is displayed by default.
iv. Copy the Machine ESN.
The license file can be downloaded again on the Huawei HiLens console.
1. Choose Subscription > Tools/Plugins, click Huawei RPA WeAutomate card, and
click Activate Trial.
2. In the dialog box, click License download, select the license file to be downloaded,
and click Download.
a. Run the RPA tool. Click in the upper right corner, and select Settings.
The General tab page is displayed by default.
b. Click Import on the right of License Status.
When a message is displayed indicating a successful import, the tool is
successfully activated.
Follow-up Operations
After the activation succeeds, you can try the standalone edition of Huawei RPA
WeAutomate.
Skill Orders
Log in to the Huawei HiLens console. In the navigation pane, choose Subscription
> Order Management. The Skill Orders tab page is displayed by default. The
Skill Orders tab page displays all the skills you purchased and the order details.
On the Skill Orders tab page, you can perform the following operations:
● Install a skill
Click Install in the Operation column to install the skill on a registered
device. For detailed operations, see Installing a Skill.
● Expand the capacity of an order
a. Click Expand Capacity in the Purchase Details column to increase the
number of copies.
b. On the Purchase Skill page, specify Quantity, select I agree to the
Privacy Statement and the Declaration, and click Buy Now in the lower
right corner.
c. On the Confirm page, confirm the order details and click Submit in the
lower right corner.
d. On the Pay page, select a payment method and click Pay in the lower
right corner.
Capacity expansion is supported only for orders that use the yearly/monthly
billing mode.
● Distribute a skill
Click Operation in the Operation column to expand the drop-down list, and
click Distribute to distribute the skill to products. For detailed operations, see
Distributing Skills.
● Download a skill
Click Operation in the Operation column to expand the drop-down list, and
click Download. The browser automatically downloads the SDK package of
the selected skill.
AI Gallery
In the navigation pane of the Huawei HiLens console, choose Subscription >
Order Management, and click the AI Gallery tab.
This page displays the HiLens skills you have subscribed to from the ModelArts AI
Gallery plus the subscription details.
Custom Skills
Log in to the Huawei HiLens console. In the navigation pane, choose Skill Market
> My Skills. Then click the Custom Skills tab.
The Custom Skills page displays the skills that you have customized. For details
about operations related to skill customization, see Customizing Skills. On the
Custom Skills page, you can perform the following operations to manage
customization requirements:
● Buy
You can buy licenses for a customized skill.
● Delete
You can click Delete to delete unnecessary customization requirements.
NOTE
Platform Service
Log in to the Huawei HiLens console. In the navigation pane, choose Subscription
> Order Management. Then click the Platform Service tab.
The Platform Service page displays the HiLens device-edge-cloud synergy
platform service that you have subscribed to. For details about how to subscribe to
this service, see Subscribing to HiLens Device-Edge-Cloud Synergy Platform
Service. On the Platform Service page, you can perform the following operations
to manage the platform service:
● Transfer activation quota
You can transfer the device activation quota enabled by the HiLens device-
edge-cloud synergy platform service purchased using your current account to
another account in the same region. For details, see Transferring Activation
Quota. After the activation quota is transferred, you can activate devices
using the account to which the activation quota is transferred.
● Renew
If the platform service you purchased has expired, you can renew it to obtain
a new order number and activate devices again. For details, see Renewing an
Order.
Remaining How many devices can be activated using the quota you are
Quota transferring. The device activation quota of the current order
cannot exceed the total activatable devices.
5. Click OK.
The device activation quota is transferred.
After the activation quota is transferred, you can activate devices using the
account to which the activation quota is transferred. For details, see Activating
Devices Using Other Subscriber's Order Number .
Asce Hi 1 2- 2 1 2 1 1 Lin Su
nd 35 megapix ux pp
310 59 el, 720p or
(8 A te
GB (4 d
RAM G
) B)
NOTE
● The HiLens Kit product is now available on the HUAWEI CLOUD website, you can
directly purchase it. If you want to purchase many HiLens Kit devices at once, contact
the local Huawei office or call the HUAWEI CLOUD pre-sales hotline.
● HiLens Kit devices support system file configuration. You can connect a PC to a HiLens
Kit device and use SSH to log in to the HiLens Kit device. HiLens Kit device systems
cannot be ported to other operating systems.
● Each HiLens Kit device has a built-in camera. It can also connect to external IP cameras
of 4K or a lower resolution. For details, see Configuring Cameras. For a development
example, see Developing a Safety Helmet Detection Skill (with an External IPC).
Reference documents
When you obtain the documents for the first time, register an account and your
product with the enterprise technical support website (Support-E website). Enter
the product serial number (SN) of the HiLens Kit device to complete product
registration. For details, see Enhance My Account Privilege.
The SN is at the bottom of the HiLens Kit device and is a string of 20 characters,
for example, 21023XXXXXXXXXXXXXXX.
After the product registration application is submitted, if the system displays a
message indicating that the product registration is successful, go to the next step.
If the system displays a message indicating that the product is to be reviewed,
wait until the product is successfully reviewed and go to the next step. The
product will be reviewed within one workday.
● HiLens Kit User Guide
This document describes the appearance, logical structure, and specifications
of the Atlas 200 HiLens Kit and provides guidance for users to install, connect,
power on, power off, and configure the Atlas 200 HiLens Kit.
● Atlas 200 HiLens Kit Intelligent Edge System User Guide
This document describes the system architecture of the Huawei HiLens
intelligent edge system and guide users through managing and maintaining
the Atlas 200 HiLens Kit using this system.
Methods for registering a HiLens Kit device
To enable HiLens Kit devices with AI skills, you need to register them with the
Huawei HiLens console so that you can manage the devices and their skills on the
console.
This section describes how to log in to a HiLens Kit device, register it with the
cloud-based Huawei HiLens console, and manage it on the console.
● Currently, only HiLens Kit devices released by Huawei can be registered.
● You can install and use only skills "oriented to Ascend 310 chips" on HiLens
Kit devices.
You can register HiLens Kit devices using the HiLens Kit intelligent edge system or
SSH. The following are the processes and operation guides:
● Registering a Device Using the Intelligent Edge System
● Registering a Device Using SSH
Common operations
Initialization Configuration: The HiLens Kit device comes pre-installed with the
Euler operating system. You do not need to install one. You can log in to the
Huawei HiLens intelligent edge system using a browser to perform initialization
configuration.
Changing the Initial User Name and Password: For security purposes, change
the initial password upon the first login and periodically change the password.
Configuring a Firewall: To prevent users beyond the allowed IP address range
from accessing the HiLens Kit intelligent edge system, you can configure a firewall
to prevent the system from being attacked.
Restoring Factory Settings: If the system of the HiLens Kit device is damaged by
mistake and cannot be restored to normal use, you need to restore the factory
settings.
Using an SD Card: When using a HiLens Kit device, insert an SD card to store skill
data.
NOTE
● Before registering a device with IES, you need to upgrade the system firmware to
version 2.2.200.011. Read Upgrading the HiLens Kit System Firmware Version
carefully to evaluate the service continuity risks caused by the upgrade. If you do not
accept the risks caused by the upgrade of the system firmware, use SSH to register the
device.
● Before using the intelligent edge system to register a HiLens Kit device, you need to
disable login protection. After accessing the Account Security Settings page, you can
enable login protection by choosing Account Security Settings > Critical Operations.
If login protection is not enabled for the account, ignore this requirement.
Figure 6-2 shows the procedure for registering your device using the intelligent
edge system. Table 6-2 details every step.
Figure 6-2 Procedure for registering a device using the intelligent edge system
Register the Register the device with the Registering a HiLens Kit
HiLens Kit console and check the device Device
device. status on the console.
Register the Register the device with the Registering a HiLens Kit
HiLens Kit console and check the device Device
device. status on the console.
Prerequisites
● You have at least one HiLens Kit device.
● Your HUAWEI CLOUD account is not in arrears.
● If you use the intelligent edge system to register a device, the system
firmware version must be 2.2.200.011 or later. If your firmware version is
earlier than 2.2.200.011, upgrade it first.
To query the system firmware version, log in to the Huawei HiLens
intelligent edge system webUI, and choose Maintenance > Firmware
Upgrade to view the current version number.
You are advised to upgrade the firmware of new HiLens Kit hardware to
achieve better stability.
If the firmware version is earlier than 2.2.200.011, you can only register it
using SSH. After the registration using SSH is successful, you can upgrade the
system firmware version later. For details about the upgrade methods and
risks, see Upgrading the HiLens Kit System Firmware Version.
● By default, devices registered using the intelligent edge system are registered
to the CN North-Beijing4 region.
If you do not accept the restrictions, select Registering a Device Using SSH.
If you want to register the device to another region, use the SSH tool to
modify the device configuration. For details, see (Optional) Switching the
Device Registration Region to CN North-Beijing1.
1 Power button
2 Power socket
2. Press and hold the power button for 1 to 2 seconds to power on the HiLens
Kit device.
3. Connect one end of the network cable to the management network port of
the device and the other end to an Ethernet port of the PC.
Interconnecting the Network Between the PC and the HiLens Kit Device
Set an IP address and a subnet mask or route for the PC so that the PC can
properly communicate with the device.
1. Click the network icon in the lower right corner of the PC and click
Network & Internet settings.
2. On the Network & Internet settings page, click Change adapter settings to
enter the Network Connections page.
3. After the HiLens Kit device is connected to the PC using a network cable, a
corresponding connection is displayed on the Network Connections page
of the PC. Right-click the connection (generally named Local Area
Connection) and choose Properties from the shortcut menu. The Local Area
Connection Properties dialog box is displayed.
4. Double-click Internet Protocol Version 4 (TCP/IPv4) and select Use the
following IP address. Then, enter an IP address that is in the same network
segment as the device IP address and click the Subnet mask text box to
automatically generate a subnet mask. Click OK.
For details about the initial IP address of the device, see the Default Value of
Initial IP address of the management network port in HiLens Kit User
Guide > Default Credentials.
NOTE
● You can connect to the HiLens Kit device using SSH from your local PC only when
the IP address configured in Local Area Connection Properties > Internet
Protocol Version 4 (TCP/IPv4) > Properties is in the same network segment as
the device IP address. The same network segment means that the first three
octets of the local connection IP address are the same as that of the device IP
address. For example, if the device IP address is 192.168.2.111, the IP address (in
the same network segment as the device IP address) configured in Local Area
Connection Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties
can be 192.168.2.x, where x is an integer from 2 to 255 except 111.
● If the device IP address has been modified, configure the IP address in Local Area
Connection Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties to
an IP address in the same network segment as the new device IP address. For
details about how to modify an IP address, see Configuring the Wired Network.
Follow-up Operations
To register a HiLens Kit device using the intelligent edge system, you need to
upgrade the HiLens Kit system firmware version to 2.2.200.011. For details, see
Upgrading the HiLens Kit System Firmware Version.
Upgrade Risks
Before the upgrade, read the following risks carefully and exercise caution when
performing the upgrade.
● Before upgrading the firmware version of a HiLens Kit device that has been
registered and is in use, contact the contact person to evaluate the risk of the
upgrade on service continuity.
● Upgrading the HiLens Kit system firmware version will reinstall the entire
system directory. As a result, the software installed in the system directory will
be lost. To locate the system directory, run the df -h command to view the
current partition information. The root directory corresponding to /dev/
mmcblk0p2 is the system directory. This directory is the default software
installation directory. During the upgrade, the software installed in it will be
lost. Files in other non-system directories, such as the /dev/mmcblk0p*
directory, are not affected during the upgrade.
Tips: To prevent the system directory from affecting the upgrade, you can
redirect software packages that support redirection installation to the /opt
directory of the HiLens Kit device system to avoid file loss in subsequent
system upgrades. For example, you can run the yum --installroot=/opt
install xxx command to redirect the YUM installation software package XXX.
Software packages that do not support redirection installation, such as RPM
packages involved in YUM and ROS installation, can be deployed only in the
system directory and will be lost after the upgrade.
● After the HiLens Kit system firmware version is upgraded, some of the
original skills may fail to run. Exercise caution when performing this
operation.
Upgrade Advantages
● Devices can be registered using the intelligent edge system. For details about
the registration process, see Registering a Device Using the Intelligent Edge
System.
● The device can be logged in using user admin and keep online for up to one
hour.
After the upgrade, you can run the timeout command as user admin to set
the timeout period. The maximum timeout period is 1 hour. For example, to
set the timeout period to 1 hour, run the timeout 3600 command.
● You must change the default username and password upon the first login to
the intelligent edge system to prevent security risks caused by the use of the
default username and password.
● Hardware and resource monitoring is also available. When the hardware is
abnormal or the resource usage exceeds the alarm threshold, an alarm is
reported.
● Security upgrade is performed on third-party components.
Prerequisites
Use a network cable to connect a HiLens Kit device to a PC. For details, see
Connecting a HiLens Kit Device to a PC.
Upgrade Procedure
If you have registered and used your HiLens Kit devices, carefully read Upgrade
Risks before the upgrade.
Upgrade the system firmware version twice. The operations are as follows:
Do not close the current page or switch to another page during the upload process.
Otherwise, the upload will fail.
8. Click Upgrade. In the confirmation box that is displayed, select After the
update is complete, the system restarts automatically.
If you do not select this option, you need to manually restart the system for
the update to take effect.
9. Click OK.
You can view the update package version and progress on the page.
10. Wait for about 10 minutes. The system displays a message indicating that the
upgrade is successful.
If you perform the upgrade for the first time, log in to Huawei HiLens
intelligent edge system again and repeat step 3 to step 8.
NOTE
To ensure successful device registration, use the same upgrade package when
performing the second upgrade.
If you have performed the upgrade twice, the HiLens Kit firmware has been
upgraded.
Follow-up Operations
● If the source HiLens_Device_Agent firmware version is later than 1.0.7, you
also need to upgrade it after upgrading the HiLens Kit system firmware
version. For details, see Upgrading HiLens_Device_Agent Firmware. (That is,
if the HiLens_Device_Agent firmware version is already the latest, you also
need to update it again.)
● After the HiLens Kit system firmware and HiLens_Device_Agent firmware are
upgraded, you need to synchronize the time zone and time when registering
the device. For details, see Synchronizing the Time Zone and Time.
Prerequisites
Perform the following operations in sequence:
1. Use a network cable to connect the PC and the device. For details, see
Connecting a HiLens Kit Device to a PC.
2. Upgrade the HiLens Kit system firmware version. For details, see Upgrading
the HiLens Kit System Firmware Version.
Procedure
1. Log in to the Huawei HiLens intelligent edge system using a browser on the
local PC. Enter the address of the Huawei HiLens intelligent edge system in
the address box, and press Enter. The address format is https://Huawei
HiLens intelligent edge system IP address. The default IP address is
192.168.2.111. Press Enter.
NOTE
Follow-up Operations
Network configuration: A HiLens Kit device can be connected to a router in
wireless or wired mode. You can select either of the two networking modes.
The following sections describe how to use the two networking modes.
NOTE
A router cannot be connected to a wired network and a wireless network at the same time.
If you connect the router to a wireless network, the default gateway will be automatically
deleted. If you connect the router to a wired network again, you need to configure the
default gateway. You are advised to connect the router to a wireless network, in case
you forget the device IP address after updating it.
If you select the wired network configuration mode, see Configuring the Wired Network.
Configuration Requirements
To connect to a router through a wireless network, enter the network's
password first.
Currently, HiLens Kit devices support only 2.4 GHz wireless networks with general
encryption types. The name of a wireless network consists of 8 to 63 characters
but cannot contain single or double English quotation marks.
● The 2.4 GHz wireless networks comply with IEEE802.11n, IEEE802.11g, and
IEEE802.11b protocols.
Prerequisites
Perform the following operations in sequence:
1. Use a network cable to connect the PC and the device. For details, see
Connecting a HiLens Kit Device to a PC.
2. Upgrade the HiLens Kit system firmware version. For details, see Upgrading
the HiLens Kit System Firmware Version.
3. Synchronize the time zone and time of the device. For details, see
Synchronizing the Time Zone and Time.
Procedure
1. Log in to the Huawei HiLens intelligent edge system using a browser on the
local PC. Enter the address of the Huawei HiLens intelligent edge system in
the address box, and press Enter. The address format is https://Huawei
HiLens intelligent edge system IP address. The default IP address is
192.168.2.111. Press Enter.
NOTE
8. Click .
The WIFI Connection dialog box is displayed.
9. Enter the Wi-Fi password in the Password text box, as shown in Figure 6-7.
Click OK.
A message is displayed in the upper right corner, indicating that the wireless
network is successfully connected to the router.
NOTE
Follow-up Operations
Register the HiLens Kit device. For details, see Registering a HiLens Kit Device.
NOTE
A router cannot be connected to a wired network and a wireless network at the same time.
If you connect the router to a wireless network, the default gateway will be automatically
deleted. If you connect the router to a wired network again, you need to configure the
default gateway. You are advised to connect the router to a wireless network, in case
you forget the device IP address after updating it.
For details about the wireless network configuration, see Registering a HiLens Kit Device.
Explanation
If a wired network is used to directly connect to a router, you need to modify
the device IP address to ensure that the device IP address and the router IP
address are in the same network segment.
The same network segment means that the first three octets of the device IP
address are the same as that of the router IP address. For example, if the device IP
address is 192.168.2.111, the router IP address can be 192.168.2.x, where x is an
integer from 2 to 255 except 111.
Preparations
Perform the following operations in sequence:
1. Use a network cable to connect the PC and the device. For details, see
Connecting a HiLens Kit Device to a PC.
2. Upgrade the HiLens Kit system firmware version. For details, see Upgrading
the HiLens Kit System Firmware Version.
3. Synchronize the time zone and time of the device. For details, see
Synchronizing the Time Zone and Time.
Procedure
1. Log in to the Huawei HiLens intelligent edge system using a browser on the
local PC. Enter the address of the Huawei HiLens intelligent edge system in
the address box, and press Enter. The address format is https://IP address of
Huawei HiLens intelligent edge system. The default IP address is
192.168.2.111. Press Enter.
NOTE
4. Click Check after Check Network Status to check whether the network is
connected.
5. Change the IP address.
a. Click Modify in the row containing the IP address you want to change.
b. Change the IP Address by referring to Table 6-5. In this example, the
router IP address is 192.168.2.1, as shown in Figure 6-10. After changing
the IP address, click OK.
c. Click Save and restart the system for the IP settings to take effect.
Parameter Description
6. Remove the network cable from the PC, disconnect the device from the PC,
and then connect the device to the router using the network cable.
7. Configure DNS.
a. On the home page of the Huawei HiLens intelligent edge system, choose
Management > Network > Wired Network. Click Add under Configure
DNS Address.
Add the DNS address nameserver 8.8.8.8.
b. Click OK.
c. Click Save and restart the system for the settings to take effect.
Follow-up Operations
Register the HiLens Kit device. For details, see Registering a HiLens Kit Device.
Procedure
1. Log in to the Huawei HiLens intelligent edge system using a browser on the
local PC. Enter the address of the Huawei HiLens intelligent edge system in
the address box, and press Enter. The address format is https://Huawei
HiLens intelligent edge system IP address. The default IP address is
192.168.2.111. Press Enter.
NOTE
4. Select HUAWEI HiLens Cloud Register for Select NMS Mode and enter the
basic information according to Table 6-6.
If the HUAWEI HiLens Cloud Register option is not available, upgrade the
HiLens system firmware version twice. For details, see Upgrading the HiLens
Kit System Firmware Version.
If the device is restored to factory settings, upgrade the HiLens system
firmware version twice. For details, seeUpgrading the HiLens Kit System
Firmware Version.
The username, account name, and device name used for registering a HiLens
Kit device can contain only letters, digits, and underscores (_). The names
cannot start with a digit or contain digits only.
5. Click Save.
A message is displayed in the upper right corner, indicating that the
registration is successful.
NOTE
By default, devices registered using the intelligent edge system are registered to the CN
North-Beijing4 region. You need to switch the console region to CN North-Beijing4 if you
are not in this region.
Preparations
● You have at least one HiLens Kit device.
● Your HUAWEI CLOUD account is not in arrears.
● Ensure that you have obtained the following data:
– IP address of the device to be connected
For details about the initial IP address of the device, see the Default
Value of Initial IP address of the management network port in HiLens
Kit User Guide > Default Credentials.
– Username and password for logging in to the device to be connected
For details about the initial username and password of the device, see the
Default Value of Initial user name and password in HiLens Kit User
Guide > Default Credentials.
If this is not your first login, use the new account name and password.
For details about how to change the password, see Changing the Initial
User Name and Password.
● Ensure that you have downloaded PuTTY.exe. This is third-party software.
Port Description
1 Power button
2 Power socket
Interconnecting the Network Between the PC and the HiLens Kit Device
Set an IP address and a subnet mask or route for the PC so that the PC can
properly communicate with the device.
1. Click the network icon in the lower right corner of the PC and click
Network & Internet settings.
2. On the Network & Internet settings page, click Change adapter settings to
enter the Network Connections page.
3. After the HiLens Kit device is connected to the PC using a network cable, a
corresponding connection is displayed on the Network Connections page
of the PC. Right-click the connection (generally named Local Area
Connection) and choose Properties from the shortcut menu. The Local Area
Connection Properties dialog box is displayed.
4. Double-click Internet Protocol Version 4 and select Use the following IP
address. Then, enter an IP address that is in the same network segment as
the device IP address and click the Subnet mask text box to automatically
generate a subnet mask. Click OK.
For details about the initial IP address of the device, see the Default Value of
Initial IP address of the management network port in HiLens Kit User
Guide > Default Credentials.
NOTE
● You can connect to the HiLens Kit device using SSH from your local PC only when
the IP address configured in Local Area Connection Properties > Internet
Protocol Version 4 Properties is in the same network segment as the device IP
address. The same network segment means that the first three octets of the local
connection IP address are the same as that of the device IP address. For example, if
the device IP address is 192.168.2.111, the IP address (in the same network
segment as the device IP address) configured in Local Area Connection Properties
> Internet Protocol Version 4 Properties can be 192.168.2.x, where x is an integer
from 2 to 255 except 111.
● If the device IP address has been modified, configure the IP address in Local Area
Connection Properties > Internet Protocol Version 4 Properties to an IP address
in the same network segment as the new device IP address. For details about how
to modify an IP address, see Wired Network Configuration (SSH).
Follow-up Operations
Log in to the HiLens Kit device using SSH. For details, see Logging In to a HiLens
Kit Device Using SSH.
Prerequisites
You have connected a HiLens Kit device to a PC. For details, see Connecting a
HiLens Kit Device to a PC.
Procedure
1. Use SSH to remotely connect to the HiLens Kit device.
a. Start PuTTY, click Session, enter the device IP address in the Host Name
(or IP address) text box, and enter the port number in the Port text box.
Assume that the device IP address is 192.168.2.111 and the port number
is 22. Figure 6-14 shows the page.
b. Click Open.
Log in to the device.
2. Use SSH to remotely connect to the device system.
After the admin@192.168.2.111's password prompt, enter the admin
password. For details about the preset password for the first login, see HiLens
Kit User Guide > Default Credentials.
3. Use SSH to remotely log in to the developer CLI.
a. After the IES:/-> prompt, run the develop command.
b. After the Password prompt, enter the root password. For details about
the preset password for the first login, see HiLens Kit User Guide >
Default Credentials.
Follow-up Operations
Network configuration: A HiLens Kit device can be connected to a router in
wireless or wired mode. You can select either of the two networking modes.
The following sections describe how to use the two networking modes.
NOTE
A router cannot be connected to a wired network and a wireless network at the same time.
If you connect the router to a wireless network, the default gateway will be automatically
deleted. If you connect the router to a wired network again, you need to configure the
default gateway. You are advised to connect the router to a wireless network, in case
you forget the device IP address after updating it.
If you select the wired network configuration mode, see Wired Network Configuration
(SSH).
Configuration Requirements
To connect to a router through a wireless network, enter the network's
password first.
Currently, HiLens Kit devices support only 2.4 GHz wireless networks with general
encryption types. The name of a wireless network consists of 8 to 63 characters
but cannot contain single or double English quotation marks.
● The 2.4 GHz wireless networks comply with IEEE802.11n, IEEE802.11g, and
IEEE802.11b protocols.
● The supported wireless network encryption types include WEP, WPA-PSK/
WPA2-PSK, and AES.
● Wireless networks that need to be verified are not supported.
● TKIP encryption is not supported.
● The IP address of the router gateway cannot be set to xxx.xxx.0.xxx, for
example, 192.168.0.1. In addition, the router gateway and the HiLens Kit
device cannot be in the same network segment. For example, if the device IP
address is 192.168.2.111, the IP address of the router gateway cannot be set
to 192.168.2.xxx.
Prerequisites
● Use a network cable to connect the PC and the device. For details, see
Connecting a HiLens Kit Device to a PC.
Procedure
1. Log in to the Huawei HiLens intelligent edge system using a browser on the
local PC. Enter the address of the Huawei HiLens intelligent edge system in
the address box, and press Enter. The address format is https://Huawei
HiLens intelligent edge system IP address. The default IP address is
192.168.2.111. Press Enter.
NOTE
8. Click .
1. Log in to the Huawei HiLens intelligent edge system using a browser on the
local PC. Enter the address of the Huawei HiLens intelligent edge system in
the address box, and press Enter. The address format is https://Huawei
HiLens intelligent edge system IP address. The default IP address is
192.168.2.111. Press Enter.
NOTE
Follow-up Operations
Register the HiLens Kit device. For details, see Registering a HiLens Kit Device.
NOTE
A router cannot be connected to a wired network and a wireless network at the same time.
If you connect the router to a wireless network, the default gateway will be automatically
deleted. If you connect the router to a wired network again, you need to configure the
default gateway. You are advised to connect the router to a wireless network, in case
you forget the device IP address after updating it.
For details about the wireless network configuration, see Wireless Network Configuration
(SSH).
Explanation
If a wired network is used to directly connect to a router, you need to modify
the device IP address to ensure that the device IP address and the router IP
address are in the same network segment.
The same network segment means that the first three octets of the device IP
address are the same as that of the router IP address. For example, if the device IP
address is 192.168.2.111, the router IP address can be 192.168.2.x, where x is an
integer from 2 to 255 except 111.
Prerequisites
● Use a network cable to connect the PC and the device. For details, see
Connecting a HiLens Kit Device to a PC.
Procedure
1. Log in to the Huawei HiLens intelligent edge system using a browser on the
local PC. Enter the address of the Huawei HiLens intelligent edge system in
the address box, and press Enter. The address format is https://Huawei
HiLens intelligent edge system IP address. The default IP address is
192.168.2.111. Press Enter.
NOTE
4. Click Check after Check Network Status to check whether the network is
connected.
5. Change the IP address.
a. Click Modify in the row containing the IP address you want to change.
b. Change IP Address by referring to Table 6-8. In this example, the router
IP address is 192.168.2.1, as shown in Figure 6-20. After changing the IP
address, click OK.
c. Click Save and restart the system for the IP settings to take effect.
Parameter Description
6. Remove the network cable from the PC, disconnect the device from the PC,
and then connect the device to the router using the network cable.
7. After the connection is complete, log in to the device using SSH. Run the
following command to check whether the connection is successful:
ping 8.8.8.8
or
ping www.huaweicloud.com
If the device is connected successfully, the following information is displayed:
Follow-up Operations
Register the HiLens Kit device. For details, see Registering a HiLens Kit Device.
Procedure
1. Run the following command to remotely register the HiLens Kit device with
the Huawei HiLens console using SSH:
hdactl register -uUsername -dAccount name -nDevice name
Press Enter. The Password prompt is displayed.
Username is the IAM username, and Account name is the HUAWEI CLOUD
account name. For detailed concepts, see Basic Concepts of IAM. If no IAM
account is available, the Account name is the same as the Username.
Customize the Device name by yourself.
The username, account name, and device name used for registering a HiLens
Kit device can contain only letters, digits, and underscores (_). The names
cannot start with a digit or contain digits only.
2. Enter the password of the HUAWEI CLOUD account after the Password
prompt and press Enter to complete the registration.
If the IAM user and HUAWEI CLOUD account are different, enter the IAM user
password following the Password prompt.
If an error message indicating that the device cannot be registered, restore
the device to factory settings and register it again.
NOTE
● IAM users are not allowed to register devices with sub-projects. For detailed
concepts, see IAM Basic Concepts.
● After the device is registered, you can log in to the Huawei HiLens console and
choose Device Management > Devices to view the device status. Your device is
offline for a short period of time.
3. Log in to the Huawei HiLens console. In the navigation pane, choose Device
Management > Devices to view the device status, as shown in Figure 6-23.
NOTICE
You are advised not to use a wireless network and a wired network to connect to the
same router at the same time. You are advised to use a wireless network to avoid
forgetting or losing the device IP address after updating it.
Preparations
1. Use a network cable to connect the HiLens Kit device to the local PC.
2. Enter https://XXX.XXX.XXX.XXX in the address box of a browser and press
Enter to open the login page of the HiLens intelligent edge system.
XXX.XXX.XXX.XXX is the default IP address of the device. For details about
the default parameters, see Default Parameters.
3. Enter the username and password. For details about the default parameters,
see Default Parameters.
4. Use the default IP address to log in to the HiLens Kit device using SSH and go
to the CLI with the administrator permission (develop). For details, see
Logging In to a HiLens Kit Device Using SSH.
If the IP address assigned to the internal network of a company or school
needs to be bound to the MAC address of the connected HiLens Kit device, fix
the MAC address of the wired network port (eth0) on the device.
a. Run the ifconfig command on the CLI with the administrator permission
to view the MAC address of the wired network port on the HiLens Kit
device.
As shown in Figure 6-25, the content in the red box is the target MAC
address.
d. Under Configure IP Address, click Add. In the displayed dialog box, enter
the internal IP address information according to Table 6-9 and click OK.
e. Under Configure IP Address, click Save.
f. Configure the DNS address for the internal network. The DNS
configuration method varies depending on whether the HiLens Kit system
firmware has been upgraded.
2) In the dialog box that is displayed, enter the DNS address of the
internal network of a company or school, and click OK.
3) Under Configure DNS Address, click Save.
● Procedure
a. Use the default IP address to log in to the HiLens Kit device through SSH
and go to the CLI with the administrator permission (develop). For
details, see Logging In to a HiLens Kit Device Using SSH.
b. Run the corresponding command on the CLI to add the default routing
entries.
For example, the default gateway corresponding to the IP address
allocated in Step 1: Configuring the Wireless Network is
192.168.137.1.
route add default gw 192.168.137.1
c. Remove the network cable from the PC and disconnect the network
between the PC and HiLens Kit device. Then, use the network cable to
connect the HiLens Kit device to the internal network.
● Network Verification
a. On the PC in the internal network, use the new internal network IP
address (10.78.14.58 in this example) to log in to the HiLens Kit device
through SSH. For details, see Logging In to a HiLens Kit Device Using
SSH.
b. Run the ping command to check whether the wired network (external
network) and wireless network (internal network) are successfully
connected.
If the device is connected successfully, the following information is
displayed:
Configuration Mode
● Configure a hardware firewall.
If a hardware firewall exists, contact O&M personnel to configure it to allow
access to the IP addresses of HiLens Kit devices.
● Configure a software firewall.
If no hardware firewall is deployed, configure a software firewall. For details,
see Configuring a Software Firewall.
If the user_init.sh file does not exist in the /home/data/user directory, create
one.
Procedure
1. Insert an SD card into the port (Micro SD) on the rear panel of the HiLens Kit
device.
2. Log in to the HiLens Kit device using SSH. For details, see Logging In to a
HiLens Kit Device Using SSH.
3. Run the following command to locate the SD card:
ls -al /dev/mmcblk*
The command output is as follows:
dev/mmcblk1
4. Run the following command to save and back up the data stored in the SD
card and format the SD card.
mkfs.ext4 /dev/mmcblk1
Run the command at the EulerOS prompt.
If the SD card has been formatted, skip this step.
5. Run the following command to create the sd path:
mkdir /mnt/sd
The device is mounted to the mount /dev/ mmcblk1/mnt/sd path.
6. Run the df command to query the file system.
Run the following commands to perform a read/write test on the local file
mount /dev/ mmcblk1/mnt/sd:
– Write command: cp test.txt /mnt/sd
– Read command: cp /mnt/sd/test.txt ./
NOTE
Before removing the SD card, run the following command to unmount the partition from
the device:
umount /mnt/sd
This prevents files from being damaged.
7 Managing Devices
Before managing the devices, you need to register devices on the Huawei HiLens
console. For detailed descriptions and connection guides, see Registering HiLens
Kit Devices.
● Viewing Device Data: In the navigation pane of the Huawei HiLens console,
click Data Management. On the Data Management page that is displayed,
you can select a device to download and view all of its data.
NOTE
For the first registered device, you do not need to purchase the HiLens Device-Edge-Cloud
Synergy Platform Service and activate this device. You can directly install the basic skills you
developed onto this device.
Activation Method
● 30-day free trial
If you have more than one device, the platform service is free of charge
permanently for the first registered device, and other devices can enjoy a 30-
day free trial. For details, see 30-Day Free Trial Activation.
● Activation using the order number
To activate your device, purchase the HiLens Device-Edge-Cloud Synergy
Platform Service and activate the device within the validity period of the
order. The activation lasts as long as the validity period of your order. Read
Notes on Order-based Activation carefully before activating your device.
If the order is purchased by yourself, activate your device using the order
number of your own account. For details, see Activating Devices Using Your
Own Order Number.
If the order is purchased by another subscriber, activate your device using the
order number of that subscriber's account. To do so, use that subscriber's
account to transfer the device activation quota to your account and then use
your account to activate the device. For details, see Activating Devices Using
Other Subscriber's Order Number .
● Activation using a test device
Only HiLens Kit devices support this option. For details, see Activating
Devices Using a Test Device. For test devices that are not purchased from
the HUAWEI CLOUD official website, you can choose to activate them using
their SNs.
● After being activated for the first time, your devices can be activated as many
times as you want until the platform service in yearly/monthly billing mode
expires. That is, no matter how many times you activate your devices, you can
install the skills you developed onto the devices within the period starting
from the first time your devices are activated and ending at the time the
platform service in year/monthly billing mode expires.
● Your devices must be activated before the platform service order expires.
Otherwise, the activation fails.
● If you cannot install the skills you developed onto devices because the
platform service expires, purchase a new HiLens Device-Edge-Cloud Synergy
Platform Service and activate your devices again.
1. Log in to the Huawei HiLens console. In the navigation pane on the left,
choose Device Management > Devices.
The Devices page is displayed.
2. Select a device whose Basic skill permission is Unactivated and click
Activate Permission.
The Activate Permission dialog box is displayed.
3. Select Activate using order No and choose an order number that will be
used to activate devices.
Select Purchase by me from the drop-down list next to Order ID and select
the order number of the platform service you purchased from the second
drop-down list.
If you have not purchased the platform service yet, click Buy to go to the Buy
Huawei HiLens Product page, and buy the service. For details, see
Subscribing to HiLens Device-Edge-Cloud Synergy Platform Service.
4. Click Next and confirm the order ID and order information.
5. Click OK to activate the basic skill permission of the device.
Parameter Description
Remaining How many devices can be activated using the quota you
Quota are transferring. The device activation quota of the
current order cannot exceed the total activatable
devices.
e. Click OK.
The device activation quota is transferred.
Skill
A skill is an AI application ready to run on a camera or another computing device.
It consists of a model and logic code. The logic code is the skill's framework, and is
responsible for controlling skill running, including data reading, model import,
model inference, and result output. The model is trained by AI algorithms based
on big data and is responsible for inference in key scenarios during skill running.
The Skill Market of Huawei HiLens provides extensive skills for users.
● The application scenarios for Huawei HiLens skills include smart campus,
smart home, smart vehicle-mounted terminals, smart shopping mall, and
more.
● Skills are classified into two types by device: skills for Ascend chips and skills
for HiSilicon Hi35xx series chips.
Supported Operations
Go to the Skill Management page: In the navigation pane of the Huawei HiLens
console, choose Device Management > Devices. In the device list, select the
device to be managed and click the device card. The device details page displays
the Skill Management tab by default.
On the Skill Management tab, you can view the information about skills installed
on the device. If the skill is in container image format, you can click on the left
of the skill name to view the status of each instance of the skill.
● Installing a Skill
● Adding Runtime Configurations
● Starting or Stopping Skills
● Uninstalling Skills
● View skill run logs on the device: On the Skill Management tab page,
choose More > View Log in the row of the target skill to go to the Data
Management page and view the real-time or historical running data of the
skill. For details, see Managing Data.
● Configure a subscription message for a skill: On the Skill Management
tab, choose More > View Skill Message to switch to the Skill Messages tab,
where you can directly configure a subscription object for the skill. For details,
see Subscribing to Skill Messages.
Prerequisites
● At least one device exists on the Device Management > Devices page and
the device status is Online.
● At least one skill exists on the Subscription > Order Management > Skill
Orders or AI Gallery page. If you have not purchased any skills, no
information is displayed on this page. You are advised to purchase skills or
subscribe to them by referring to Subscribing to Skills from the ModelArts
AI Gallery.
● If the skills in Subscription > Order Management > Skill Orders do not
meet your requirements, you can go to Subscription > All Skills to purchase
other required skills or go to Subscription > Order Management > Custom
Skills to customize skills.
Procedure
1. In the navigation pane of the Huawei HiLens console, choose Device
Management > Devices. In the device list, click the target device card.
The Skill Management page is displayed by default.
2. On the Skill Management page, click Add Skill in the upper right corner to
switch to the Skill Market > My Skills page.
3. By default, the Orders from Skill Market page is displayed, showing the list
of skills purchased by your account from the HiLens Skill Market.
You can also click Orders from AI Gallery to switch to the Orders from AI
Gallery page to display the list of skills purchased by your account from the
ModelArts AI Gallery.
4. Select the skill to be installed.
– On the My Orders page: Click Install in the Operation column of the
skill list.
– On the AI Gallery page: Click on the left of the target skill name to
view the skill information, and click Install.
NOTE
Only skills (with sufficient quota) oriented to Ascend 310 chips can be selected.
5. In the skill installation dialog box that is displayed, select the device to which
the skill is to be installed. In the Specifications column, specify the number of
channels used by the skill on each device. If you want to install the skill on
multiple devices, select Yes in the Batch Installation column as required.
Then, click Install.
6. Perform the following operations to check whether the skill is installed
properly. If the skill status is Installation succeeded, the skill is successfully
installed on each device.
a. In the navigation pane of the Huawei HiLens console, choose Device
Management > Devices. The device list page is displayed.
b. Click Skill Management of the registered device. The status of the
installed skill is Stopped. Click Start in the Operation column and click
OK to start the skill on the device.
The skill status changes to Running after a short period of time,
indicating that the skill is successfully running on the device.
Table 7-2 describes the skill statuses.
Status Description
Context
● You can add and modify configurations of skills whose developers have
configured the runtime configuration function for them.
● Runtime Configurations are classified into Global and Video configurations.
– The Global configuration takes effect for the entire device.
– The Video configuration indicates a camera-channel configuration,
requiring the skill to process multi-channel videos. For example, if a facial
image library is configured for each camera, the facial recognition skill
can perform recognition on multiple channels of videos.
Precautions
● When subscribing to a message for the first time, restart the skill so that the
subscription object can receive the message. For details about how to restart
the skill, see Starting or Stopping Skills.
● Message subscription incurs certain fees. For details, see Simple Message
Notification Pricing Details.
Prerequisites
● The skill supports the message notification function. This function is
configured during skill development. For details about the guide and APIs, see
the Huawei HiLens Developer Guide.
If the message notification function is not configured for a skill, common
users cannot receive notification messages from the skill.
● The skill has been deployed on a device and is in the Running state. Users
cannot receive notification messages from a skill not in the Running state.
Parameter Description
Receiving Mode Message receiving mode. The options are Email and
Text message.
You can click Set to Default to set the default recipient for quick subscription.
(You can click on the right of the subscription list in step 4 to perform
quick subscription.)
9. Click to select the recipient who subscribes to the skill, and click OK.
The subscription list is displayed. You can view the added recipient.
To add multiple message recipients, go to step 7.
10. After the message recipient is added, the recipient will receive a text message
or email. Click Confirm Subscription.
The subscription is successful if you receive a feedback indicating successful
subscription.
After the recipient confirms the subscription, you need to restart the skill, so
that the recipient will receive an email or SMS notification when the skill has
any output.
In the subscription list, the recipient icon changes from gray to orange .
NOTE
Prerequisites
● The skill supports hard example upload.
● You have created a hard example dataset on ModelArts to train the hard
example filtering model. For details, see Creating a Dataset.
Parameter Description
Starting a Skill
On the Skill Management tab page, select a skill whose status is Stopped, and
click Start in the Operation column. Skill startup involves a command delivery
process, so you need to wait for a period of time before you can view the skill
status update on the page.
Stopping a Skill
On the Skill Management tab page, select a skill whose status is Running, and
click Stop in the Operation column. Skill stop involves a command delivery
process, so you need to wait for a period of time before you can view the skill
status update on the page.
Uninstalling a Skill
1. On the Skill Management tab page, select the target skill and click Uninstall
in the Operation column.
2. In the dialog box that is displayed, confirm the information about the skill to
be uninstalled and click OK.
Click the name on a device card to enter the device details page, as shown in
Figure 7-10. You can view the device details and manage the device on this page,
including managing skills and cameras, and upgrading firmware.
Query Methods
● Viewing Logs Using SSH: Connect to the HiLens Kit device using SSH and
view the logs.
● Logging In to the Intelligent Edge System to Download Logs: After the
firmware is upgraded to version 1.0.4 or later, you can also log in to Huawei
HiLens intelligent edge system to download and view logs.
● Managing Data: On the Data Management (Beta) page of the Huawei
HiLens console, you can download and view skill running logs of each device.
To ensure that your device can run newer and better skills, you are advised to upgrade
its firmware in a timely manner. For details about how to upgrade the firmware, see
Upgrading HiLens_Device_Agent Firmware.
3. Click Maintenance.
4. Click Log Collection to go to the Log Collection page.
5. Click Collect. In the dialog box that is displayed, click OK to download and
decompress the log package to your PC. The default package name is
Euler_Atlas500Log_2.2.0.031_2019***.
The device agent log path is as follows:
Euler_Atlas500Log_2.2.0.031_2019***\log\NPU\home\log\alog\hilens\hda
\hdad.log
The skill log path is as follows:
Euler_Atlas500Log_2.2.0.031_2019***\log\NPU\home\log\alog\hilens\hda
\developer.skill name.skill ID.log
For firmware 1.1.2 or later, the skill log path is as follows:
Euler_Atlas500Log_2.2.0.031_2019***\log\NPU\home\log\alog\hilens\skills
\developer.skill name.skill ID\developer.skill name.skill ID.log
Upgrading Firmware
1. In the navigation pane, choose Device Management > Devices.
2. Click Batch Upgrade Firmware in the upper right corner. The Batch Upgrade
Firmware dialog box is displayed.
3. Select the firmware name and target firmware version. The devices that can
be upgraded are displayed, including the device name, device type, firmware
name, and firmware version.
NOTE
Adding a Camera
1. In the navigation pane of the Huawei HiLens console, choose Device
Management > Devices. In the device list, click the name of the target device
to enter the device details page.
2. Click Camera Management to switch to the Camera Management tab on
the device details page.
3. Click Add Camera in the upper right corner. In the displayed dialog box, enter
related information.
4. After entering and confirming the information, click OK to add the camera
and deliver the configurations to the device. A row of camera information is
added on the Camera Management page.
Deleting a Camera
You can delete unnecessary cameras that have been added to a device.
NOTE
Deleted cameras cannot be recovered. Exercise caution when performing this operation.
The device can be registered with Huawei HiLens under a new account only after
it is deregistered from the current account.
Prerequisites
If the device to be deregistered has been activated, unbind the device before you
deregister it.
Deregistering a Device
1. In the navigation pane of the Huawei HiLens console, choose Device
Management > Devices. The device list page is displayed.
2. Select a device and choose Operation > Deregister.
You can also click the device name on a device card to go to the device details
page and click Deregister Device in the upper right corner.
3. In the dialog box that is displayed, confirm the information about the device
to be deregistered, and click OK.
After a device is deregistered, the skills deployed on it are uninstalled at the
same time.
NOTE
Before deregistering a device, you need to uninstall its skills purchased from the skill
market. If you deregister a device without uninstalling the skills installed in the skill
market, the skills and logs will be deleted when the device is registered again.
NOTE
● The alarm function is available only on devices whose firmware version is 1.0.7 or later.
The alarm notification function is available only on devices whose firmware version is
1.0.0 or later. For details about how to upgrade the firmware, see Upgrading
HiLens_Device_Agent Firmware.
● The alarm information of a device can be synchronized to the Huawei HiLens console
only when the device is Online.
Alarm Severity
● Minor
A minor alarm has a minor impact on the system, but you need to take
corrective actions as soon as possible to prevent a more severe alarm.
● Major
A major alarm has a major impact on the system. It affects the normal
operating of the system or may cause service interruption.
● Critical
A critical alarm may power off the device, and even interrupt system services.
You must take corrective actions immediately.
You can view the alarm information in the device's alarm list and handle the
alarm on the device. The alarm information includes the alarm Title, Severity,
Content, Impaction, Suggestion, Generated At, and Operation. Device alarms
have three severity levels: Minor, Major, and Critical. For details, see Alarm
Severity.
After you handle the alarm on the device, the alarm will be automatically cleared
if no exception is detected on the device.
7. After the message recipient is added, the recipient will receive a text message
or email. Click Confirm Subscription.
The service alarm subscription is successful if you receive a feedback
indicating successful subscription.
Deleting an Alarm
You can delete alarms based on actual conditions.
Prerequisites
The cloud-side one-click health check function is available for devices whose
firmware version is 1.1.0 or later. For details about how to upgrade the firmware,
see Upgrading HiLens_Device_Agent Firmware.
This section describes how to use empty templates and basic skill templates to
develop skills on the Huawei HiLens console.
Skills that run on HiSilicon Hi35xx series chips have high requirements on chip
memory and performance. You need to optimize the skill models. If you want to
develop skills of this type, contact Huawei HiLens platform personnel for support.
NOTE
Developing skills on the Huawei HiLens console may occupy OBS resources and incur fees.
For details about the OBS pricing, see Product Pricing Details.
For details about the skill creation process, see Figure 8-1.
● Using basic skill templates: Ensure that there are available basic skill
templates on the platform. You can also use trainable templates to develop
skills. For details, see Process for Creating Skills Using Trainable Skill
Templates.
● Using empty templates: To develop a skill using an empty template, you
need to develop its model and logic code. If your model format does not meet
our requirements, the Huawei HiLens platform will convert the model format
during model import.
Related Operations
On the Huawei HiLens platform, you can not only develop skills, but also manage
your developed skills. The detailed operations are as follows.
Editing Skills After a skill is created, you can edit and modify the skill,
including its basic information, content, messages, and
runtime configurations.
Installing and After a skill is created, you can deploy it to devices, view
Debugging Skills the skill videos to check its effects, and debug it
repeatedly.
Releasing Skills After a skill is debugged and verified, you can release it
to the skill market and share it with all or some users.
Deleting Skills You can delete skills that are no longer used to release
resources.
can be directly used, including the logic code and algorithm model. You only need
to enter basic information about the skill.
Prerequisites
● Ensure that the HUAWEI CLOUD account is not in arrears. Developing skills
on the Huawei HiLens console may occupy OBS resources and incur fees. For
details about the OBS pricing, see Product Pricing Details.
● You have searched and obtained the skill template that meets your service
response requirements on the Skill Templates page. For details, see
Obtaining Skill Templates.
2. Selecting a Template
1. Click Select Template for Skill Templates. The Select Skill Template dialog
box is displayed.
After the skill is created, the Skill Development > Skills page is displayed, where
the skill is displayed in the Not Released status. You can release the skill to the
skill market.
After the skill is released, its status becomes Reviewing. Huawei HiLens personnel
will complete the review within three working days. After the skill release is
approved, the status changes Released.
Context
● Developing skills on the Huawei HiLens console may occupy OBS resources
and incur fees. For details about the OBS pricing, see Product Pricing Details.
● The algorithm model must be in .om format and meet the requirements of
Huawei HiLens. For details, see Developing Models.
● Logic code can be handled (stored) in either of the following ways: Online
Compilation and Upload From OBS.
– If your code logic is simple, you are advised to compile the code online.
– If your code structure is complex, you are advised to develop the code in
a local integrated development environment (IDE) and upload it in .zip
or .tar.gz format from OBS. For details about how to use OBS to upload
files, see Object Storage Service Getting Started. Uploading files to OBS
is charged. For details about the OBS pricing, see Product Pricing
Details.
NOTE
● Before uploading a file, ensure that the OBS bucket is in the same region as
Huawei HiLens.
● If you upload code from OBS, compress all code files before uploading them.
The uploaded files must be in .zip or tar.gz format, and the main file must be
in the level-1 directory. As shown in the following example, the entry code
(main.py) is in the level-1 directory. Other code needs to be designed as
required. You can pack the model and code together to upload them.
● The file (for example, main.py) where the entry code is located is configured
through the Function Execution Entry parameter, which will be described
later.
The following is a code directory example:
skill/
|---main.py #Main file. The file name is the same as the value of parameter Code
Configuration of the new skill.
|---depends/ #Optional, used to store the model file.
|---workspace/ #Workspace, used to store data generated by the skill.
|---data/ # Used to store runtime configurations.
● If the skill is in the container image format, upload the image to SWR. For
details, see Uploading an Image Through a Docker Client.
Prerequisites
● Ensure that the HUAWEI CLOUD account is not in arrears. Developing skills
on the Huawei HiLens console may occupy OBS resources and incur fees. For
details about the OBS pricing, see Product Pricing Details.
● The model used for creating a skill has been imported to Huawei HiLens.
● If you select Upload From OBS, upload the logic code to your OBS bucket in
advance.
Parameter Description
Name Name of a skill. The name is also used as the root directory
name when the skill is delivered to a device.
The name is a string of 3 to 60 characters that can contain
only letters, digits, hyphens (-), and underscores (_). It must
start with a letter and end with a letter or digit.
NOTE
Skills in the skill market cannot share the same name. If you want
to release a skill to the skill market, use a globally unique name to
name the skill.
Parameter Description
Skill Version Skill version. The version number is in the format of A.A.A,
where A is a natural number consisting of a maximum of
three digits, for example, 1.0.0.
If A contains more than one digit, it cannot start with 0.
For example, 01.0.0 is not allowed.
Chip Chip supported by the skill. For skills running on HiLens Kit
devices, select the Ascend 310 chip.
Skill Code Value Used for skill verification to prevent fake skills. The value
must be the same as that on the initialization interface in
the code. For details about the usage, see Initializing the
HiLens Framework in the Huawei HiLens Developer Guide.
Skill Format Format of the skill. The value can be Skill package or
Container image.
Function Execution The startup of a skill uses the code execution file as the
Entry entry, which is similar to the main function of the C
language. The main file must be in the level-1 directory.
● For skills of the Skill package format, the main file
must be in the root directory of the skill package.
For example, a Python skill file must end with .py.
● For skills of the Container image format, if
ENTTRYPOINT is configured in dockerfile, the
description can be left blank. Otherwise, the path of
the execution file in the image must be entered.
The file name contains a maximum of 1,024 characters.
Only letters, digits, and underscores (_) are allowed.
Special characters #~^ are not allowed.
Parameter Description
You can also click Preview JSON to view the runtime configuration's format.
Developers can obtain the skill configurations in JSON format through the
get_skill_config interface provided by the HiLens Framework and read the field
values to use the user configurations.
Parameter Description
Parameter Description
You can click Add Hard Example to add a hard example filtering model. You can
also click Delete in the Operation column to delete a model.
When creating a skill, you can set the API for uploading hard examples. Users set
the model parameter values and datasets for hard example filtering as required
after a skill is installed on a device and then run the skill. For details about how to
configure hard example settings, see Configuring Hard Example Settings.
NOTE
Before configuring elastic skill parameters, you need to develop a model and import it to
ModelArts. The model must be in Normal state and its Deployment Type is Real-Time
Services.
Parameter Description
After the skill is created, the Skill Development > Skills page is displayed, where
the skill is displayed in the Not Released status. You can release the skill to the
skill market.
● On the All tab page, click the icon on a skill template card.
After you add a skill template to favorites, it will be displayed on the My Favorites
page. Click the icon on the card again or click the Remove from Favorites
button in the upper right corner of the skill details page to remove the template
from your favorites.
Prerequisites
Currently, the HiLens Kit AI chip supports only .om models, which can be
converted from TensorFlow or Caffe models. However, .om models do not support
all operators of the TensorFlow and Caffe models. Therefore, you need to use
operators supported by .om models during TensorFlow/Caffe model development.
In this case, the TensorFlow and Caffe models can be converted into .om models.
For details about the TensorFlow and Caffe operator boundaries supported by .om
models, see Caffe Operator Boundaries and TensorFlow Operator Boundaries.
NOTE
.om models are not fully compatible with the built-in Keras APIs of TensorFlow.
.om models do not support Caffe2.
After a model is developed or trained using ModelArts, it is stored in the model list
of ModelArts. For details, see the ModelArts User Guide. Currently, Huawei
HiLens supports only the algorithm models developed using TensorFlow and Caffe
engines. Therefore, you are advised to select a correct engine type and model
storage format when using ModelArts for development.
Follow-up Operations
After models are developed, you need to import them into the Huawei HiLens
console. Then, use the model import/conversion function of Huawei HiLens to
convert models developed using TensorFlow and Caffe engines to the .om format
supported by Ascend 310 chips. For details, see Importing (Converting) Models.
Model Requirements
The models to be imported can be in .om, .pb, or .caffemodel format. Only
models in .om format can run on HiLens Kit devices. If you import a model in .pb
or .caffemodel format, the Huawei HiLens platform automatically converts it into
the .om format.
Not all models can be successfully converted. Before importing and converting a
model, check whether it uses the TensorFlow and Caffe operator boundaries
supported by .om models. For details, see Caffe Operator Boundaries and
TensorFlow Operator Boundaries.
Prerequisites
You can train a model in ModelArts or locally.
● Importing a ModelArts model file
Before importing a ModelArts model file, train your algorithm model in
ModelArts. For details about how to train a model, see the ModelArts
Documentation.
NOTE
Paramete Description
r
Paramete Description
r
Input Tensor Shape Specifies the shape of the input data of the model.
The input data is in the format of NHWC, for
example, input_name:1,224,224,3.
If you select a non-om model for Model Source and
the conversion template is TF-FrozenGraph-To-
Ascend-HiLens or TF-SavedModel-To-Ascend-
HiLens, you must specify the input tensor shape.
input_name must be the node name in the network
model before model conversion. The name is
mandatory when the model has dynamic shape
input. For example, in input_name1:? ,h,w,c, the
question mark (?) indicates the batch size, that is,
the number of images processed at a time. It is used
to convert the original model with a dynamic shape
into an offline model with a fixed shape.
Use commas to separate multiple inputs.
Parameter Description
After the model is imported, the Models page is displayed. You can view the
imported model in the list.
Reconverting a Model
If the imported model is not in the .om format and is in Conversion failed status,
you can modify the model parameters and convert it again.
You can view the model status on the Models page of the Huawei HiLens console.
1. Log in to the Huawei HiLens console. In the navigation pane, choose Skill
Development > Models. The Models page is displayed.
2. Click Details in the Operation column of a model. The Model Details page is
displayed.
You can view the Basic Information and Log Information of the model.
For the model that needs to be converted, you can enter keywords in the
upper right corner of the Log Information area to quickly locate key
information in a log. You can also join the forum to discuss and resolve
problems.
3. On the Basic Information tab page, click to modify the Type, Advanced
Options, Import From, Export To, and Description parameters. After the
modification is complete, click to save the modification. Table 8-8 describes
related parameters.
4. After modifying the model parameters, click Reconvert in the upper right
corner to convert the model again.
Deleting a Model
You can delete imported (converted) models based on service requirements.
Models in the Converting state cannot be deleted.
1. Log in to the Huawei HiLens console. In the navigation pane, choose Skill
Development > Models. The Models page is displayed.
2. Locate a model and click Delete in the Operation column to delete it. You
can also click Details in the Operation column and click Delete Model in the
upper right corner of the model details page to delete the model.
specifications. Huawei HiLens has the following requirements on the model input
directory:
saved_model format
|
|---saved_model.pb Model network file, mandatory. Only one model network file can exist in
the input path. The model must be in frozen_graph or saved_model format.
|---variables Fixed subdirectory name, including the model weight deviation, mandatory
|---variables.index Mandatory
|---variables.data-00000-of-00001 Mandatory
|---insert_op_conf.cfg Insertion operator configuration file, optional. Only one insertion operator
configuration file can exist in the input path.
|---plugin Custom operator directory, optional The input directory can contain only one
plugin folder. Only custom operators developed based on Tensor Engine (TE) are supported.
NOTE
● You need to fill in the code execution file during skill development.
● Firmware 1.1.2 or later supports configuring Python dependencies for skills. During skill
development, you can configure Python dependencies for a skill as required. For details,
see "How Do I Configure Python Dependencies for a Skill".
#!/usr/bin/python3
# skillframework 1.0.0 python demo
def main():
hilens.init("hello") # Initialize the skill.
model = hilens.Model(hilens.get_model_dir() +
"faceDetection.om") # Construct the model manager.
disp = hilens.Display(hilens.HDMI) # Construct the display.
cap = hilens.VideoCapture() # Construct the camera.
proc = hilens.Preprocessor() # Construct the preprocessor.
for i in range(10):
frame = cap.read() # Read a frame of image.
rframe = proc.resize(frame, 480, 480, 1) # Zoom in/out
inputs = [rframe.flatten()] # Construct the model input.
outputs = model.infer(inputs) # Inference
hilens.Info("outputs len: %d" % len(outputs)) # Print the output size.
for o in outputs:
hilens.Info("output shape: " + str(o.shape))
# post process is ignored
disp.show(frame) # Output the image to the display.
if __name__ == "__main__":
main()
Prerequisites
● A HiLens Kit device has been registered with Huawei HiLens and is Online.
For details about device management, see Device Management Overview.
● A skill has been developed and created on Huawei HiLens.
● The HiLens Device-Edge-Cloud Synergy Platform Service has been purchased
and the device has been activated before installing basic skills you developed
onto the device. For details, see Subscribing to HiLens Device-Edge-Cloud
Synergy Platform Service and Activating Devices (Purchasing HiLens
Device-Edge-Cloud Synergy Platform Service).
Installing a Skill
1. Log in to the Huawei HiLens console. In the navigation pane on the left,
choose Skill Development > Skills.
The Basic Skills tab page is displayed.
2. Select the skill to be installed and click Install in the Operation column.
3. In the dialog box that is displayed, select the devices to which the skill is
installed and click OK.
If the information similar to the following is displayed, the skill is installed
successfully.
4. After the installation is successful, you can go to the Data Management page
to view the skill effect.
Prerequisites
● A skill has been developed, installed, and debugged, and the debugging
result meets service requirements.
Context
● A released skill will be reviewed within three working days. After being
approved, it is displayed in the list of Skill Market of Huawei HiLens or on
the My Publishings tab page of AI Gallery of the ModelArts console.
● The name of the skill to be released cannot be the same as that of any other
skill in the skill market or the ModelArts AI Gallery.
Billing Policy Billing policy for releasing the skill to the skill
market. The value can be Free or Charged.
Parameter Description
Deleted skills cannot be recovered. Exercise caution when performing this operation.
NOTE
Currently, HiLens Studio supports the development and debugging of Python 3.7 and C++
skills.
Functions
Figure 9-1 shows the HiLens Studio GUI. For details about the functions, see
Figure 9-1 and Table 9-1.
Click to debug the skill code on the current tab page. For details,
see Performing Breakpoint Debugging on the Code.
2 Code editing area (code editor), where you can directly edit the
code of a project.
3
Click to switch to this tab page, where you can release a skill,
install a skill, and start a skill.
NOTE
This section describes only the operations involved in developing skills in HiLens Studio. For
details about how to create a skill on the console, see Developing Skills on the Console.
Connect devices Connect to the HiLens Kit devices Registering a HiLens Kit
to the cloud. you purchase and register them Device
with the Huawei HiLens platform Registering a Device
to interconnect the devices with Using the Intelligent
the cloud. Edge System
Registering a Device
Using SSH
Develop skills. In HiLens Studio, you can create a Creating a Skill Project
skill project, compile and debug Managing Models
the skill code, and run the skill
(only for HDMI output) and view Compiling/Debugging
the output data. Code Using Real-Time
Video Streams on a
Mobile Phone
Edition Description
The difference between the basic edition and professional edition of HiLens Studio
lies in whether dedicated inference resources are used exclusively. For details
about the basic edition, see Table 9-3. For details about the professional edition,
see Table 9-4.
Prerequisites
1. Register a HUAWEI CLOUD account and complete real-name authentication.
For details, see Account Registration Process and Real-Name
Authentication.
2. HiLens Studio is in the OBT phase. The latest version includes the basic
edition and professional edition. You will be charged for the functions or
resources you use based on the selected edition. For details, see Edition
Description. Therefore, to ensure that all functions of HiLens Studio work
properly, you are advised to ensure that your account balance is sufficient.
2. Click and read the OBT Trial Use Agreement. Select I have read and agree
to the OBT Trial Use Agreement. Click Buy Basic Edition or Buy
Professional Edition as required.
Access HiLens Studio of the latest version.
For details about the differences between HiLens Studio Basic Edition and
HiLens Studio Professional Edition, see Edition Description.
Prerequisites
● Ensure that the HUAWEI CLOUD account is not in arrears. Developing skills
on the Huawei HiLens console may occupy OBS resources and incur fees. For
details about the OBS pricing, see Product Pricing Details.
● You have applied for the HiLens Studio OBT and the application has been
approved. For details, see Applying for HiLens Studio OBT.
Subscribing to a Version
1. Log in to the Huawei HiLens console. In the navigation pane, choose Skill
Development > HiLens Studio.
The HiLens Studio page is displayed.
2. Click the account name in the upper right corner and select Subscription
Center from the drop-down list.
3. In the dialog box that is displayed, select the target HiLens Studio version and
click OK.
For details about the basic and professional editions of HiLens Studio, see
Edition Description.
NOTE
This operation will permanently delete your data stored in HiLens Studio and the data
cannot be recovered. Exercise caution when performing this operation.
1. Log in to the Huawei HiLens console. In the navigation pane, choose Skill
Development > HiLens Studio.
The HiLens Studio page is displayed.
2. Click the account name in the upper right corner and select Subscription
Center from the drop-down list.
3. In the dialog box that is displayed, select Unsubscribe and click OK.
Prerequisites
● Ensure that the HUAWEI CLOUD account is not in arrears. Developing skills
on the Huawei HiLens console may occupy OBS resources and incur fees. For
details about the OBS pricing, see Product Pricing Details.
● You have applied for the HiLens Studio OBT and the application has been
approved. For details, see Applying for HiLens Studio OBT.
● The algorithm model used for creating a skill has been imported to Huawei
HiLens.
NOTE
The skills purchased in the skill market cannot be opened in HiLens Studio. You can select a
skill template in HiLens Studio to create a skill project. For details, see Creating a Skill
Project.
Name Name of the skill. The name is also used as the root
directory name when the skill is delivered to a device.
The skill name cannot be the same as the name of the
selected template.
The name is a string of 3 to 48 characters that can contain
only letters, digits, hyphens (-), and underscores (_). It must
start with a letter, and end with a letter or digit.
NOTE
Skills in the skill market cannot share the same name. If you want
to release a skill to the skill market, use a globally unique name to
name the skill.
Skill Version Skill version. The version number is in the format of A.A.A,
where A is a natural number consisting of a maximum of
three digits, for example, 1.0.0.
If A contains more than one digit, it cannot start with 0.
For example, 01.0.0 is not allowed.
Chip Chip supported by the skill. For skills running on HiLens Kit
devices, select the Ascend 310 chip.
Skill Code Value Used for skill verification to prevent fake skills. The value
must be the same as that on the initialization interface in
the code. For details about the usage, see Initializing the
HiLens Framework in the Huawei HiLens Developer Guide.
Parameter Description
NOTE
● After confirming the information, you must access the HiLens Studio page to view the
created skill project. Otherwise, an empty project will be created, and the skill project
file cannot be opened on the HiLens Studio page.
● If the HiLens Studio page cannot be opened, check whether the browser is configured to
block pop-up windows. If the browser is configured to block pop-up windows, add the
HiLens Studio website to the address whitelist of the browser.
Prerequisites
Currently, the HiLens Kit AI chip supports only .om models, which can be
converted from TensorFlow or Caffe models. However, .om models do not support
all operators of the TensorFlow and Caffe models. Therefore, you need to use
operators supported by .om models during TensorFlow/Caffe model development.
In this case, the TensorFlow and Caffe models can be converted into .om models.
For details about the TensorFlow and Caffe operator boundaries supported by .om
models, see Caffe Operator Boundaries and TensorFlow Operator Boundaries.
NOTE
.om models are not fully compatible with the built-in Keras APIs of TensorFlow.
.om models do not support Caffe2.
After a model is developed or trained using ModelArts, it is stored in the model list
of ModelArts. For details, see the ModelArts User Guide. Currently, Huawei
HiLens supports only the algorithm models developed using TensorFlow and Caffe
engines. Therefore, you are advised to select a correct engine type and model
storage format when using ModelArts for development.
Follow-up Operations
After developing models, you need to import them to HiLens Studio either from a
local path or an OBS bucket. For details, see Importing/Converting a Locally
Developed Model.
This section describes how to import locally developed models to HiLens Studio
and how to convert non-om models in HiLens Studio.
Model Requirements
The models to be imported can be in .om, .pb, or .caffemodel format. Only .om
models can run on HiLens Kit devices. .pb and .caffemodel models must be
converted to .om after they are imported.
Not all models can be successfully converted. Before importing and converting a
model, check whether it uses the TensorFlow and Caffe operator boundaries
supported by models in .om format. For details, see Caffe Operator Boundaries
and TensorFlow Operator Boundaries.
Prerequisites
A model has been developed on your local PC. For a locally developed Caffe
model, uploaded files include .caffemodel, .prototxt, and the configuration
file .cfg. For a TensorFlow model, uploaded files include TensorFlow model file .pb
and configuration file .cfg.
Importing/Converting a Model
For a locally developed model, you need to import it to HiLens Studio first. For a
non-om model, you also need to convert it in HiLens Studio.
Figure 9-9 shows the process of importing and converting a model. Table 9-7
provides the operation guide.
– The folder name cannot start or end with a period (.) or slash (/).
– The absolute path of the folder can contain a maximum of 1,023
characters.
– The folder name cannot contain two or more adjacent slashes (/).
● Importing a Model to HiLens Studio
a. On the HiLens Studio page, click and click folder model in the file
directory.
b. Select the folder to which the model is imported.
c. Choose File > Import File(s) from OBS.
The Import File(s) from OBS dialog box is displayed.
d. Select the OBS bucket for storing the model from the Bucket drop-down
list, and select the model path.
e. Click Import.
The model file is imported to HiLens Studio.
NOTE
In addition to model files, you can choose File > Import Files from OBS on the HiLens
Studio page to import other files from OBS based on service requirements.
● Dragging a Model to HiLens Studio
a. On the HiLens Studio page, choose View > OBS.
The OBS bucket and folder list are displayed on the right of the HiLens
Studio page.
b. Select the OBS bucket for storing the model from the Bucket drop-down
list, and drag the model file to the model folder of the skill project on the
left to quickly import the model file from OBS.
NOTE
In addition to model files, you can also quickly import other files from OBS by
dragging them.
Model Path Path of the model file to be converted in the skill project
folder. Generally, models are imported to the model folder.
Advanced Advanced options. You can set the values when the model
Options conversion type is set to TF-FrozenGraph-To-Ascend-
HiLens, including tensor shape and output node. For
details, see Table 9-9.
Input Tensor Shape Input Tensor Shape. If you select a model (non-OM
model) whose format needs to be converted for
Model Source and the conversion type is TF-
FrozenGraph-To-Ascend-HiLens or TF-SavedModel-
To-Ascend-HiLens, you must enter the tensor shape.
Input Tensor Shape: Enter the shape of the input
data of the model. The input data format is NHWC,
for example, input_name:1,224,224,3. This
parameter is mandatory. input_name must be the
node name in the network model before model
conversion. This parameter is mandatory when the
model has dynamic shape input. For example, in
input_name1:? ,h,w,c, the question mark (?)
indicates the batch size, that is, the number of
images processed at a time. It is used to convert the
original model with a dynamic shape into an offline
model with a fixed shape.
Use commas to separate multiple inputs.
Parameter Description
Prerequisites
You have trained models on ModelArts. For details, see ModelArts
Documentation. Huawei HiLens can convert only the following built-in algorithms
of ModelArts:
● yolov3_resnet18 (object detection and locating)
● ResNet_v1_50 (image classification)
NOTE
Model Path Path of the model file to be converted in the skill project
folder. Generally, model files are imported to the
save_model folder.
Advanced Advanced options. You can set the values when the
Options model conversion type is set to TF-FrozenGraph-To-
Ascend-HiLens, including tensor shape and output node.
For details, see Table 9-11.
Parameter Description
Prerequisites
Open a skill development project in HiLens Studio:
● Creating a Skill Project
● Opening an Existing Skill Project
├── rtmp_source Generated UUID, which is used to form the temporary address of the skill RTMP
stream-pushing by mobile phones.
├── rtmp.txt Generated UUID, which is used to form the temporary address of the skill RTMP stream-
pushing.
├── skill_info.json Metadata of the project.
|── .theia
├── launch.json Project startup configuration.
├── tasks.json Task configuration.
├── setting.json C/C++ configuration. Currently, the cpp compilation path is configured, which is an
important part of C++ code redirection.
|── build
├── CMakeLists.txt File
├── kit_package_install.sh Script used to package skills to be deployed to the HiLens Kit devices. This
script can be customized to specify the skills to be deployed.
├── build.sh Project compilation script.
├── clean.sh Project cleaning script.
├── prebuild.sh Pre-processing script for project startup.
├── postbuild.sh Post-processing script after project execution.
├── output Compilation product.
├── kit Compilation product of HiLens Kit.
├── studio Compilation product of HiLens Studio.
├── lib Third-party library of the C++ project.
├── data Data required by the project.
├── model Model file.
├── src Source code of the project.
├── test Test data.
├── cameras0.mp4 Default video file read by Video Capture in HiLens Studio.
Operation Description
e. On the HiLens Studio mini program page, select the user agreement and
click Scan to scan the QR code in step 4.
The mobile phone debugging page is displayed. Table 9-13 describes the
functions of the mobile phone debugging page. In this case, the mobile
phone is bound to the HiLens Studio account, and you can use the real-
time streams of the mobile phone camera to debug skills online.
Method 2: Click on the left of the HiLens Studio page. In the Debug area
that is displayed, click to debug the code.
If video streams fail to be obtained, click in the upper right corner of the
Video Output area to obtain the video streams again.
Follow-up Operations
After the skill code is edited and debugged, you can install the debugged skill on
the device. For details, see Installing a Skill.
Preparations
The device firmware needs to be upgraded to 1.3.0, so that the model
configuration file used by the new version of HiLens Studio can be compatible
with models of different versions. For details about how to upgrade the firmware,
see Upgrading HiLens_Device_Agent Firmware.
If the device firmware version is earlier than 1.3.0, skills may fail to run properly.
# Header files
include_directories(${CMAKE_SOURCE_DIR}/../src/main/cpp/include)
include_directories(/home/hilens/hilens_studio_sdk/include)
# Framework library
link_directories(/home/hilens/hilens_studio_sdk/lib)
# Source files
file(GLOB_RECURSE SRC_LIST "${CMAKE_SOURCE_DIR}/../src/main/cpp/*.cpp")
set(lib_srcs ${SRC_LIST})
# Debugging settings
if(STUDIO)
# Debug versions
message("Debug settings")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
else()
# Release version settings
message("Release settings")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
target_link_libraries(main ${LIBS})
● prebuild.sh
Modify the following content:
current_workspace=`pwd`
echo "cmake..."
bash build/build.sh
cd $current_workspace
filename=.hilens
if [ ! -d $filename ];then
mkdir $filename
fi
uuid=`cat /proc/sys/kernel/random/uuid`
echo -n $uuid > ./$filename/rtmp.txt
vid_src=`cat ./.hilens/rtmp_source`
current_workspace=`pwd`
● build.sh
Modify the following content:
#!/bin/sh
echo "cmake..."
cd build
# Delete a build.
if [ ! -d output ]; then
mkdir output
fi
cd output
if [ ! -d studio ]; then
mkdir studio
fi
cd studio
● clean.sh
Modify the following content:
cd build/output
export LD_LIBRARY_PATH=/usr/lib64/:$LD_LIBRARY_PATH
# Delete a kit.
BUILD_DIR="kit"
if [ -d ${BUILD_DIR} ];then
echo " clean and remove build..."
cd $BUILD_DIR
make clean
cd ..
rm -rf ${BUILD_DIR}
fi
# Delete a studio.
BUILD_DIR="studio"
if [ -d ${BUILD_DIR} ];then
Modify the model configuration file as follows (see Model Configuration Files for
details about the parameters):
{
"ModelCfgs" :
[
{
"DeviceType" : "D310_C3X",
"ModelPath": "./mask_det_c3x.om",
"FrameWorkInput": "BGR",
"ModelInput": "BGR",
"NetworkWidth": 512,
"NetworkHeight": 288,
"NetworkChannel": 2,
"ScaleMeanEnable": false
},
{
"DeviceType" : "D310_C7X",
"ModelPath": "./mask_det_c7x.om",
"FrameWorkInput": "BGR",
"ModelInput": "BGR",
"NetworkWidth": 512,
"NetworkHeight": 288,
"NetworkChannel": 2,
"ScaleMeanEnable": false
}
]
}
Loading Models
If C++ is used for development, modify the following content:
model = Model::Create(modelConfigPath);// Path passed to the model configuration file during model
creation
Post-Processing Models
If the original model is TensorFlow, the model conversion tool of the C7X version
converts the output of the TensorFlow and Caffe models into the NHWC format,
while the tool of the C3X version converts the TensorFlow model into the om type
with the output format being NCHW. Therefore, you need to perform different
post-processing operations on the HiLens Studio and HiLens Kit models and create
two code branches.
● C++
Use # if STUDIO and # else for differentiation.
# if STUDIO // C7X version
// Perform post-processing on the model output in NHWC format.
#else // C3X version
// Perform post-processing on the model output in NCHW format.
#endif
● Python
Use the following code for differentiation:
import os
if os.getenv("SKILL_NAME"):
# Studio C7X
# Perform post-processing on the model output in NHWC format.
else:
# Kit C3X
# Perform post-processing on the model output in NCHW format.
Upgrading OpenCV
Once OpenCV in HiLens Studio C7X is upgraded from version 3.4.2 to 4.2.0, some
constants defined in OpenCV need to be modified. For details about the
modification, visit the official website of OpenCV 4.2.0.
Prerequisites
At least one device exists on the Device Management > Devices page and the
device status is Online.
Procedure
1. Log in to the Huawei HiLens console. In the navigation pane, choose Skill
Development > HiLens Studio.
The HiLens Studio page is displayed.
2. Click in the upper right corner. In the Skill Installation area on the right,
select the device where the skill is to be installed in the Device Name column,
and click Terminal in the Operation column.
On the Terminal window of the corresponding device, you can run Linux
commands to access the HiLens Kit system to view logs.
During skill editing, if the terminal connected to the HiLens Kit device is
opened for 10 minutes or more and no command is entered, the terminal is
automatically disconnected from the device.
3. View logs. Currently, you can view skill logs only for firmware 1.2.0 or later.
tail -f /home/log/alog/hilens/skills/developer.skill name.skill ID/
developer.skill name.skill ID.log
Prerequisites
Open a skill development project in HiLens Studio:
● Creating a Skill Project
● Opening an Existing Skill Project
Procedure
1. On the HiLens Studio page, choose Terminal > New Terminal. The terminal
window of the skill is displayed.
Alternatively, right-click and choose Open in Terminal from the shortcut
menu to open the terminal window of the skill.
Prerequisites
● Register a HiLens Kit device with the console. For details, see Registering
HiLens Kit Devices.
● You have purchased the HiLens Device-Edge-Cloud Synergy Platform Service
and activated the device. For details, see Subscribing to HiLens Device-Edge-
Cloud Synergy Platform Service and Activating Devices (Purchasing
HiLens Device-Edge-Cloud Synergy Platform Service).
● On the Device Management > Devices page, the HiLens Kit device where the
skill is to be installed is Online. That is, the device is powered on and its
network connection is normal. For details about how to power on the device,
see Power-On Procedure.
NOTE
If you use a wireless network, ensure that the router is enabled 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.
● A skill has been developed and debugged, and the debugging result meets
service requirements.
When customizing skills to be installed on HiLens Kit devices, to avoid
occupying too much storage space and wasting resources, you can customize
the skill packaging script kit_package_install.sh shown in Figure 9-25, so
that only the specified skill project files will be delivered to HiLens Kit devices.
For details about skill project files, see Project File Description.
Procedure
1. Log in to the Huawei HiLens console. In the navigation pane, choose Skill
Development > HiLens Studio to start HiLens Studio.
2. Select the skill to be installed and click the skill name in the skill project list.
NOTE
If you open an empty skill project, that is, the skill project file is not displayed on the
left when you click in the upper left corner, create a skill project again.
Follow-up Operations
After a skill is successfully installed on a device, you can start the skill on the
HiLens Studio page.
Prerequisites
● A skill has been developed and installed on a device. After installing a skill,
you need to start the skill so that it can run on the device.
● You can start skills only for devices in the Online status. You cannot start
skills for devices in the Offline status. For details about how to interconnect
the device side with the cloud side, see Registering HiLens Kit Devices.
● Skills in the Stopped status can be started.
● You can stop Running skills and uninstall (Uninstalling a Skill) Running or
Stopped skills.
Starting a Skill
1. Click on the right of the HiLens Studio page.
2. In the Skill Installation area on the right, select the device where the skill is
to be installed in the Device Name column and click next to the device
name to view skills installed on the device.
3. Move your cursor to the Operation column of the target skill and click Start.
The Start Skill dialog box is displayed.
4. In the Start Skill dialog box, click Yes.
The message Starting the skill is displayed in the lower right corner.
The skill is being started. Skill startup involves a command delivery process, so
you need to wait for a period of time before you can view that Success to
start the skill is displayed in the lower right corner and the skill Status is
updated to Running.
Stopping a Skill
1. Click on the right of the HiLens Studio page.
2. In the Skill Installation area on the right, select the device where the skill is
to be installed in the Device name column and click next to the device
name to view skills installed on the device.
3. Move your cursor to the Operation column of the target skill and click Stop.
The Stop Skill dialog box is displayed.
4. In the Stop Skill dialog box, click Yes.
The message Start to stop skill is displayed in the lower right corner.
The skill is being stopped. Skill stop involves a command delivery process, so
you need to wait for a period of time before you can view that Success to
stop the skill is displayed in the lower right corner and the skill Status is
updated to Stopped.
Prerequisites
● Ensure that the HUAWEI CLOUD account is not in arrears. Releasing skills on
the Huawei HiLens console may occupy OBS resources and incur fees. For
details about the OBS pricing, see Product Pricing Details.
● A skill has been developed and debugged, and the debugging result meets
service requirements.
Context
● Skills released to the Huawei HiLens skill market will be reviewed within three
working days. After being approved, the skills are displayed in the skill market
list.
● The name of the skill to be released cannot be the same as that of any other
skill in the skill market of Huawei HiLens.
Alternatively, click the project name to go to the skill project page, click
on the right of HiLens Studio, and click Release in the HiLens Widget area.
The Release Skill dialog box is displayed.
3. Set the release information according to Table 9-17, and then click OK.
Parameter Description
Billing Policy Billing policy for releasing the skill to the skill
market. The value can be Free or Charged.
Parameter Description
Procedure
1. Log in to the Huawei HiLens console. In the navigation pane, choose Skill
Development > HiLens Studio to start HiLens Studio.
2. Select the skill to be released and click the skill name in the skill project list.
The HiLens Studio page is displayed.
3. Click on the right of the HiLens Studio page.
4. In the Skill Installation area on the right, select the device where the skill is
installed in the Device Name column and click Uninstall in the Operation
column.
The Uninstall Skill dialog box is displayed.
NOTE
● If you open an empty skill project, that is, the skill project file is not displayed on
the left after you click in the upper right corner, create a skill project again.
● If the HiLens Studio page cannot be opened, check whether the browser is
configured to block pop-up windows. If the browser is configured to block pop-up
windows, add the HiLens Studio website to the address whitelist of the browser.
● Installing a Skill
● Releasing a Skill
● Viewing the Attributes of a Skill
On the Getting Started page of HiLens Studio, you can click Attributes in the
Operation column of a skill project to go to the basic information page of the
skill and view and edit its basic information. For details, see Filling In Basic
Information.
● Deleting a Skill Project
On the Getting Started page of HiLens Studio, you can click Delete in the
Operation column of a skill project in the skill project list and click Yes in the
displayed Delete Project dialog box to delete a skill.
NOTE
● Using trainable skill templates to create skills means to improve the model precision
through training. The logic code of the skills cannot be modified. If you want to modify
the logic code of a skill, you can develop the skill on the Huawei HiLens console. For
details, see Developing Skills on the Console.
● Developing trainable skills occupies OBS resources and incurs charges. For details about
the OBS pricing, see Product Pricing Details.
● Developing skills using trainable skill templates occupies ModelArts training resources
and incurs charges. For details about the ModelArts pricing, see Product Pricing
Details.
Figure 10-2 shows the process of creating skills based on trainable skill templates.
Table 10-1 Procedure for creating skills using trainable skill templates
Step Description Quick Link
NOTE
Using trainable skill templates to create skills means to improve the model precision
through training. The logic code of the skills cannot be modified. If you want to modify the
logic code of skills, you can use basic templates to create skills. For details, see Developing
Skills on the Console.
Prerequisites
Ensure that the HUAWEI CLOUD account is not in arrears. When developing skills
on the Huawei HiLens console, you may need to use OBS resources from HUAWEI
CLOUD, which may incur fees. For details about the OBS pricing, see OBS Pricing
Details. Developing skills using trainable skill templates may occupy ModelArts
training resources and incur fees. For details about the ModelArts pricing, see
Product Pricing Details.
Procedure
1. In the left navigation pane of the Huawei HiLens console, choose Skill
Development > Skill Templates.
The All tab page is displayed by default.
2. Click the Trainable Templates (Beta) tab.
3. Click Create Skill on the desired skill template card to create a skill.
4. If you use trainable skill templates for the first time, you need to authorize
ModelArts.
Carefully read the ModelArts service statement, select I have read and agree
to the ModelArts Service Statement, and click Agree.
If it is not your first time to use trainable skill templates, skip this step and
proceed with the next step.
5. In the Create Skill dialog box, enter the skill name, skill owner, and skill
description, select the industry, and read and agree to the OBT Trial Use
Agreement.
6. Confirm the information and click OK.
Develop the skill on the page that is displayed. For details, see Safety Helmet
Detection Skill.
You can also perform the following operations to access the page for
developing skills:
a. Log in to the Huawei HiLens console. In the navigation pane on the left,
choose Skill Development > Skills.
b. Click the Trainable Skills tab.
c. Locate the target skill and click View in the Operation column. The page
for developing skills is displayed.
Requirements on Datasets
● The name of files in a dataset cannot contain Chinese characters, plus signs
(+), spaces, or tabs.
● Ensure that no damaged image exists. The supported image formats include
JPG, JPEG, BMP, and PNG.
● To ensure the prediction accuracy of models, the training samples must be
similar to the actual application scenarios.
● To ensure the generalization capability of models, datasets should cover
images of all possible labels.
● Images of unlabeled data must be stored in one directory, as shown in the
following example:
├─dataset-import-example
│ IMG_20180919_114732.jpg
│ IMG_20180919_114745.jpg
│ IMG_20180919_114945.jpg
– If data is imported from an OBS path, you must have the permission to
read the OBS path.
– Images in JPG, JPEG, PNG, and BMP formats are supported.
● Labeled objects and their labeling files (in one-to-one relationship with the
labeled objects) must be in the same directory. For example, if the file name
of a labeled object is IMG_20180919_114745.jpg, that of its labeling file
must be IMG_20180919_114745.xml.
The labeling files must be in PASCAL VOC format. For details about the
format, see Table 10-3.
Example:
├─dataset-import-example
│ IMG_20180919_114732.jpg
│ IMG_20180919_114732.xml
│ IMG_20180919_114745.jpg
│ IMG_20180919_114745.xml
│ IMG_20180919_114945.jpg
│ IMG_20180919_114945.xml
A labeling file example is as follows:
– Images in JPG, JPEG, PNG, and BMP formats are supported. The size of a
single image cannot exceed 5 MB, and the total size of all images
uploaded in one attempt cannot exceed 8 MB.
NOTE
● When creating an OBS bucket, ensure that your OBS bucket and ModelArts Pro are
in the same region.
● You are advised to use OBS based on your service requirements and habits.
● If your data volume is small (less than 100 MB) or the number of data files is
small (less than 100), you are advised to upload data using the console. You
do not need to download tools or perform unnecessary configurations when
uploading data using the console, which is more convenient and efficient
when you upload a small amount of data.
● If your data volume is large or the number of data files is large, you are
advised to upload the files using OBS Browser+ or obsutil. OBS Browser+ is a
graphical tool that provides complete functions for managing your buckets
and objects in OBS. You are advised to use this tool to create buckets or
upload objects. obsutil is a command line tool for accessing and managing
OBS resources. If you are familiar with the command line interface (CLI),
obsutil is recommended as a good choice for batch processing and automated
tasks.
● If you need to use APIs or SDKs to upload data, or you are accustomed to
using APIs and SDKs, you are advised to use OBS APIs or SDKs to create
buckets and upload objects.
The preceding describes only the common usage methods and tools of OBS. For
details about more OBS tools, see the Object Storage Service Tools Guide.
Prerequisites
● You have created a skill using the trainable safety helmet detection skill
template on the Huawei HiLens console. For details, see Creating a Skill
Using a Trainable Skill Template.
● You have uploaded required data to OBS. For details, see Preparing Data.
After creating training datasets, select the training dataset required for application
development.
Labeling Data
Labeled data is required during model training. For uploaded datasets, you can
add or modify labels. Each label should have at least five data records.
● Viewing labeling examples: Click Labeling Example on the right of Create
Dataset to view the labeling example.
● Accessing the labeling page: Click Label in the Operation column of the
dataset. On the Dashboard page that is displayed, click Label in the upper
right corner. On the displayed page, manually label data. For details, see
Labeling Data > Object Detection.
and the vertical axis indicates the number of valid samples corresponding to the
label.
Follow-up Operations
On the Application Development > Select Data page, select a training dataset,
label the data that is not labeled, and click Next to go to step Train Model. For
details, see Training a Model.
Prerequisites
● You have created an OBS bucket and folder for storing data. The OBS bucket
and ModelArts Pro are in the same region. For details, see Creating a Bucket.
● You have created a skill based on the safety helmet detection skill template
on the Huawei HiLens console and selected a dataset. For details, see
Selecting Data.
Training a Model
Choose Application Development > Train Model and specify parameters.
● Export To
OBS path for storing the output model and data after model training. Click
the text box, select the OBS bucket and folder, and click OK.
● Pre-trained Model
Select the pre-trained safety helmet detection model saved_model.pb.
Confirm the information and click Train.
Model training takes time. After training is complete, the training details are
displayed in the lower part of the Application Development > Train Model page.
Some common metrics, such as precision, recall, and F1 score, help you effectively
evaluate and obtain a satisfactory model.
Prerequisites
You have created a skill based on the safety helmet detection skill template on the
Huawei HiLens console and trained the model. For details, see Training a Model.
Evaluating a Model
You can use the test data to evaluate the model. You can view the evaluation
result on the Application Development > Evaluate Model page.
● Evaluate Model
The model version, number of labels and test sets of the trained model are
displayed. Click Download to download the evaluation result to the local PC.
● Parameter Comparison
The left pane displays the precision, recall, and F1 score of each label. When
you select a label, the parameter comparison bar charts of the label data
evaluated by the preset model and incremental model are displayed on the
right.
● Detailed evaluation
You can filter the label and confidence range in the upper right corner to view
detailed test data.
Follow-up Operations
After the model evaluation, if the model needs to be further optimized based on
service requirements, click Previous to return to the model training step. For
details, see Training a Model.
Prerequisites
● You have created a skill based on the safety helmet detection skill template
on the Huawei HiLens console and evaluated the model. For details, see
Evaluating a Model.
● Ensure that the account is not in arrears. Resources are consumed during
application deployment.
● To install the skill on a device, you need to register a HiLens Kit device with
Huawei HiLens in advance. For details, see Registering HiLens Kit.
NOTE
●
Skills automatically created on the Huawei HiLens console can be installed only on
HiLens Kit devices that are registered using the same account in the same region.
● Skill Name: default name of the skill which is automatically created by the
workflow
● Device Type: HiLens Kit device, which is the only device allowed for a skill to
install on. Before installing skills, register a HiLens Kit device on the Huawei
HiLens console using the same account in the same region. For details, see
Registering HiLens Kit.
● Device Name: devices registered with the Huawei HiLens console under the
same account in the same region
Select an online device and click Install on the right of the skill name to install
the skill.
The skill installation progress is displayed in the Progress column of the device
list. After the installation is complete, Installed is displayed in the column.
Commissioning/Deployment
This function is not yet available.
Follow-up Operations
After skills are installed on a device, you can view skill details (see Viewing Skill
Details) and manage their skills on the Huawei HiLens console, including
installing new skills, adding runtime configurations, and starting, stopping, and
uninstalling skills.
Prerequisites
You have created a skill using a trainable skill template on the Huawei HiLens
console. For details, see Creating a Skill Using a Trainable Skill Template.
Procedure
1. Log in to the Huawei HiLens console. In the left navigation pane, choose Skill
Development > Skills.
The Basic Skills page is displayed by default.
2. Click the Trainable Skills tab.
3. Click Delete in the Operation column of the skill to be deleted, and click OK.
NOTE
● You can search for and filter skills in the Skill Market to find the skills you
need.
● If the Skill Market has the skills you need, you can directly purchase the
skills. For details, see Purchasing Skills.
● If the Skill Market does not have the skills you need, you can customize skills
on Huawei HiLens by referring to Customizing Skills.
● You can manage the skills you purchased, customized or released to the
market on the Subscription > All Skills page. For details, see Managing
Orders.
NOTE
The skills purchased in the skill market cannot be opened in HiLens Studio. You can
select a skill template in HiLens Studio to create a skill project. For details, see
Creating a Skill Project.
Skill
A skill is an AI application ready to run on a camera or another computing device.
It consists of a model and logic code. The logic code is the skill's framework, and is
responsible for controlling skill running, including data reading, model import,
model inference, and result output. The model is trained by AI algorithms based
on big data and is responsible for inference in key scenarios during skill running.
The Skill Market of Huawei HiLens provides extensive skills for users.
● The application scenarios for Huawei HiLens skills include smart campus,
smart home, smart vehicle-mounted terminals, smart shopping mall, and
more.
● Skills are classified into two types by device: skills for Ascend chips and skills
for HiSilicon Hi35xx series chips.
Skill Classification
As shown in the following figure, Huawei HiLens skills are classified into two types
based on the chip types: skills used on HiLens Kit devices and skills used on
devices that run HiSilicon Hi35xx series chips. The Huawei HiLens platform
supports quick, convenient, and efficient skill development with skill templates,
and also allows you to develop models and logic code to meet your specific
requirements in more scenarios.
HiSilicon Hi35xx series chips have low memory and performance. Therefore, you
need to optimize models of skills oriented to this type of chips. If you want to
develop skills of this type, contact Huawei HiLens platform personnel for support.
Filtering Skills
In the Selected Criteria area, you can select Billing Policy, Released By, Chip,
and OS options to filter skills. Released By can be Huawei and Third party.
Huawei refers to official skills released by Huawei HiLens, and Third party refer
to skills developed by users on the Huawei HiLens console and released to the skill
market.
● Face Detection Skill: face detection skill for smart shopping malls and
supermarkets
● Multi-Region Customer Foot Traffic Analysis Skill: customer foot traffic
analysis skill for smart shopping malls and supermarkets
● License Plate Recognition Skill: license plate recognition skill for smart
shopping malls and supermarkets
● Safety Helmet Detection Skill: safety helmet detection skill for smart
campuses
● Face Capturing and Customer Foot Traffic Detection Skill: skill used to
capture faces and collect customer foot flow statistics for smart stores
● Vehicle Type and Logo Recognition Skill: vehicle type and brand recognition
skill for smart stores.
Introduction
This is a face detection skill for smart shopping malls and supermarkets. It uses
several deep learning algorithms to analyze real-time video streams, automatically
capture clear face images, and upload the captured faces to your backend system
for later use.
● Filter out faces that cannot be recognized, such as faces of small sizes, low
definitions, and large angles.
● Detect multiple faces at the same time.
● Track a face. Deduplicate the captured faces of the same person to avoid
repeated reporting.
● Specify a region based on service requirements and capture only faces in the
specified region.
To use this skill, you need to provide your service RESTful API and RTSP video
address. A maximum of 10 network cameras can be connected and you are
charged based on the number of connected channels.
For details about skill configuration items, see Skill Runtime Parameters.
For details about the skill API design, see API for Uploading Skill Results.
Basic Information
Table 11-1 provides basic information about the face detection skill.
Parameter Description
OS Platform Linux
Maximum Channels 10
Camera Deployment
The ways cameras are deployed affects the accuracy of the face detection model.
Deploy your cameras in ways that ensure that the captured images are clear, with
the right amount of light and the right angle, and that it is less unlikely for people
to block each other's faces. In the case of video surveillance, make sure that your
cameras can capture more frontal face images.
Camera settings
Cameras of different brands have their basic video settings, such as the resolution,
frame rate, and bit rate. For details, see Table 11-2.
For a camera whose focal length cannot be adjusted, the camera must be installed
near the capture position so that the resolution of the face images is at least 30
px x 30 px. The suggestions for installing a camera are as follows:
Deployment height: 2 m-2.5 m
Shooting distance: 5 m-6 m
Shooting width: 2 m-3 m
High angle: around 15°
For a camera with adjustable focal length, adjust the focal length to ensure that
the face image resolution is greater than 30 px x 30 px.
If the captured facial images need to be sent to Face Recognition, ensure that the
image resolution is greater than 80 px x 80 px, and set parameter cropSizeMin in
Runtime Configuration Parameters to 80.
Illumination requirements
The illumination must meet the following requirements:
● The amount of light on a passerby's frontal face is appropriate, not too high,
and not too low either.
If this requirement is not met (for example, at night or in the daytime with
insufficient light), the collected facial images will be underexposed and the
captured faces will be too dark and with too much noise. As a result, the
images sent to FRS will have a low recognition success rate.
● The difference between the amounts of light on the two sides of a passerby's
face cannot be too large.
Otherwise, the captured face image will be half bright and half dark.
● Illumination on the back of a passerby < twice the illumination on the front
If the illumination on the back of a passerby exceeds twice the illumination
on the front, the phenomenon of backlighting occurs. As a result, the
captured facial images are underexposed, causing loss of facial feature details.
● A camera installed outdoors should not directly face the sun. Otherwise, the
light on captured faces will be uneven,
If this requirement is not met, the light will be too weak, and the facial
feature details will be lost.
● Do not install an outdoor camera in a place with a heavy shade or where light
is blocked by obstacles.
If this requirement is not met, the light will be too weak, and the facial
feature details will be lost.
If the onsite illumination does not meet the requirements above, you can use HLC
or light compensation to improve the illumination. HLC can help avoid uneven
illumination on faces and the backlighting phenomenon. With HLC, the
illumination condition is improved by shading the object from strong light on one
side. Light compensation can improve the illumination condition by adding extra
light sources, improving the quality of captured facial images. Common spotlights
and incandescent lamps can be used to improve the illumination on people's faces
without affecting the decoration or customer experience.
Environment requirements
● Example
You can connect multiple external cameras to a HiLens Kit device. Whether
you want to set different skill configurations for different cameras or have
multiple cameras share the same skill configuration, provide the configuration
in a list similar to the examples below:
//Set different parameters for cameras pos1 and pos2 of Store001.
{
"logLevel": "INFO",
"keep_running": 1,
"multi_camera":
[{
"camera_names": ["store001_pos1"],
"sendOriImgFlag": 0,
"sendRepeatFaceFlag": 0,
"sendOriImgCompressionRatio": 90,
"cropSizeMax": 400,
"cropSizeMin": 120,
"roi": "Polygon 0 0 0 0",
"sendUrl": "https://abc.company.com/face",
"faceQualityThreshold": 0.45,
"centerMode": 0
},
{
"camera_names": ["store001_pos2"],
"sendOriImgFlag": 1,
"sendRepeatFaceFlag": 1,
"sendOriImgCompressionRatio": 100,
"cropSizeMax": 300,
"cropSizeMin": 80,
"roi": "Polygon 0 0 0 0",
"sendUrl": "https://abc.company.com/face",
"faceQualityThreshold": 0.55,
"centerMode": 0
}]
}
//Set the same parameters for cameras pos1 and pos2 of Store002.
{
"logLevel": "INFO",
"keep_running": 1,
"multi_camera":
[{
"camera_names": ["store002_pos1","store002_pos2"],
"sendOriImgFlag": 0,
"sendRepeatFaceFlag": 0,
"sendOriImgCompressionRatio": 90,
"cropSizeMax": 400,
"cropSizeMin": 120,
"roi": "Polygon 0 0 0 0",
"sendUrl": "https://abc.company.com/face"
"faceQualityThreshold": 0.55,
"centerMode": 0
}]
}
● Response message
– Response header
The response header is returned by the server (application system) after
the server receives the request.
A response header contains the following two parts:
▪ HTTP status code, which consists of three digits (2xx to 5xx). 2xx
indicates a success response. 4xx or 5xx indicates a failure response;
Or, a status code defined by the service may be returned.
Introduction
This is a customer foot traffic analysis skill for smart shopping malls and
supermarkets. This skill uses deep learning algorithms to analyze real-time video
streams and automatically collect statistics on customer foot traffic at a fixed
interval.
● Specify a region, collect only the customer foot traffic statistics in the
specified region, and return the statistics and customer location coordinates in
the region.
● Draw a store-crossing line to collect statistics on the number of people
crossing the line and return the customer foot traffic statistics.
● Generate a heat map for regional customer foot traffic statistics based on the
customer coordinates.
To use this skill, you need to provide your service RESTful API and RTSP video
address. A maximum of 8 network cameras can be connected and you are charged
based on the number of connected channels.
For details about how to deploy cameras, see Camera Deployment.
For details about skill configuration items, see Skill Runtime Parameters.
For details about the skill API design, see API for Uploading Skill Results.
Basic Information
OS Platform Linux
Maximum Channels 8
Camera Deployment
The customer foot traffic statistics algorithm collects statistics on customer foot
traffic based on head-shoulder detection, and the ways cameras are deployed
affects the accuracy of the head-shoulder detection model. Deploy your cameras
in ways that ensure that the captured human images are clear and upright, with
the right amount of light and the right angle, and that it is less unlikely for people
to block each other's faces. In the case of video surveillance, ensure that the
cameras can capture more human figures.
Camera settings
Cameras of different brands have their basic video settings, such as the resolution,
frame rate, and bit rate. The specific requirements are as follows:
The camera shooting direction must be forward to the front and back of the
customers, with a tilt angle of view. The specific requirements are as follows:
Illumination requirements
● The illumination on the front of the customer area must be at least 100 lux to
avoid overdarkness or noise.
● The illumination on one side of a customer must be within twice the
illumination on the other side to avoid casting shadows on faces.
● The illumination on the back of a customer cannot exceed twice that on the
front. This prevents the loss of facial details due to insufficient face exposure.
If the onsite illumination does not meet the requirements above, you can use HLC
or light compensation to improve the illumination. HLC can help avoid uneven
illumination on faces and the backlighting phenomenon. With HLC, the
illumination condition is improved by shading the object from strong light on one
side. Light compensation can improve the illumination condition by adding extra
light sources, improving the quality of captured facial images. Common spotlights
and incandescent lamps can be used to improve the illumination on people's faces
without affecting the decoration or customer experience.
Environment requirements
● Ensure that there is no obstacle in front of the lens to avoid missing detection.
● Do not install a camera under the shade of a house. Otherwise, the light may
be too dark and the human figure may be blurry.
● When installing a camera outdoors, do not install it in an open area.
Otherwise, the camera lens may be covered by rain or snow, resulting in
blurred images.
● When installing a camera indoors, pay attention to the lighting. The lighting
in the corridor changes rapidly, and the images captured by the camera may
be dark.
● Response message
– Response header
The response header is returned by the server (application system) after
the server receives the request.
A response header contains the following two parts:
▪ HTTP status code, which consists of three digits (2xx to 5xx). 2xx
indicates a success response. 4xx or 5xx indicates a failure response;
Or, a status code defined by the service may be returned.
Introduction
This is a license plate recognition skill for smart shopping malls and supermarkets.
It uses several deep learning algorithms to analyze video streams in real time,
automatically capture and recognize license plates in images, and upload the
captured license plates to your backend system for later use.
● Recognize license plates that appear in the images captured by external IPCs.
● If multiple license plates are displayed, recognize only one license plate and
upload the recognition result.
● Return the license plate colors.
For details about the skill API design, see API for Uploading Skill Results.
Basic Information
Table 11-19 describes the basic parameters used in the license plate recognition
skill.
Parameter Description
OS Platform Linux
Maximum Channels 10
Camera Deployment
Camera deployment requirements are as follows:
● Response message
This skill can be used in a specified area and returns the safety helmet detection
statistics and coordinate information in the area.
To use this skill, you need to provide your service RESTful API and RTSP video
address. A maximum of 8 network cameras can be connected and you are charged
based on the number of connected channels.
Basic Information
Parameter Description
OS Platform Linux
Maximum Channels 8
Camera Deployment
The way cameras are deployed affects the accuracy of the safety helmet detection
model. Deploy your cameras in ways that ensure that the captured human images
are clear and upright, with the right amount of light and the right angle, and that
it is less unlikely for people to block each other's faces. In the case of video
surveillance, ensure that the cameras can capture more human figures.
The training scenario of the safety helmet detection model is mainly for the
construction site entrance. Specifically, the camera is about three to four meters
above the ground. In the area for safety helmets, the human figure is not severely
blocked. To ensure the accuracy of the detection algorithm, ensure that the safety
helmet in the image is clear. In addition, the scene in the camera image must be
as simple and open as possible to avoid false positives caused by complex
scenarios.
Camera settings
Cameras of different brands have their basic video settings, such as the resolution,
frame rate, and bit rate.
● Example
You can connect multiple external cameras to a HiLens Kit device. Whether
you want to set different skill configurations for different cameras or have
multiple cameras share the same skill configuration, provide the configuration
in a list similar to the examples below:
//Set different parameters for cameras pos1 and pos2 of constructionsite01.
{
"heartbeat_interval": 30,
"post_url": "https://abc.company.com/webhook",
"multi_camera":
[{
"camera_names": ["constructionsite01_pos01"],
"send_image": 1,
"image_compression_ratio": 90,
"use_tracking": 1,
"roi": "Polygon 0 0 0 0"
},
{
"camera_names": ["constructionsite01_pos02"],
"send_image": 1,
"image_compression_ratio": 80,
"use_tracking": 0,
"roi": "Polygon 0 0 1920 0 1920 1080 0 1080"
}]
}
//Set the same parameters for cameras pos1 and pos2 of constructionsite02.
{
"heartbeat_interval": 60,
"post_url": "https://abc.company.com/standard",
"multi_camera":
[{
"camera_names": ["constructionsite02_pos01"," constructionsite02_pos02"],
"send_image": 1,
"image_compression_ratio": 90,
"use_tracking": 1,
"time": 1527603463
}
"y": 632,
"w": 36,
"h": 95
}
],
"image": "4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
}
● Response message
– Response header
The response header is returned by the server (application system) after
the server receives the request.
A response header contains the following two parts:
▪ HTTP status code, which consists of three digits (2xx to 5xx). 2xx
indicates a success response. 4xx or 5xx indicates a failure response;
Or, a status code defined by the service may be returned.
– Response body
A response body is generally returned in a structured format (for
example, JSON or XML). It corresponds to Content-type in the response
header and is used to transfer content other than the response header.
Introduction
This skill is used to capture faces and collect customer foot traffic statistics for
smart stores. It uses several deep learning algorithms to analyze real-time video
streams; capture the faces of people entering a store; automatically select facial
images of the right sizes, resolutions, and angles; and upload them to a backend
system.
Using this skill with the Face Recognition Service (FRS) on the cloud, you can
further develop applications to collect statistics on VIP customers and regular
customers. To use this skill, you need to provide the RESTful interface and RTSP
video address for your application. Currently, this skill can use a maximum of two
channels of video data.
NOTE
When the crowd is dense, where people block each other's faces, the faces of customers
may fail to be captured.
For details about skill configuration items, see Skill Runtime Parameters.
For details about the skill API design, see API for Uploading Skill Results.
Basic Information
Table 11-33 describes the basic parameters of this skill.
Parameter Description
Parameter Description
Camera Deployment
The way cameras are deployed affects the accuracy of the customer foot traffic
detection model. Deploy your cameras in ways that ensure that the captured
images are clear, with the right amount of light and the right angle, and that it is
less unlikely for people to block each other's faces. In the case of video
surveillance, make sure that your cameras can capture more frontal face images.
Camera settings
Cameras of different brands have their basic video settings, such as the resolution,
frame rate, and bit rate. For details, see Table 11-34.
If the onsite illumination does not meet the requirements above, you can use HLC
or light compensation to improve the illumination. HLC can help avoid uneven
illumination on faces and the backlighting phenomenon. With HLC, the
illumination condition is improved by shading the object from strong light on one
side. Light compensation can improve the illumination condition by adding extra
light sources, improving the quality of captured facial images. Common spotlights
and incandescent lamps can be used to improve the illumination on people's faces
without affecting the decoration or customer experience.
Environment requirements
The skill determines whether a customer has entered the store based on whether
they have crossed a previously defined line (passLineThreshold; for details, see
Table 11-36). This line is closely related to the camera shooting range. The
recommended settings are as follows:
● Make sure that when a full-grown person stands on this line, the camera can
capture the full image of this person and the frontal face image is clear
(assume the other conditions are also met).
● The line should be defined so that 80% to 90% of the camera's coverage is
outside of the store, and 10% to 20% is inside.
● Configuration parameters
Table 11-35 describes the skill runtime parameters.
● Example
You can connect multiple external cameras to a HiLens Kit device. Whether
you want to set different skill configurations for different cameras or have
multiple cameras share the same skill configuration, provide the configuration
in a list similar to the examples below:
//Set different parameters for cameras pos1 and pos2 of Store001.
{
"logLevel": "INFO",
"keep_running": 1,
"multi_camera":
[{
"camera_names": ["store001_pos1"],
"sendOriImgFlag": 0,
"sendOriImgCompressionRatio": 90,
"cropSizeMax": 400,
"cropSizeMin": 100,
"faceQualityThreshold": 0.25,
"facePoseThreshold": 0.45,
"faceBlurThreshold": 0.55,
"faceMargin": 2.0,
"passLineThreshold": 0.9,
"sendUrl": "https://abc.company.com/face",
},
{
"camera_names": ["store001_pos2"],
"sendOriImgFlag": 1,
"sendOriImgCompressionRatio": 100,
"cropSizeMax": 300,
"cropSizeMin": 80,
"faceQualityThreshold": 0.25,
"facePoseThreshold": 0.45,
"faceBlurThreshold": 0.55,
"faceMargin": 2.0,
"passLineThreshold": 0.9,
"sendUrl": "https://abc.company.com/face",
}]
}
//Set the same parameters for cameras pos1 and pos2 of Store002.
{
"logLevel": "INFO",
"keep_running": 1,
"multi_camera":
[{
"camera_names": ["store002_pos1","store002_pos2"],
"sendOriImgFlag": 0,
"sendOriImgCompressionRatio": 90,
"cropSizeMax": 400,
"cropSizeMin": 120,
"faceQualityThreshold": 0.25,
"facePoseThreshold": 0.45,
"faceBlurThreshold": 0.55,
"faceMargin": 2.0,
"passLineThreshold": 0.9,
"sendUrl": "https://abc.company.com/face",
}]
}
– Example
The following is an example of the JSON message body for face
capturing and customer foot traffic detection:
{
"msg_type": "face_detection_result",
"cam_name": "store001_pos2",
"skill_id": "f5c526eb6c51440c8a0ee5e3cc65f23c",
"time": 1527603463,
"track_id": 1,
"person_id": "0DD1BEA6-634B-11E8-8B0B-407D0FAD9218",
"person_image": "4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
"ori_img_id": "0DD1BF0A-634B-11E8-8B0B-407D0FAD9218",
"ori_image": "4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
"face_image": "4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE...",
"clarity": 0.35,
"quality_pose": 0.45,
"quality_blur": 0.55,
"bbox ": {
"x": 32,
"y": 379,
"w": 49,
"h": 65
},
}
● Response
– Response header
The response header is returned by the server (application system) after
the server receives the request.
A response header contains the following two parts:
▪ HTTP status code, which consists of three digits (2xx to 5xx). 2xx
indicates a success response. 4xx or 5xx indicates a failure response.
Or, a status code defined by the service may be returned.
Introduction
This skill is used to recognize vehicle types and brands for smart stores. This skill
uses several deep learning algorithms to analyze real-time video streams, take
snapshots of vehicles entering a shopping mall, recognize the brands and types
(sedan or SUV) of the vehicles, and upload the recognition results to your backend
system.
For details about skill configuration items, see Skill Runtime Parameters.
For details about the skill API design, see API for Uploading Skill Results.
Basic Information
Table 11-42 provides basic information about the vehicle type and logo
recognition skill.
Camera Deployment
The ways cameras are deployed affects the accuracy of the vehicle type and brand
detection model. Deploy your cameras in ways that ensure that the captured
images are clear, with the right amount of light and the right angle, and that it is
less unlikely for vehicles to block each other.
Camera settings
Cameras of different brands have their basic video settings, such as the resolution,
frame rate, and bit rate. For details, see Table 11-43.
Parameter Requirement
● Configuration parameters
Table 11-44 describes the skill runtime parameters.
● Example
You can connect multiple external cameras to a HiLens Kit device. Whether
you want to set different skill configurations for different cameras or have
multiple cameras share the same skill configuration, provide the configuration
in a list similar to the examples below:
//Set different parameters for cameras pos1 and pos2 of Store001.
{
"logLevel": "INFO",
"keep_running": 1,
"multi_camera":
[{
"camera_names": ["store001_pos1"],
"sendCarImgFlag": 0,
"roi": "Polygon 0 0 0 0",
"sendUrl": "https://abc.company.com/car"
},
{
"camera_names": ["store001_pos2"],
"sendCarImgFlag": 1,
"roi": "Polygon 0 0 0 0",
"sendUrl": "https://abc.company.com/car"
}]
}
//Set the same parameters for cameras pos1 and pos2 of Store002.
{
"logLevel": "INFO",
"keep_running": 1,
"multi_camera":
[{
"camera_names": ["store002_pos1","store002_pos2"],
"sendCarImgFlag": 0,
"roi": "Polygon 0 0 0 0",
"sendUrl": "https://abc.company.com/car"
}]
}
– Example
{
"msg_type": "car_recognition_result",
"cam_name": "store001_pos1",
"time": 1527603463,
"carType": "MPV",
"carBrand": "Toyota_Verso",
"carUUID": "0DD1BF0A-634B-11E8-8B0B-407D0FAD9218",
"carImage": "4AAQSkZJRgABAQAAAQABAAD/2wBDAAIBAQE..."
}
● Response
– Response header
The response header is returned by the server (application system) after
the server receives the request.
A response header contains the following two parts:
▪ HTTP status code, which consists of three digits (2xx to 5xx). 2xx
indicates a success response. 4xx or 5xx indicates a failure response.
Or, a status code defined by the service may be returned.
Context
● You can customize skills intended to work with Ascend 310 chips or skills
intended to work with HiSilicon Hi35xx series chips.
● Skill customization incurs certain fees. After you submit a skill customization
request, our people will contact you to cover details and fees.
Customizing a Skill
1. Log in to the Huawei HiLens console. In the navigation pane, choose
Subscription > Order Management.
2. On the My Skills page, click the Custom Skills tab. The page for customizing
skills is displayed.
3. Click Customize Skill in the upper right corner, enter required skill
parameters, and click OK.
Parameter Description
Platform Platform where the skill runs. Linux, Android, iOS, LiteOS,
and Windows are supported.
4. After submitting the request, related personnel will contact you to discuss the
details of the skill. You can also view the status of the customized skill on the
Custom Skill tab page.
– Reviewing: indicates that the skill customization request is being
reviewed.
– Rejected: If you have not signed a contract with HUAWEI CLOUD, Huawei
HiLens will reject your skill customization request.
– Customizing: The skill is being customized.
– Completed: The skill has been customized. After customizing a skill, you
can purchase and use it. For details, see Purchasing & Customizing
Skills.
For some skills, you do not need to select I agree to the skill's
privacy policies. In this case, directly click Buy Now.
ii. After the skill is purchased, a dialog box is displayed, indicating that
the purchase is complete. You can click Orders from Skill Market
and view the skill information. Alternatively, you can choose
Subscription > Order Management in the navigation pane to access
the Skill Orders tab page, and view the purchased skill.
– If the skill is charged, the page for purchasing the skill is displayed.
i. Specify the Required Duration and Quantity, determine the Billed
By, Privacy Policy, and Agreement, and select I agree to the
Privacy Statement and the Agreement. Then, click Buy Now.
The Confirm page is displayed.
ii. Check the order details and click Submit.
The payment page is displayed.
iii. Select a payment method, check the order details, click Pay, and
enter the payment password to purchase the skill.
After a message is displayed indicating that the order is paid
successfully, you can click Back to Console to go back to the Huawei
HiLens console. In the navigation pane, choose Subscription > All
Skills, access the Skill Orders tab page, and view the purchased skill.
Follow-up Operations
After purchasing a custom skill, you can install it on a device of your choice. For
details, see Installing a Skill.
Context
● Skill purchase incurs certain fees. Before using Huawei HiLens, check your
account status, which cannot be in arrears or frozen.
● Skills are classified into those oriented to Ascend 310 chips and those
oriented to HiSilicon Hi35xx series chips. Check the skill types carefully and
purchase them based on site requirements.
● If the Skill Market does not have the skill you want, you can submit a
request for customizing the skill to Huawei HiLens. For details, see
Customizing Skills.
● The skills purchased in the skill market cannot be opened in HiLens Studio.
You can select a skill template in HiLens Studio to create a skill project. For
details, see Creating a Skill Project.
Once you have subscribed to the skills, you can choose Subscription > Order
Management on the Huawei HiLens console, and click the AI Gallery tab page to
view details about these skills.
Click on the left of the skill name and click Install in the skill version
information area to install the skill onto your device. For details, see Installing
Skills.
Follow-up Operations
● Common users or developers (skill users): You can install purchased skills on
your devices. For details, see Installing Skills.
● Manufacturers (product managers): You can distribute purchased skills to
your products. For details, see Distributing Skills.
12 Managing Data
After a skill is delivered to a device, you can download the device data on the
Huawei HiLens console for analysis purposes, for example, to check how the skill
is performing on the device where it is currently deployed.
NOTE
● Only the data of HiLens Kit devices can be managed on the Data Management page.
The data of devices running HiSilicon Hi35xx series chips cannot be managed on the
Huawei HiLens console.
● You can only use the data management function to view data of skills that are exported
to OBS as files.
Prerequisites
● A common user successfully installs a purchased skill to a device. For details,
see Installing a Skill.
● A developer successfully installs a skill to a device. For details, see Installing
and Debugging Skills.
● Only when the output module of a skill defines the scenario that data is
output to OBS, you can view the skill data on the Data Management page.
– If you are a skill developer and need to view the running effect of your
skill on devices, you need to specify that the skill data is stored on OBS,
so that you can download the data from the Huawei HiLens console.
– If you are a skill user, you need to check whether the data of a skill is
stored on OBS on the skill details page in the skill market.
2. Click on the right of Data Storage Location. In the dialog box that is
displayed, select an OBS directory to store the video data of the current
device.
NOTE
● Storing device data consumes storage resources of HUAWEI CLOUD. Using OBS for
storage will incur fees. For detailed operations and specifications, see the Object
Storage Service Console Operation Guide.
● When a URL is used to access a bucket, the bucket name is a part of the URL.
According to DNS standards, a URL does not support uppercase letters and cannot
be used to access a bucket whose name contains uppercase letters. Therefore, a
bucket name can contain only lowercase letters, digits, hyphens (-), and periods (.).
It cannot contain two consecutive periods (.) or contain a period (.) and a hyphen
(-) adjacent to each other. For details about the naming rule, see Creating a
Bucket.
Viewing Data
You can view the device data and skill running effect based on the data output
mode. For details about the skill output modes, see Table 12-1.
NOTE
● Video data of most skills is output to a display through the HDMI port of a device, and
little video data is output to a server for viewing. Go to the Skill Market and view the
output settings of a skill under Product Description on the skill details page. For
example, if the description of a celebrity recognition skill is "View via HDMI", you can
view the skill running effect on a display after the skill is deployed.
● Skills of other output modes (excluding HDMI) are stored on OBS. For details about
how to view data, see Configuring the Data Storage Location (OBS Storage Path).
HDMI The video data is directly output to a display through the HDMI
port of the device.
RTMP The video data is output to a server in real time for users to view.
For details about the server address, see the skill's Product
Description.
H264_FILE The video data is output to OBS as files for users to view.
For details about the OBS path, see Configuring the Data
Storage Location (OBS Storage Path).
Downloading Data
1. Log in to the Huawei HiLens console. In the navigation pane, click Data
Management (Beta). The Data Management page is displayed.
2. Double-click the specified device name to access the device data folder to be
downloaded.
3. Select the data folder and click Download to download the data to your local
PC.
Deleting Data
1. Log in to the Huawei HiLens console. In the navigation pane, click Data
Management (Beta). The Data Management page is displayed.
2. Double-click the specified device name to access the device data folder to be
deleted.
3. Select the data folder and click Delete.
13 Managing Products
13.1 Overview
As the manufacturers of cameras running HiSilicon Hi35xx series chips, you can
use Huawei HiLens to manage products in batches. You can also purchase skills
from the skill market, and distribute the skills to your products to enable your
products with AI capabilities.
● Managing Products
● Purchasing Skills (for Devices Running Hi35xx Series Chips)
● Distributing Skills
● Adding or Deleting Skills
Creating a Product
1. Log in to the Huawei HiLens console, and choose Device Management >
Products in the navigation pane. The Products page is displayed.
2. Click Create Product in the upper right corner and set product parameters, as
shown in Table 13-1.
Parameter Description
Downloading a License
After a product is created, you need to download the corresponding license and
save it to the specified path on the device.
Editing a Product
1. Log in to the Huawei HiLens console, and choose Device Management >
Products in the navigation pane. The Products page is displayed.
2. Select the target product and click Edit in the Operation column.
The Update Product dialog box is displayed.
3. In the Update Product dialog box, edit the Name, Platform, Chip, and
Description based on Table 13-1.
Deleting a Product
NOTICE
Before deleting a product, ensure that the product is not in use. Exercise caution
when performing this operation. If the product is associated with devices, the
devices cannot be managed after the product is deleted. If users have registered
the devices, the manufacturer cannot distribute skills to the devices.
1. Log in to the Huawei HiLens console, and choose Device Management >
Products in the navigation pane. The Products page is displayed.
2. Select the target product and click Delete in the Operation column.
3. Confirm the product information and click OK.
If the Skill Market has the skills you need, you can directly purchase the skills. If
the Skill Market does not have the skill you want, you can submit a request for
customizing the skill to Huawei HiLens.
● Purchasing skills: In the skill market, select the skills oriented to HiSilicon
Hi35xx series chips. For details, see Purchasing Skills.
● Customizing skills: For details, see Customizing Skills. When customizing
skills, you must fill in the applicable chips based on the actual situation.
Prerequisites
● Devices have been associated with a product. For details, see Managing
Products.
● Skills have been purchased. For details, see Purchasing Skills (for Devices
Running Hi35xx Series Chips).
Distributing a Skill
1. Log in to the Huawei HiLens console. In the navigation pane, choose
Subscription > Order Management. The Skill Orders tab page is displayed
by default.
2. Select the skill you need and distribute the skill license to a product.
In the skill information, only the skills whose Chip is not Ascend 310 can be
distributed to products.
a. Select the skill to be distributed and click Distribute in the Operation
column.
b. In the Distribute to Product dialog box, select the product to which the
license is to be distributed, select or not select Yes under Automatic
Upgrade as required, and click Distribute to Product.
If you select Automatic Upgrade, the skill in the product will be
automatically upgraded to the latest version if a new version is available
for the skill.
c. The skill distribution information is displayed in the dialog box. Confirm
that the installation status is successful and click OK.
3. Download the skill.
On the Skill Orders tab page, select the skill you want to use and click
Download in the Operation column. The browser automatically downloads
the SDK package of the skill.
4. Deploy the skill. Integrate the SDK package downloaded in 3 to a device.
The device location where the skill is integrated varies according to the device.
For details about the operation guide, contact Huawei technical engineers.
You can delete skills that are no longer used from the current product.
Adding a Skill
1. Log in to the Huawei HiLens console, and choose Device Management >
Products in the navigation pane. The Products page is displayed.
2. Select a product and click Add Skill in the Operation column.
3. The Available Skills dialog box displays a list of purchased skills by default.
Select the skills to be added, select Automatic Upgrade as required, and click
OK.
If you select Automatic Upgrade, the skill will be automatically upgraded to
the latest version if a new version is available for the skill.
Deleting a Skill
Deleting a skill is to remove the skill from a device.
NOTE
● After devices that support automatic skill update (devices running the 3516CV500 and
3519AV100 chips) detect that the skills on the cloud are deleted, the devices also delete
the device-side skills.
● For devices that do not support automatic skill update, after the skills are deleted from
the cloud, the devices are not affected and the device-side skills can still be used. If you
want to delete the device-side skills, submit service tickets.
1. Log in to the Huawei HiLens console, and choose Device Management >
Products in the navigation pane. The Products page is displayed.
2. Select a product and click the arrow on the left to view all skills under the
product.
3. Select the skill to be deleted and click Delete.
4. Confirm the information of the skill to be deleted and click OK.
For the Caffe framework, if the input dimension of each operator is not 4 and the
axis parameter exists, negative numbers cannot be used.
Table A-1 shows the boundaries of Caffe operators supported by .om models.
1. a = ALIGN(filter_num, 16) x
ALIGN(filter_c, 16) x filter_h x
filter_w x 2
2. If ALIGN(filter_c, 16)%32 = 0, a =
a/2
3. conv_input_width =
(deconvolution input W – 1) x
strideW + 1
4. b = (conv_input_width) x filter_h x
ALIGN(filter_num, 16) x 2 x 2
5. a + b ≤ 1024 x 1024
[Quantitative tool support]
Yes
● general_nms_param: optional
[Constraint]
● Used for Faster R-CNN
● Non-maximum suppression (NMS)
ratio nmsThreshold is within (0, 1)
● Probability threshold
postConfThreshold is within (0, 1)
● Classes ≥ 2
● Input box count ≤ 1,024
● Output W dimension = 16
[Quantitative tool support]
Yes
imInfo: N = clsProb.N, C = 3
[Quantitative tool support]
Yes
● general_nms_param: optional
[Constraint]
● Used for the SSD network only
● Value range of preTopK and
postTopK: 1–1024
● shareLocation = true
● nmsEta = 1
● Value range of numClasses: 1–
2048
● code_type = CENTER_SIZE
● Value range of nms_threshold
and confidence_threshold: 0.0–
1.0
[Quantitative tool support]
Yes
● general_nms_param: optional
[Constraint]
● sed only for YOLOv2
● classNUm < 10,240; anchorBox ≤ 8
● W ≤ 1,536
● The upper layer of
yolodetectionoutput must be the
yoloregion operator.
[Quantitative tool support]
No
18 tf.nn.leaky_rel / [Parameter]
u ● features: non-constant tensor
representing pre-activation values
● alpha: slope of the activation
function at x < 0
● name: (optional) operation name
[Constraint]
None
[Output]
Activation value
[Quantitative tool support]
Yes
50 tf.placeholder - [Parameter]
● dype: (mandatory) data type
● shape: (mandatory) shape of the
tensor to be fed
[Constraint]
None
[Output]
1 tensor
[Quantitative tool support]
No
C Change History
2019-07-05 Edited the file based on version 1.1.0 on the cloud and
version 0.2.6 on the device.
2019-05-21 Deleted
● Deleted the method of registering a HiLens Kit camera
by scanning the QR code.
2019-05-16 Changed
● Changed the names of the service and the deep learning
camera.
2019-05-07 Added
● Added operations related to manufacturers.
● Added the description of runtime configurations during
skill creation.
Changed
● Changed the screenshots.
2019-03-04 Added
● Added precautions of handlers.