Instance Segmentation Example

Instance segmentation blocks let HuskyLens 2 learn objects, then count, locate and identify each instance by ID, name and bounding box data. It’s like giving every object its own label so robots can track them. Users can check if a target appears, get the nearest instance, total instance count, learned class count and per‑ID statistics for precise vision projects.

1.Instance Segmentation Blocks

Before You Start:

1.1 Instance Segmentation - Output Relevant Data

Under the Instance Segmentation function, HUSKYLENS can recognize the class of objects in an image and mark the outline of each object. You can use a program to print the total number of instances recognized by HUSKYLENS, the instance closest to the center, and the Name, ID, center X/Y coordinates, Width, and Height of a specified ID instance.

Example Program:

Interface Diagram

Click 'Run' in Mind+ and wait for the program to upload. HuskyLens 2 will automatically enter the Instance Segmentation function. Point the HuskyLens 2 camera at the instance in the frame to learn it. For detailed instructions on how to learn instances, refer to: Instance Segmentation.

Once learning is complete, aim at the learned instance and observe the output results on the screen.

Output Result: After the program is successfully uploaded, HUSKYLENS 2 will automatically switch to the Instance Segmentation function. Point HUSKYLENS 2 at the object to be recognized (must be one of the 80 classes) and observe the number of recognized instances, the ID of a specific instance, its center point coordinates, and other data.

Interface Diagram

1.2 Get Data for a Specific Instance

Under the Instance Segmentation function, after HUSKYLENS 2 learns, it can acquire data for a specific instance in the frame. For example, it can determine if a learned instance is in the frame, the name of the specified instance, the count of similar instances, and when multiple instances of the same class appear, it can be set to acquire parameters for a specific one, including Name, X/Y coordinates, Width, and Height.

Example Program:

Interface Diagram

Output Result: When multiple instances of the same class appear in the frame, it can recognize the count of instances of that class and output the specified instance's ID, center point coordinates, and other related data.

Interface Diagram

1.3Instance Segmentation Blocks Description

block Description
Acquire tag instance segmentation data once.
Determine if an instance is present in the current frame.
Obtain relevant data of the instance nearest to the screen crosshair, including the instancee's ID, name, center X coordinate, center Y coordinate, width, and height.
Get the total number of instances detected on the screen, including both unregistered and registered instances.
Obtain the relevant data of a specified instance when multiple instances appear.
Get the number of instances that have been learned by HuskyLens 2, regardless of whether they appear in the current frame.
Determine if an instance with the specified ID exists in the frame. Unlearned IDs are uniformly set to 0, and learned IDs are sorted in the order they were learned.
Get the number of instances with a specified ID.
Obtain the number of instances with the specified ID in the current frame.
When multiple instances are detected, retrieve the relevant data of a specified instance.

Was this article helpful?

TOP