cd backend
python -m venv .venv
# Windows
.venv\Scripts\activate
pip install -r requirements.txtStart backend:
uvicorn main:app --reload --host 127.0.0.1 --port 8000Backend structure:
app/api/routes: FastAPI route moduleshealth.py: Health check endpointsauth.py: Authentication endpointsmodel.py: Legacy model loading and segmentationregistry.py: Model registry management
app/services: service logicmodel_manager.py: Model loading and inferenceregistry.py: Model registry with Supabase persistencemlflow_logger.py: MLflow tracking for model lineage
app/core: configuration and clientsapp/schemas: Pydantic request/response schemasmodels/: Local model artifact storagemlruns/: MLflow tracking directorymigrations/: Database migration files
Health check:
- GET
http://127.0.0.1:8000/health
cd frontend
npm install
npm startOptional API override (defaults to http://127.0.0.1:8000):
set VITE_API_URL=http://127.0.0.1:8000The new model registry allows uploading, managing, and activating models for segmentation.
Upload a model:
POST /registry/models/upload
- Parameters: name, version, description (optional), file
- Returns: ModelRegistryResponse with model ID, metadata
List all models:
GET /registry/models
- Returns: ModelListResponse with all registered models
Get active model:
GET /registry/models/active
- Returns: Currently active ModelRegistryResponse
- Error 503: No active model
Activate a model:
POST /registry/models/{model_id}/activate
- Returns: Activated ModelRegistryResponse
- Note: Deactivates all other models atomically
Delete a model:
DELETE /registry/models/{model_id}
- Returns: Deletion confirmation
- Note: Removes both metadata and artifact files
cd backend
pytest