How carrickcheah/yolo-detection-for-manufacturing works
Box Counter processes conveyor video into tracked object counts and an annotated output video. Its separate model-development workflow extracts frames, creates or auto-generates labels, trains a detector locally or on Modal, and downloads trained weights for counting. The runtime and Modal implementation are sampled; the frame-extraction and manual-labeling scripts are also sampled. The diagram keeps training stages distinct and does not imply they are all required for every run.
Main entry points: train_modal.py Modal Workflow · counter.py Counter Pipeline · train_local.py Local Training · images Training Images
Components 18
Video Counting
- Input Video
data/videos - Counter Pipeline
src/counter.py - YOLO Detector
- ByteTrack
- Line Counter
src/counter.py - Annotated Video
data/videos
Dataset Preparation
- Frame Extraction
scripts/extract_frames.py - Training Images
data/images - Manual Labeling
scripts/label.py - YOLO Labels
data/labels - Dataset Config
dataset.yaml
Model Training
- Modal Workflow
scripts/train_modal.py - Modal Dataset Volume
- YOLO-World Labeling
scripts/train_modal.py - Local Training
scripts/train_local.py - H100 Training
scripts/train_modal.py - Trained Weights
models
Other components
- Operator
Connections 31
- Operator → Counter Pipeline: runs
- Input Video → Counter Pipeline: reads
- Counter Pipeline → YOLO Detector: detects
- Counter Pipeline → ByteTrack: tracks
- Counter Pipeline → Line Counter: updates
- Counter Pipeline → Annotated Video: writes
- Operator → Frame Extraction: runs
- Input Video → Frame Extraction: reads
- Frame Extraction → Training Images: writes
- Operator → Manual Labeling: runs
- Manual Labeling → Training Images: reads
- Manual Labeling → YOLO Labels: writes
- Operator → Modal Workflow: selects action
- Modal Workflow → Training Images: packages
- Modal Workflow → YOLO Labels: packages
- Modal Workflow → Dataset Config: packages
- Modal Workflow → Modal Dataset Volume: uploads
- Modal Workflow → YOLO-World Labeling: dispatches
- YOLO-World Labeling → Modal Dataset Volume: reads images
- YOLO-World Labeling → Modal Dataset Volume: writes labels
- Modal Workflow → H100 Training: dispatches
- H100 Training → Modal Dataset Volume: reads dataset
- H100 Training → Modal Dataset Volume: writes weights
- Modal Workflow → Modal Dataset Volume: downloads weights
- Modal Workflow → Trained Weights: saves
- Operator → Local Training: runs
- Local Training → Dataset Config: reads
- Local Training → Training Images: trains on
- Local Training → YOLO Labels: trains on
- Local Training → Trained Weights: produces
- Trained Weights → Counter Pipeline: loads