No project description provided
Project description
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")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file label_studio_anoter-1.4.tar.gz.
File metadata
- Download URL: label_studio_anoter-1.4.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6001122aacb23779415ee3cb5ed1ef73913d18901424d2ed775454e05c3a7eac
|
|
| MD5 |
2d09face981a78957c5151cfc0797b87
|
|
| BLAKE2b-256 |
7f61e42c6a2bb8ea8e786cdb567ab39911653c3a5417c66a1948d89b41a2997b
|
File details
Details for the file label_studio_anoter-1.4-py3-none-any.whl.
File metadata
- Download URL: label_studio_anoter-1.4-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99a111bd8b3593aa844d69ae8be7503de475f1e246156e5f060512a912e1e364
|
|
| MD5 |
ef7df0b1d907f7a5b68e51b0bbefdef2
|
|
| BLAKE2b-256 |
00cb7a17eafcb5d75a460f0fc221764739e9fc38dcdbba138397b9c3865e6268
|