🦀 ClawHub
Data Labeling Studio
by @kaiyuelv
Intelligent toolkit for annotating images, text, audio, and video with active learning, quality control, and exporting labeled datasets.
💡 Examples
Image Annotation
from labeling_studio import ImageAnnotatorInitialize 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")
Text Annotation
from labeling_studio import TextAnnotatorNER 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"
)
Quality Check
from labeling_studio import QualityCheckerCheck 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}")
TERMINAL
clawhub install data-labeling-studio