How shyamanth-2005/label-studio-setup works
This repository provides two YOLOv8 backends for Label Studio: object detection returns bounding-box annotations, while segmentation returns polygon annotations. In each variant, Label Studio sends setup or prediction requests to a FastAPI service; the service delegates model lifecycle and prediction requests to Label Studio’s ML manager, and the model class loads its configured weights, resolves task images, runs inference, and formats annotations. The README documents both modes and the health endpoint. Relationships shown are supported by the README or sampled source; external library internals are not shown.
Main entry points: app.py Detection Model · app_seg.py Segmentation Model · config.py Model Paths
Components 19
Backend Service
- Detection API
app.py - Detection ML Manager
app.py - Detection Setup
app.py - Detection Predict Route
app.py - Health Check
app.py - Segmentation API
app_seg.py - Segmentation ML Manager
app_seg.py - Segmentation Setup
app_seg.py - Segmentation Predict Route
app_seg.py
Detection Backend
- Detection Model
app.py - Model Paths
config.py - Box Inference
app.py
Segmentation Backend
- Segmentation Model
app_seg.py - Model Paths
config.py - Polygon Inference
app_seg.py
Other components
- Label Studio
- YOLOv8
- Image Path Resolver
- Label Studio ML Framework
Connections 24
- Label Studio → Detection API: sends requests
README.md - Label Studio → Segmentation API: sends requests
README.md - Detection API → Detection ML Manager: initializes
app.py - Detection ML Manager → Detection Model: registers
app.py - Detection Predict Route → Detection ML Manager: requests predictions
app.py - Detection Setup → Detection ML Manager: fetches model
app.py - Detection API → Health Check: serves health
app.py - Detection Model → Model Paths: reads weights
app.py - Detection Model → YOLOv8: loads model
app.py - Detection Model → Image Path Resolver: resolves image
app.py - Detection Model → Box Inference: formats boxes
app.py - Box Inference → YOLOv8: runs prediction
app.py - Segmentation API → Segmentation ML Manager: initializes
app_seg.py - Segmentation ML Manager → Segmentation Model: registers
app_seg.py - Segmentation Predict Route → Segmentation ML Manager: requests predictions
app_seg.py - Segmentation Setup → Segmentation ML Manager: fetches model
app_seg.py - Segmentation API → Health Check: serves health
app_seg.py - Segmentation Model → Model Paths: reads weights
app_seg.py - Segmentation Model → YOLOv8: loads model
app_seg.py - Segmentation Model → Image Path Resolver: resolves image
app_seg.py - Segmentation Model → Polygon Inference: formats polygons
app_seg.py - Polygon Inference → YOLOv8: runs prediction
app_seg.py - Detection ML Manager → Label Studio ML Framework: uses framework
app.py - Segmentation ML Manager → Label Studio ML Framework: uses framework
app_seg.py