[micro:bit][MindPlus][Blocks] Self‑Learning Classifier

Last revision 2026/08/11

Self-learning classifier lets HUSKYLENS 2 scan, recognize and label objects by ID, name and confidence, like giving each item a digital name tag for micro:bit projects

1. Self-Learning Classifier Code Example

Before You Start:

1.1 Recognizing Learned Objects and Outputting ID and Name

Under the Self-Learning Classifier function, once an object has been learned, HUSKYLENS 2 can recognize it again when it reappears. The following example program can be used to obtain the ID and name of the recognized learned object.

Interface Diagram

Upload the program and wait for the upload to complete.

After HUSKYLENS 2 finishes learning the object, point the Camera of HUSKYLENS 2 at the learned object and observe the output results. For detailed instructions on how to learn objects, please refer to the Self-Learning Classifier.

Running Result: As shown below, when a previously learned object appears in the frame, it will be framed and its name, ID, and confidence level will be displayed. If the object name has not been set, the default output name is "Object".

Interface Diagram

1.2 Self-Learning Classifier Blocks Description

block Description
Under the HUSKYLENS 2 Object Classification function, used to acquire the recognition result of a learned object from one scan.
Judges if a specific learned object has been detected.
Gets data for a specific learned object, including ID and Name. The IDs in Object Classification are pre-assigned in the model, so the user's learning order is not related to the object ID.

Was this article helpful?

TOP