このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。
- What's New
- Function Overview
- Service Overview
- Getting Started
-
User Guide
- Who Uses HiLens
- Procedures for Using HiLens
- Permissions Management
- Creating a Workspace
- Registering HiLens Kit Devices
- Managing Devices
- Developing Skills on the Console
- Using the Skill Market
- Managing Data
- Managing Products
- Caffe Operator Boundaries
- TensorFlow Operator Boundaries
- Best Practices
-
Developer Guide
- Before You Start
- HiLens Framework Introduction
- Initialization
- Video Input Module
- Audio Input Module
- Preprocessing Module
- Model Management Module
- Output Module
- EIServices Module
- Resource Management Module
-
Hard Example Upload Module
- Introduction to Hard Example Upload
- Initializing
- Determining a Hard Example Image in a Detection Algorithm
- Determining a Hard Example Image in a Classification Algorithm
- Uploading a Hard Example Image Set
- Obtaining Hard Example Configurations
- Updating Hard Example Configurations
- Example - Hard Example Upload
- Log Module
- Error Codes
- Change History
- SDK Reference
-
FAQs
-
FAQs
-
HiLens Kit Devices
-
Device Introduction
- What Are the Differences Between HiLens Kit and Atlas 500?
- What Are the Differences Between HiLens Kit and Atlas 200 DK?
- What Is HiLens Kit?
- What Is the Focal Length of a HiLens Kit Camera? Can It be Adjusted?
- What Cameras Can Be Connected to HiLens Kit?
- Can I Develop HiLens Kit Skills Using Compute Architecture for Neural Networks (CANN)?
-
Device Hardware Operations
- What Storage Devices Can Be Mounted to the USB Port of a HiLens Kit Device?
- What Does the Red Indicator of a HiLens Kit Device Mean?
- How Do I Restore HiLens Kit Devices to Factory Settings?
- Can HiLens Kit Connect to Multiple USB Cameras?
- Do I Need to Use Other Devices Together with HiLens Kit Devices?
- How Do I Quickly Switch a HiLens Kit Device to the Wireless Network Configuration Mode?
- Does HiLens Kit Support Infrared Interfaces?
-
Device System Operations
- How Do I Log In to a Device Using SSH?
- After I Change the Password for a Huawei HiLens Device, Why Can't I Use PuTTY to Log In to the Device Even Though I Can Use the New Password to Log in to Huawei HiLens IES?
- How Do I Perform Bottom-Layer Operations on the HiLens Kit System?
- Can I Import a Custom Python Module to a HiLens Kit Device?
- How Do I Install YUM on HiLens Kit Devices?
- How Do I Manage Device Files?
- How Do I Install Software Packages on HiLens Kit Devices?
- How Do I Log In to a Device as Root User and Disable Connection Timeout?
- Can Python-based OpenMV Devices Invoke HiLens Kit Skills by Calling APIs?
- Why a HiLens Kit Device Cannot Display Chinese Characters?
- How Do I Clear Wi-Fi Information Saved on a HiLens Kit Device?
- How Do I Use SSH Commands to Connect a HiLens Kit Device to a Wi-Fi Network?
- How Do I Configure Permanent DNS on a HiLens Kit Device?
-
Device Introduction
-
Device Registration
- How Do I Handle Device Registration Failures with Different Causes Returned?
- How Do I Check Whether a Huawei Cloud Account Is Bound to a Device?
- What Should I Do If I Can't Access the Huawei HiLens IES?
- What Should I Do If There Is Not Enough Quota for Device Registration?
- Why Do HiLens Kit Devices Fail to Connect to Wi-Fi?
- How Do I View the IP address of a Wireless Network?
- What Do I Do If the System Displays a Message Indicating that Only Firmware 1.0.3 or Later Can Be Registered When I Use Register a Device with the Intelligent Edge System?
- What Are the Differences Between Using IES and SSH to Register a HiLens Kit Device?
- What Do I Do If I Forgot the Password to the Huawei HiLens Intelligent Edge System?
-
Managing Devices
- What Should I Do If the Device Is Offline for More Than 5 Minutes After a Firmware Upgrade?
- Do I Need to Upgrade Firmware in Sequence?
- Why Does the Firmware Upgrade Fail When the Device Is Online?
- What Should I Do If the System Displays a Message Indicating That the Upgraded Version Must Be Later Than the Current Version During Firmware Upgrade?
- What Can I Do If a Device Alarm Is Reported Indicating That the Directory Space Is Full?
-
Skill Development
- What Are the Causes of Skill Creation Failures?
- What Models Does Huawei HiLens Support?
- How Do I Upload Models to Huawei HiLens?
- Can One Skill Use Multiple Models? How Do I Add Multiple Models When Developing a Skill?
- Why Does Skill Releasing Fail?
- Can Sockets Be Used During Skill Development?
- How Do I Handle a Model Conversion Failure?
- To What Devices Does the HiLens Framework SDK Apply?
- How Do I Determine the Input Tensor Shape During Model Conversion?
- Does Huawei HiLens Only Support Models Trained by ModelArts?
- Can Skills Developed on Huawei HiLens Be Deployed on Edge Servers That Use P4 GPUs?
-
Installing and Starting Skills
- What Are the Possible Causes for Skill Installation Failures?
- How Many Skills Can Run on a HiLens Kit Device Concurrently?
- Why Does a Skill Stop After Being Started?
- Can a HiLens Kit Device Run Skills Offline?
- What Can I Do If Skill A Is Successfully Started But Skill B Fails to Be Started When the Two Skills Purchased from the Skill Market Are Both Output by HDMI?
- Purchasing Skills
- Managing Products
-
Managing Data
- Why Is There No HDMI Skill Data on the Data Management Page?
- How Do I Configure the Data Storage Location (OBS Storage Path)?
- Why Does HDMI Black Screen Occur or HDMI Output Stop Working?
- Can I Record the Images Captured by a HiLens Kit Camera or the Skill Running Result for Storage?
- Why Don't the Logs Contain Any Device Data?
-
Algorithm Issues
- Why Is Error Code 17 Displayed During Model Inference?
- How Do I Use and Program the SDK or License of a Skill?
- Can a Huawei HiLens Skill Run on an Android or Arm Platform?
- What TensorFlow and Caffe Models Can Run on Huawei HiLens?
- Does Huawei HiLens Support Self-Developed Operators?
- What Language Does the Huawei HiLens Development Environment Support?
- Does HiLens Kit Provide an Interface that Converts a Color Image to a Grayscale Image?
- How Do I Configure Python Dependencies for a Skill?
-
Other
- Why Does the Huawei HiLens Console Keep Reporting 404 Errors?
- How Do I Assign Huawei HiLens Permissions to New IAM Users?
- Does Huawei HiLens Support 3D Object Recognition?
- What Can I Do If the System Displays a Message Indicating that the AK/SK Pair Is Unusable?
- What Devices Does Huawei HiLens Support?
-
HiLens Kit Devices
-
FAQs
- General Reference
Show all
Copied.
Initializing the HiLens Framework
This API is used to initialize the HiLens Framework. Before calling other APIs of the HiLens Framework, you need to perform global initialization.
- API calling
hilens.init(verify)
- Parameter description
Table 1 Parameters Parameter
Mandatory
Type
Description
verify
Yes
Character string
The value is a string of 0 to 128 characters.
The value must be the same as the verification value in the basic information entered when you create a skill on the Huawei HiLens management console. If they are different, the HiLens Framework forcibly stops the skill.
- Return value
The value 0 indicates that the HiLens Framework is initialized successfully. Other values indicate that the HiLens Framework fails to be initialized.
This method can also be used to verify whether the skill is corrupted or tampered with. To use this function, the verify parameter must be the return value of a function compiled by the developer. The return value is the hash value of the file to be verified in real time. After developing a skill, the developer uses the same hash method to calculate the hash value and enters the verification value when creating the skill on the console. The following is an example:
#! /usr/bin/python3.7 import hilens def verify(): # You need to implement a method to verify the program identity (to prevent the program from being damaged or tampered with). # For example, if the hash value of an important file in a skill package can be calculated, verify must return a string of 1 to 128 bytes. # On the HiLens platform, enter the hash value during skill development. After the init method is invoked, the skill automatically sends the hash value to the platform for comparison and verifies the skill license. # During debugging, you can use a fixed character string for verification to facilitate code modification. # The source code of Python scripts is easy to be tampered with when being delivered to devices. For commercial skills, you are advised to use C++ for development. # Note: Do not use hard-coded character strings to verify skills that are officially released. return "hello" def main(): # Initialize HiLens. rc = hilens.init(verify()) # If you do not want to use this function in skill development and debugging phase, enter a static character string. # Example: hilens.init("hello") if rc != 0: hilens.error("Failed to initialize HiLens") return # Business code pass # Clear resources. hilens.terminate() if __name__ == '__main__': main()
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot