Skip to content

Cornea: Image Segmentation Skills

SUMMARY

Cornea is a module in the Telekinesis SDK containing skills for 2D image segmentation.

It provides segmentation capabilities using classical computer vision techniques and deep learning models, allowing developers to extract structured visual information from images for robotics applications.

When to Use Cornea?

Use Cornea for robotics applications that require pixel-level understanding of images, such as:

  • Vision-guided pick-and-place pipelines
  • Palletizing and bin organization
  • Object isolation for manipulation and grasp planning
  • Obstacle detection in camera-based navigation
  • Scene understanding for Physical AI agents

What Does Cornea Provide?

Cornea includes a collection of modular skills for:

  • Semantic and instance segmentation
  • Classical image segmentation techniques
  • Deep learning–based segmentation models
  • Image preprocessing and postprocessing for segmentation pipelines

How to Use Cornea?

To use the skills from Cornea, simply use:

python
from telekinesis import cornea

Here is a minimal example:

python
from telekinesis import cornea
from datatypes import datatypes, io

# Load an image
image = io.load_image(filepath=datatypes.String("path/to/image.png"))

# Perform RGB color segmentation
result = cornea.segment_image_using_rgb(
    image=image,
    lower_bound=(0, 0, 100),
    upper_bound=(100, 100, 255),
).to_dict()

# Access the segmentation mask
mask = result['labeled_mask']

Overview of Skills

SDK CallDescription
segment_image_using_rgbPerforms RGB color space segmentation.
segment_image_using_hsvPerforms HSV color space segmentation.
segment_image_using_labPerforms LAB color space segmentation.
segment_image_using_ycrcbPerforms YCrCb color space segmentation.
segment_image_using_flood_fillPerforms flood fill segmentation.
segment_image_using_watershedPerforms watershed segmentation.
segment_image_using_focus_regionSegments the in-focus regions of an image.
segment_image_using_otsu_thresholdPerforms Otsu threshold segmentation.
segment_image_using_local_thresholdPerforms local threshold segmentation.
segment_image_using_yen_thresholdPerforms Yen threshold segmentation.
segment_image_using_thresholdPerforms basic threshold segmentation.
segment_image_using_adaptive_thresholdPerforms adaptive threshold segmentation.
segment_image_using_laplacian_thresholdPerforms Laplacian threshold segmentation.
segment_image_using_felzenszwalbPerforms Felzenszwalb segmentation.
segment_image_using_slic_superpixelPerforms SLIC superpixel segmentation.
filter_segments_by_areaFilters superpixels based on area.
filter_segments_by_colorFilters superpixels based on color.
filter_segments_by_maskFilters superpixels based on a mask.
segment_image_using_grab_cutPerforms GrabCut segmentation.
segment_image_using_foreground_birefnetSegments the foreground using BiRefNet.
segment_image_using_samPerforms segmentation using SAM (Segment Anything Model).