How commerry/program-training-model works
Vision Training Platform is a self-hosted object-detection workflow: a user creates a project, imports images, annotates or auto-labels boxes, trains YOLO or Faster R-CNN, then tests models and exports weights. The Vue interface calls Flask routes, which dispatch to filesystem-backed services and isolated training workers. Other documented capabilities include imported-model/video testing, defect-data tools, review analytics, and dataset augmentation. Edges are limited to relationships visible in the supplied excerpts, SOURCE INDEX references, or README; several frontend and route details are not sampled.
Main entry points: app.py Flask application · api/projects.py Project routes · training.py Training lifecycle · services/projects.py Project and annotation storage
Components 28
Web interface
- Vue application
frontend/src/App.vue - Page routing
frontend/src/router/index.js - HTTP client
frontend/src/services/http.js - Project and annotation screens
frontend/src/views/AnnotateView.vue - Training and model screens
frontend/src/views/TrainView.vue
HTTP API
- Authentication routes
backend/api/auth.py - Project routes
backend/api/projects.py - Training routes
backend/api/training.py - Inference routes
backend/api/inference.py
Projects and datasets
- Project and annotation storage
backend/services/projects.py - Dataset preparation and import
backend/services/dataset.py - Dataset augmentation
backend/services/augment.py - Auto-labeling and review
backend/services/autolabel.py - Defect data studio
backend/services/defectlib.py
Model workflows
- Training lifecycle
backend/services/training.py - YOLO worker
backend/training/yolo_worker.py - Faster R-CNN worker
backend/training/frcnn_worker.py - Faster R-CNN engine
backend/training/frcnn_lib.py - Model inference
backend/services/inference.py - ONNX runtime
backend/services/onnxrunner.py - Imported models
backend/services/imported.py - Video analysis jobs
backend/services/videojob.py - Test reporting
backend/services/report.py
Application runtime
- Flask application
backend/app.py - Configuration and paths
backend/config.py - User accounts
backend/models.py - Flask extensions
backend/extensions.py
Other components
- User
Connections 37
- User → Vue application: uses
- Vue application → Page routing: routes through
frontend/src/main.js - Vue application → HTTP client: requests via
- Project and annotation screens → HTTP client: requests via
- Training and model screens → HTTP client: requests via
- HTTP client → Flask application: calls API
- Flask application → Authentication routes: registers
- Flask application → Project routes: registers
- Flask application → Training routes: registers
- Flask application → Inference routes: registers
- Authentication routes → User accounts: authenticates
backend/api/auth.py - Project routes → Project and annotation storage: dispatches
backend/api/projects.py - Project routes → Dataset preparation and import: dispatches
backend/api/projects.py - Project routes → Dataset augmentation: dispatches
backend/api/projects.py - Project routes → Auto-labeling and review: dispatches
backend/api/projects.py - Project routes → Defect data studio: dispatches
backend/api/projects.py - Training routes → Training lifecycle: dispatches
- Inference routes → Model inference: runs detection
backend/api/inference.py - Inference routes → Imported models: manages imports
backend/api/inference.py - Inference routes → Video analysis jobs: manages jobs
backend/api/inference.py - Inference routes → Test reporting: exports results
backend/api/inference.py - Dataset preparation and import → Project and annotation storage: reads project data
backend/services/dataset.py - Dataset augmentation → Project and annotation storage: uses project data
backend/services/augment.py - Auto-labeling and review → Project and annotation storage: reads annotations
backend/services/autolabel.py - Defect data studio → Project and annotation storage: uses project data
backend/services/defectlib.py - Training lifecycle → Project and annotation storage: checks dataset
backend/services/training.py - Training lifecycle → Dataset preparation and import: prepares data
backend/services/training.py - Training lifecycle → Dataset augmentation: configures augmentation
backend/services/training.py - Training lifecycle → YOLO worker: launches worker
- Training lifecycle → Faster R-CNN worker: launches worker
- Faster R-CNN worker → Faster R-CNN engine: uses engine
backend/training/frcnn_worker.py - Model inference → Project and annotation storage: resolves project model
backend/services/inference.py - Model inference → ONNX runtime: runs ONNX
backend/services/inference.py - Imported models → ONNX runtime: uses ONNX
backend/services/imported.py - Flask application → Configuration and paths: loads settings
backend/app.py - Flask application → Flask extensions: initializes
backend/app.py - Flask application → User accounts: creates account table
backend/app.py