How holyjason/yolo11-seg works
This is a real-time YOLOv11 instance-segmentation application for RealSense depth cameras. Its workflow selects a model at startup, initializes the camera and segmentor, captures aligned color/depth frames, queues frames for inference, visualizes segmentation and depth, then displays interactive views and supports saving a frame. Camera capture and model inference run in separate threads; FPS counters provide a supporting metrics layer. The README documents D415/D455 support, but sampled camera code specifically implements D455. Edges reflect shown calls; external device and model-runtime details are represented only where evidenced.
Main entry points: instance_segmentation_app.py Runtime controller · realsense_d455.py RealSense capture · main.py Model selection · yolov11_segmentation.py YOLOv11 inference
Components 14
Application entry
- Model selection
main.py - Runtime controller
app/instance_segmentation_app.py
Live processing
- RealSense capture
camera/realsense_d455.py - Frame queue
app/instance_segmentation_app.py - Result queue
app/instance_segmentation_app.py - Interactive display
app/instance_segmentation_app.py
Vision components
- YOLOv11 inference
segmentation/yolov11_segmentation.py - Segmentation renderer
segmentation/segmentation_visualizer.py - Depth-map view
segmentation/segmentation_visualizer.py
Performance metrics
- FPS counters
utils/fps_counter.py
Other components
- Operator
- RealSense camera
- Ultralytics runtime
- Saved image
Connections 16
- Operator → Model selection: starts
README.md - Model selection → Runtime controller: creates and runs
main.py - Runtime controller → RealSense capture: initializes and captures
app/instance_segmentation_app.py - RealSense capture → RealSense camera: reads frames
camera/realsense_d455.py - RealSense capture → Frame queue: enqueues frames
app/instance_segmentation_app.py - Frame queue → Runtime controller: provides frames
app/instance_segmentation_app.py - Runtime controller → YOLOv11 inference: runs segmentation
app/instance_segmentation_app.py - YOLOv11 inference → Ultralytics runtime: invokes inference
segmentation/yolov11_segmentation.py - Runtime controller → Segmentation renderer: renders results
app/instance_segmentation_app.py - Runtime controller → FPS counters: updates and reads
app/instance_segmentation_app.py - Segmentation renderer → Result queue: returns rendered frame
app/instance_segmentation_app.py - Runtime controller → Result queue: enqueues display data
app/instance_segmentation_app.py - Result queue → Interactive display: provides results
app/instance_segmentation_app.py - Interactive display → Depth-map view: creates depth view
app/instance_segmentation_app.py - Interactive display → Operator: shows modes
app/instance_segmentation_app.py - Interactive display → Saved image: saves frame
app/instance_segmentation_app.py