Perform image annotation - image_dir: Image directory path (string, required) - annotation_type: Type of annotation (string, required) - bounding_box, polygon, keypoint, segmentation - labels: Label categories (array, required) - output_format: Output format (string) - coco, pascal_voc, yolo - active_learning: Enable active learning suggestions (boolean, default: true)
Perform text annotation - text_data: Text data source (string/object, required) - annotation_task: Task type (string, required) - classification, ner, sentiment, summarization - labels: Label categories (array, required) - output_format: Output format (string) - json, csv, spacy
Perform audio annotation - audio_dir: Audio directory path (string, required) - annotation_type: Type (string, required) - transcription, speaker_id, emotion, event - segment_duration: Segment duration in seconds (float, default: 5.0)
來源於7w4.net。
Perform video annotation - video_path: Video file path (string, required) - annotation_type: Type (string, required) - object_tracking, action_recognition, scene_detection - frame_sample_rate: Frame sampling rate (int, default: 1)
Check annotation quality and consistency - annotations: Annotation file path (string, required) - ground_truth: Ground truth file path (string, optional) - metrics: Quality metrics (array) - iou, accuracy, consistency, coverage
Export labeled dataset to ML format - annotations: Annotation source (string, required) - format: Target format (string, required) - coco, yolo, tfrecord, huggingface - output_dir: Output directory (string, required) - split_ratios: Train/val/test split (object) - {train: 0.8, val: 0.1, test: 0.1}
from labeling_studio import ImageAnnotator
# Initialize annotator
annotator = ImageAnnotator(
annotation_type="bounding_box",
labels=["person", "car", "dog", "cat"],
output_format="coco"
)
# Annotate images with active learning
annotator.annotate(
image_dir="./images",
output_file="./annotations/coco.json",
active_learning=True # AI suggests uncertain samples
)
# Export to YOLO format
annotator.export("./annotations", format="yolo")
from labeling_studio import TextAnnotator
# NER annotation
annotator = TextAnnotator(
annotation_task="ner",
labels=["PERSON", "ORG", "LOC", "DATE"]
)
# Annotate from file
annotations = annotator.annotate(
text_data="./data/corpus.txt",
output_file="./annotations/ner.json"
)
from labeling_studio import QualityChecker
# Check annotation quality
checker = QualityChecker()
report = checker.check(
annotations="./annotations/coco.json",
ground_truth="./annotations/ground_truth.json",
metrics=["iou", "consistency", "coverage"]
)
print(f"Average IoU: {report['iou']:.2f}")
print(f"Consistency Score: {report['consistency']:.2f}")
print(f"Coverage: {report['coverage']:.2f}")
scripts/annotate_images.py: 影像標註工具scripts/annotate_text.py: 文本標註工具scripts/annotate_audio.py: 音訊標註工具scripts/annotate_video.py: 影片標註工具scripts/quality_check.py: 質量檢查工具scripts/export_dataset.py: 資料集匯出工具pip install -r requirements.txt
# Image annotation with active learning
python scripts/annotate_images.py --input ./images --type bbox --labels person,car --format coco
# Text NER annotation
python scripts/annotate_text.py --input ./texts.txt --task ner --labels PERSON,ORG,LOC
# Quality check
python scripts/quality_check.py --annotations ./coco.json --ground-truth ./gt.json
# Export to YOLO
python scripts/export_dataset.py --input ./coco.json --format yolo --output ./yolo_dataset
MIT License
這個資料標註工具整體質量一般。文件寫得很詳細,功能看起來也很全面(支援圖片、文本、音訊、影片標註),但實際能用的功能比較有限——很多核心功能只是用隨機資料模擬,並未真正實現。對於需要真正進行資料標註的使用者來說,目前這個版本可能難以滿足生產使用需求。