Self-Learning Classifier Example

Self-learning classification lets HuskyLens 2 learn custom objects and report ID, name and status via micro:bit, like teaching a camera flashcards. It's like training a pet to recognize different toys by name.

1. Self-Learning Classifier Project Example

Before You Start:

1.1 Self-Learning Object Classification and Output Related Data

When self-learning classification is enabled, HuskyLens 2 can learn and recognize custom objects defined by the user, allowing you to access key data: total detected objects,learned object ID, object name, and confidence level will be displayed (confidence level cannot currently be retrieved via program). Unlike the fixed-category object classification, this function enables users to train the device to recognize specific, personalized objects.

Example program:

Interface Diagram

Connect to micro:bit and click Download to transfer the program. After successful download, click Show Data to activate data output mode. First, train HuskyLens 2 with your custom objects, then point the camera at the learned objects to observe the recognition results.
As shown, when HuskyLens 2 successfully recognizes a previously learned custom object such as "lenmon" the following data will display:
How to use self-learning classification, please refer to theSelf-Learning Classifier.

Result: The serial port will output: learned object ID, object name, and recognition status. . If no custom name is set, the default name "Object" will be displayed.

Interface Diagram

1.2 Self-Learning Classfier Blocks Description

block Description
Used to obtain one set of Self-Learning Classification data under the Self-Learning Classification function of HUSKYLENS 2.
Determine if a previously learned object is present and recognized in the current frame.
Retrieves data of the recognized learned object, including object ID and custom object name. IDs start from 1 in learning order.

Was this article helpful?

TOP