Introduction
Preparing high-quality training data is often the most tedious part of any computer vision project. Developers frequently struggle with fragmented tools that don’t integrate well with their existing JavaScript or TypeScript workflows. LabelBee, an open-source annotation library with a strong foundation in the OpenMMLab ecosystem, provides a professional-grade set of rendering and component libraries to help developers build custom annotation applications quickly. By offering both a standalone client and a modular SDK, it bridges the gap between raw image data and model-ready datasets.
What Is LabelBee?
LabelBee is a specialized annotation library designed to provide the core rendering and component logic for image labeling tools. Developed by OpenMMLab, it is written primarily in TypeScript and released under the Apache License 2.0. Unlike a simple standalone app, LabelBee functions as a framework that allows developers to embed professional annotation capabilities—such as bounding boxes, polygons, and keypoints—directly into their own business systems or internal tools.
The project is split into several key components, including the @labelbee/lb-utils library for data conversion and style management, and a client version that provides an out-of-the-box experience for those who need to start labeling immediately without writing code.
Why LabelBee Matters
For many AI teams, the bottleneck in model performance isn’t the architecture, but the quality of the ground truth data. Traditional annotation tools are often monolithic and hard to customize. LabelBee matters because it provides a modular approach, allowing developers to pick only the tools they need—such as the rectTool for object detection or the polygonTool for semantic segmentation—and integrate them into a custom UI.
Because it is part of the OpenMMLab ecosystem, it aligns with the standards used by many researchers and practitioners in the computer vision field. This reduces the friction of moving data from the annotation phase to the training phase, making it an essential tool for teams building specialized vision models for autonomous driving, medical imaging, or industrial inspection.
Key Features
- Modular Annotation Tools: Built-in support for six essential tools, including the Frame pulling tool, Label tool, Punctuation (Point) tool, Line tool, Polygon tool, and Text tools.
- Flexible Tool Combinations: Multiple annotation tools can rely on each other, allowing for complex, multi-step labeling workflows where one tool’s output serves as the input for another.
- Cross-Platform Compatibility: The client version is developed using Web technology and simulates a browser environment, ensuring it runs seamlessly on Windows, Linux, and macOS.
- Standardized Data Formats: Native support for exporting results to widely used formats like COCO, COCO-Text, and ADE20k, ensuring compatibility with most ML frameworks.
- Customizable Rendering: Through the
@labelbee/lb-utilslibrary, developers can programmatically control the stroke, fill, and opacity of annotation shapes based on their specific data attributes. - Mask-to-Color Conversion: The
ImgConversionUtilsutility allows for the efficient conversion of single-channel masks into color maps, which is critical for visualizing semantic segmentation results. - SDK Integration: Provides a Version SDK that allows for complete access to documentation and flexible configuration for embedding into existing business systems.
- Out-of-the-Box Client: A standalone desktop application that allows users to start labeling images locally without any complex setup.
How LabelBee Compares
When evaluating LabelBee, it is important to distinguish between a full-featured platform and a developer-centric library. While tools like CVAT and Label Studio are comprehensive platforms, LabelBee is designed as a library to help you build your own tool.
| Feature | LabelBee | CVAT | Label Studio |
|---|---|---|---|
| Primary Purpose | Developer Library/SDK | Full Annotation Platform | Multi-modal Platform |
| Deployment | Embedded/SDK or Client | Docker/Self-hosted | Docker/SaaS |
| Customization | High (Code-level) | Medium (Config-level) | High (XML-based) |
| Focus | Computer Vision | Computer Vision | Computer Vision |
The primary differentiator for LabelBee is its modularity. If you are a developer who needs to integrate a bounding box tool into an existing internal dashboard, you wouldn’t want to deploy a whole CVAT instance; instead, you would use LabelBee’s SDK. Conversely, if you need a complete project management system for a large team of annotators, CVAT or Label Studio are better choices. LabelBee is the right choice when the annotation tool is a feature of your application, rather than the application itself.
Getting Started: Installation
Depending on your needs, you can use LabelBee as a library in your project or as a standalone client.
Using as a Library (npm)
To integrate the utility functions and style converters, install the @labelbee/lb-utils package:
npm install @labelbee/lb-utils
Using the Annotation Components
To use the core annotation and component libraries, install the following packages:
npm install @labelbee/lb-annotation
npm install @labelbee/lb-components
Using the Standalone Client
The LabelBee client can be downloaded as a pre-compiled binary for Windows, Linux, and macOS. Simply download the release, decompress the folder, and run the executable to start labeling locally.
How to Use LabelBee
For developers using the SDK, the workflow typically involves initializing the annotation tool and defining the data format. LabelBee uses a structured JSON format for its results, which allows for precise tracking of tool names and coordinates.
A typical workflow starts with loading an image and attaching a specific tool (e.g., rectTool). The user interacts with the canvas, and LabelBee handles the rendering of the shapes and the event listeners. Once the annotation is complete, the result is exported as a JSON object containing the width, height, and the results of each labeling step.
Code Examples
The following examples demonstrate how to use the @labelbee/lb-utils library for style management and image conversion.
Example 1: Managing Annotation Styles
You can use the toolStyleConverter to programmatically determine the color and opacity of a shape based on a configuration object.
import { toolStyleConverter } from '@labelbee/lb-utils';
const styleConfig = {
borderOpacity: 1,
fillOpacity: 0.2,
colorIndex: 0,
};
// Get the style for a basic shape
const style = toolStyleConverter.getColorFromConfig(
{}, // result object
{}, // rectConfig object
styleConfig
);
console.log(style); // { stroke: '#...', fill: '#...' }
Example 2: Converting Masks to Color Maps
This is essential for visualizing semantic segmentation masks which are often stored as single-channel images.
import { ImgConversionUtils } from '@labelbee/lb-utils';
const maskSrc = 'https://example.com/mask.png';
const basicImgSrc = 'https://example.com/image.jpg';
ImgConversionUtils.getColorMapBySingleChannelMask(maskSrc, basicImgSrc)
.then(newImg => {
console.log('Converted Image:', newImg);
});
Real-World Use Cases
LabelBee shines in scenarios where a generic tool is not enough and a custom-built annotation interface is required.
- Custom Internal Tooling: An AI company building a proprietary dataset for autonomous driving may use LabelBee to embed a polygon tool directly into their data management dashboard, ensuring that annotators only see the relevant metadata for their specific project.
- Medical Imaging Pipelines: A research team developing a model for tumor detection may use the
ImgConversionUtilsto visualize single-channel masks from MRI scans, allowing experts to verify the segmentation results visually before they are exported to COCO format. - OCR Dataset Creation: A developer creating a text recognition system for invoices may use the
textToolto define bounding boxes around text regions and transcribe the text directly within the tool, streamlining the process of creating paired image-text datasets. - Industrial Inspection: A quality control team using computer vision for defect detection on assembly lines may use the
rectToolto mark defects in high-resolution images, exporting the results to a standardized format for training a YOLO-style object detection model.
Contributing to LabelBee
LabelBee is an open-source project under the Apache 2.0 license. Contributions are welcome and encouraged. Developers can contribute by reporting bugs via GitHub Issues, suggesting new features in the form of a feature request, or submitting pull requests to improve the core rendering logic or add new annotation tools.
The project follows standard GitHub flow for contributions. New contributors should check for existing issues labeled as “good first issue” to get started with the project’s codebase.
Community and Support
The primary hub for LabelBee is LabelBee’s GitHub repository. Since it is part of the OpenMMLab ecosystem, it benefits from the same community standards and quality of documentation. Support is primarily handled through GitHub Discussions and the OpenMMLab community forums.
Developers can track the latest releases and the project’s activity level through the GitHub releases page, ensuring they are using the latest version of the SDK for their stability and performance improvements.
Conclusion
LabelBee is a powerful choice for developers who need professional-grade annotation capabilities without building a rendering engine from scratch. By providing a modular SDK and a standalone client, it allows teams to move from raw images to structured datasets with high efficiency. It is the right choice when you need a customizable, embeddable tool that integrates with the OpenMMLab ecosystem.
If you are building a custom AI data pipeline, we recommend starting with the @labelbee/lb-utils library to handle your data conversion and style management, then exploring the lb-annotation components for your UI. Star the repo, try the quickstart, and join the OpenMMLab community.
What is LabelBee and what problem does it solve?
LabelBee is an open-source annotation library that provides the core rendering and component logic for building image labeling tools. It solves the problem of developers having to build complex canvas rendering and event handling logic from scratch when they need to integrate annotation capabilities into their own applications.
How do I install LabelBee as a library?
You can install the utility library using npm install @labelbee/lb-utils. For the core annotation components, you can use npm install @labelbee/lb-annotation and npm install @labelbee/lb-components.
Does LabelBee support COCO format?
Yes, LabelBee supports exporting results to the COCO format, which is a widely used standard for object detection and segmentation tasks in computer vision.
Can I use LabelBee for video annotation?
While LabelBee is primarily focused on image annotation, its modular architecture allows for developers to extend it to handle frame-by-frame labeling of video sequences, as seen in some of its tool capabilities like the Frame pulling tool.
How does LabelBee compare to CVAT?
LabelBee is a developer-centric library and SDK, whereas CVAT is a full-featured annotation platform. LabelBee is best used when you want to embed annotation tools into your own application, while CVAT is a full standalone application for managing labeling projects.
Can I use LabelBee for semantic segmentation?
LabelBee provides a polygonTool and ImgConversionUtils for converting masks to color maps, making it a professional choice for semantic segmentation workflows.
What license does LabelBee use?
LabelBee is released under the Apache License 2.0, which allows for both personal and commercial use of the library in your project.
