How berkay-durmus/trainstudio works
TrainStudio is a self-hosted image classification and segmentation platform. Its documented user journey runs from dataset selection and validation through model selection, settings, background training, results, and inference. The graph preserves medical-image reading, recommendations, live run monitoring, reports, explainability, and export as distinct capabilities. Several view and integration internals were not sampled; edges between those areas rely on the README’s documented workflow rather than claims of inspected implementation.
Main entry points: base.py Training backends · 1_Dataset.py Dataset setup · 2_Model_Selection.py Model selection · 3_Settings.py Run settings
Components 22
User workflow
- Streamlit app
app.py - Dataset setup
views/1_Dataset.py - Model selection
views/2_Model_Selection.py - Run settings
views/3_Settings.py - Live training
views/4_Training.py - Results view
views/5_Results.py - Inference view
views/6_Inference.py
Dataset handling
- Dataset scan
data/scan.py - Dataset contract
data/spec.py - Image readers
data/readers.py - 2D datasets
data/datasets_2d.py
Training runtime
- Run launcher
core/launcher.py - Worker process
runner.py - Training backends
trainers/base.py - Run event stream
core/events.py
Results and inference
- Metrics reports
metrics/report.py - Prediction and export
export/inference.py - Model explanations
export/explain.py
Core services
- Recommendations
core/recommend.py - Model catalogue
core/registry.py - Hardware detection
core/hardware.py
Other components
- Local user
Connections 24
- Local user → Streamlit app: uses
README.md - Streamlit app → Dataset setup: opens workflow
README.md - Dataset setup → Dataset scan: validates dataset
views/1_Dataset.py - Dataset scan → Dataset contract: checks layout
data/scan.py - Dataset scan → Image readers: samples images
data/scan.py - Dataset setup → Model selection: continues to
README.md - Model selection → Model catalogue: chooses model
- Model selection → Run settings: continues to
README.md - Run settings → Recommendations: requests suggestions
views/3_Settings.py - Run settings → Run launcher: starts run
views/3_Settings.py - Run launcher → Worker process: spawns process
README.md - Worker process → Training backends: dispatches training
runner.py - Training backends → 2D datasets: loads samples
trainers/base.py - 2D datasets → Image readers: reads images
data/datasets_2d.py - Training backends → Run event stream: emits events
trainers/base.py - Live training → Run event stream: reads progress
views/4_Training.py - Live training → Results view: continues to
README.md - Training backends → Metrics reports: writes reports
metrics/report.py - Results view → Metrics reports: shows results
README.md - Results view → Inference view: continues to
README.md - Inference view → Prediction and export: runs predictions
views/6_Inference.py - Inference view → Model explanations: requests explanations
README.md - Prediction and export → Image readers: reads input
export/inference.py - Recommendations → Hardware detection: uses device data
core/recommend.py