Object Classification Example

HuskyLens 2 object classification lets micro:bit projects detect up to 1000 categories and output each object’s name via serial, like a smart labeler for everything in view. It’s like giving your camera flashcards so it can instantly tell you what it sees.

1. Object Classification Project Example

Before You Start:

1.1 Object Classification and Output Related Data

When object classification is enabled, HuskyLens 2 can classify 1000 fixed categories of objects and identify learned objects, allowing you to access key data: total detected objects,classified object ID, object name). The system uses pre-trained models to recognize common objects without requiring extensive training.

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. Point the HuskyLens 2 camera at various objects to observe the classification results.
As shown, when HuskyLens 2 successfully classifies an object such as "mouse", the following data will display:

How to use object classification, please refer to the Object Classification tutorial.

Result: The serial port will output: classified object name.

Interface Diagram

1.2 Object Classification Blocks Description

block Description
Used to obtain one set of Object Classification data under the Object Classification function of HUSKYLENS 2.
Determine if a recognizable object is present and classified in the current frame.
Get the total number of object detected on the screen.
Retrieves data of the classified object, including object ID and object name based on the pre-trained classification model.

Was this article helpful?

TOP