Skip to main content

Label Studio Anoter

Label Studio SDK wapper for Create project, Load dataset, Pre-annotation with YOLO Models and Export annotated data

Install

conda create -n label-studio-anoter python=3.10 -y
conda activate label-studio-anoter
pip install label-studio-anoter

Start Label-Studio Docker

docker run -it --rm -p 192.168.3.27:8080:8080 \
       --user root -v $(pwd)/my-label-studio:/label-studio/data \
       --env LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true \
       --env LABEL_STUDIO_LOCAL_FILES_DOCUMENT_ROOT=/label-studio/files \
       -v $(pwd)/my-files:/label-studio/files \
       heartexlabs/label-studio:latest

Quick Start

from label_studio_anoter import LabelStudioAnoter

# Replace with your URL and API KEY
LABEL_STUDIO_URL = 'http://192.168.3.27:8080'
LABEL_STUDIO_API_KEY = 'f8c902ab62bc78bae6fkjfh89rqcb0erwtredca4b2'

label_studio_anoter = LabelStudioAnoter(LABEL_STUDIO_URL, LABEL_STUDIO_API_KEY)

# Check User Details
user = label_studio_anoter.label_studio_user()
# Create project
project_title = "COCO Project"
label_config = """
<View>
    <Image name="img" value="$image" zoom="true" width="100%" maxWidth="800" brightnessControl="true" contrastControl="true" gammaControl="true" />
    <RectangleLabels name="label" toName="img">
        <Label value="person"/>
        <Label value="bottle"/>
        <Label value="spoon"/>
        <Label value="teddy bear"/>
        <Label value="hair drier"/>
        <Label value="toothbrush"/>
    </RectangleLabels>
</View>
"""
project = label_studio_anoter.create_project(project_title, label_config)
# Create label config with classes.txt
path_to_classes = "/path/to/classes.txt"
with open(path_to_classes, 'r') as f:
    class_list = f.read().splitlines()
label_config = label_studio_anoter.generate_label_config_from_classes(class_list)
# Load YOLO Model
label_studio_anoter.load_model("yolo11m.pt")

# Create project with YOLO Model
project = label_studio_anoter.create_project_with_model("YOLOv11 Pre-Annotated Project")

storage = label_studio_anoter.import_data(project, path="/label-studio/files/images")
# Load project from project ID
PROJECT_ID = 20
project = label_studio_anoter.get_project(PROJECT_ID)
# Load YOLO Model
label_studio_anoter.load_model("yolov8n.pt")

# Pre-annotate with YOLO Model
label_studio_anoter.pre_annotate(project, conf=0.25)
# Export to YOLO Format
PROJECT_ID = 23
label_studio_anoter.export_yolo(PROJECT_ID, "Exported_YOLOv11_Project")

Metadata

Release files for label-studio-anoter 1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for label-studio-anoter 1.4
File Size Uploaded
label_studio_anoter-1.4.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for label-studio-anoter 1.4
File Interpreter ABI Platform
label_studio_anoter-1.4-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / label_studio_anoter-1.4.tar.gz

Download URL label_studio_anoter-1.4.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6001122aacb23779415ee3cb5ed1ef73913d18901424d2ed775454e05c3a7eac
BLAKE2b-256 checksum
How to use checksums
7f61e42c6a2bb8ea8e786cdb567ab39911653c3a5417c66a1948d89b41a2997b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / label_studio_anoter-1.4-py3-none-any.whl

Download URL label_studio_anoter-1.4-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99a111bd8b3593aa844d69ae8be7503de475f1e246156e5f060512a912e1e364
BLAKE2b-256 checksum
How to use checksums
00cb7a17eafcb5d75a460f0fc221764739e9fc38dcdbba138397b9c3865e6268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

1.4 This release

2 release files

1.3

2 release files

1.2

2 release files

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page