{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/manifest.json":{"get":{"tags":["General"],"summary":"Send Manifest","description":"Get the engine manifest with available hyperparameters and feature flags.\n\nReturns the complete manifest describing all configurable hyperparameters,\ntheir types, default values, and descriptions for training and inference.\n\n**Returns:**\nJSON object containing:\n- **manifest_version**: Manifest schema version number\n- **api_version**: API compatibility version\n- **training**: Training feature flags\n    - **enabled**: Whether training is supported\n    - **azure_upload_enabled**: Whether Azure checkpoint upload is enabled\n- **inference**: Inference feature flags\n    - **azure_blob_enabled**: Whether Azure blob inference is supported\n- **tensorboard**: TensorBoard feature flags\n    - **enabled**: Whether TensorBoard is available\n- **hyperparameters**: Dictionary of all configurable parameters, each containing:\n    - **type**: Parameter data type (String, Integer, Float, Boolean, Array)\n    - **default_value**: Default value if not specified\n    - **description**: Human-readable parameter description\n\n**Available Hyperparameters Include:**\n- Model configuration (task, model_variant, class_mappings)\n- Training settings (epochs, batch_size, learning rates, grad_accum_steps)\n- Inference settings (confidence thresholds, resolution)\n- Hardware settings (device)\n\n**Use Case:**\n- Discover available configuration options dynamically\n- Build configuration UIs without hardcoding parameters\n- Check feature availability before making requests\n- Validate hyperparameter types and defaults\n\n**Example Response Structure:**\n```json\n{\n    \"manifest_version\": 1,\n    \"api_version\": 2,\n    \"training\": {\"enabled\": true},\n    \"hyperparameters\": {\n        \"epochs\": {\n            \"type\": \"Integer\",\n            \"default_value\": 10,\n            \"description\": \"Number of training epochs\"\n        }\n    }\n}\n```","operationId":"send_manifest_manifest_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/engine-state":{"get":{"tags":["General"],"summary":"Get Engine State","description":"Get comprehensive RF-DETR engine state and configuration information.\n\nReturns detailed information about the current engine state, loaded model,\nactive hyperparameters, hardware configuration, and detected classes.\n\n**Returns:**\n- **engine_type**: Engine type (always \"DETR\")\n- **engine_state**: Current state - \"Training\", \"Inference\", or \"Idle\"\n- **device_in_use**: Active compute device - \"CPU\" or \"CUDA\"\n- **supported_devices**: List of available devices [\"CPU\", \"CUDA\", \"MPS\"]\n- **active_hyperparameters**: Complete hyperparameters dictionary (if model loaded)\n- **model_context**: RF-DETR model metadata such as class_names and num_classes (if available)\n- **classes**: List of class labels from class_mappings (if available)\n- **model_variant**: RF-DETR model variant - \"Nano\", \"Small\", \"Medium\", \"Base\",\n  or \"Large\" (if available)\n- **model_type**: Task type - \"segmentation\" or \"object detection\" (if available)\n- **iteration**: Model iteration string from metadata (if available)\n\n**Engine States:**\n- **Training**: Model is currently training\n- **Inference**: Model is loaded and ready for inference\n- **Idle**: No model loaded, engine is idle\n\n**Model Variants:**\n- **Nano**: Fastest (384px resolution)\n- **Small**: Small (512px resolution)\n- **Medium**: Medium/Recommended (576px resolution)\n- **Base**: Base (deprecated, 560px resolution)\n- **Large**: Largest/Most accurate (560px resolution)\n\n**Use Case:**\nUse this endpoint to check engine status before sending requests,\ndiscover loaded classes, and verify hardware configuration.\n\n**Example Response:**\n```json\n{\n    \"engine_type\": \"DETR\",\n    \"engine_state\": \"Inference\",\n    \"device_in_use\": \"CUDA\",\n    \"supported_devices\": [\"CPU\", \"CUDA\", \"MPS\"],\n    \"model_variant\": \"Medium\",\n    \"model_type\": \"object detection\",\n    \"classes\": [\"person\", \"car\", \"dog\"],\n    \"active_hyperparameters\": {...}\n}\n```","operationId":"get_engine_state_engine_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/training/start-model-training":{"post":{"tags":["Training"],"summary":"Model Training Route","description":"Start a new RF-DETR model training session.\n\nInitiates a background training task with the provided datasets and hyperparameters.\nEach training session is assigned a unique UUID and data is stored in isolated directories.\n\n**Parameters:**\n- **image_dataset**: ZIP file containing image-dataset.json (training data in AI.SEE format)\n- **hyperparameters**: Optional JSON string with training configuration parameters\n- **model_uuid**: Optional UUID used to tag Azure-uploaded epoch artifacts.\n  Generated automatically if omitted.\n- **test_image_dataset**: Optional ZIP file containing image-dataset.json (validation data)\n\n**Returns:**\n- `True` if training started successfully\n\n**Raises:**\n- `400`: Training already running, invalid zip file, or missing image-dataset.json\n- `500`: Internal server error during training setup","operationId":"model_training_route_training_start_model_training_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_model_training_route_training_start_model_training_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/get-trained-model":{"get":{"tags":["Training"],"summary":"Get Trained Model Route","description":"Download trained model checkpoint for a specific epoch.\n\nReturns a ZIP file containing the model weights and configuration files\nfor the specified training epoch.\n\n**Parameters:**\n- **epoch**: Epoch number to retrieve (e.g., \"5\", \"best\", \"last\")\n\n**Returns:**\n- ZIP file containing model checkpoint and related files\n\n**Raises:**\n- `500`: Internal server error while creating or retrieving the model file","operationId":"get_trained_model_route_training_get_trained_model_get","parameters":[{"name":"epoch","in":"query","required":true,"schema":{"type":"string","title":"Epoch"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/get-trained-model-azure":{"get":{"tags":["Training"],"summary":"Handle Trained Model File Azure","description":"Get trained model metadata from Azure Storage for a specific epoch.\n\nReturns information about the trained model checkpoint that was uploaded to Azure,\nincluding blob name, container, and other metadata.\n\n**Parameters:**\n- **epoch**: Epoch number to retrieve metadata for\n\n**Returns:**\n- JSON object containing Azure blob information and epoch metadata\n\n**Raises:**\n- `404`: No data found for the specified epoch\n- `500`: Internal server error while retrieving epoch data\n\n**Note:** POST method is deprecated and will be removed in future releases.","operationId":"handle_trained_model_file_azure_training_get_trained_model_azure_get","parameters":[{"name":"epoch","in":"query","required":true,"schema":{"type":"integer","title":"Epoch"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/upload-trained-model-file-azure":{"post":{"tags":["Training"],"summary":"Handle Trained Model File Azure","description":"Get trained model metadata from Azure Storage for a specific epoch.\n\nReturns information about the trained model checkpoint that was uploaded to Azure,\nincluding blob name, container, and other metadata.\n\n**Parameters:**\n- **epoch**: Epoch number to retrieve metadata for\n\n**Returns:**\n- JSON object containing Azure blob information and epoch metadata\n\n**Raises:**\n- `404`: No data found for the specified epoch\n- `500`: Internal server error while retrieving epoch data\n\n**Note:** POST method is deprecated and will be removed in future releases.","operationId":"handle_trained_model_file_azure_training_upload_trained_model_file_azure_post","parameters":[{"name":"epoch","in":"query","required":true,"schema":{"type":"integer","title":"Epoch"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/get-status":{"get":{"tags":["Training"],"summary":"Get Status Training Route","description":"Get the current training status and progress.\n\nReturns real-time information about the training session including current epoch,\ntraining metrics, and overall status.\n\n**Returns:**\n- **epoch**: Current training epoch number\n- **saved_epoch**: Last epoch saved to Azure (if applicable)\n- **status**: Training status message with metrics (or \"not yet started\", \"finished\")\n- **process_id**: Unique process identifier for this engine instance\n\n**Raises:**\n- `500`: Internal server error while fetching status","operationId":"get_status_training_route_training_get_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/training/stop-training":{"post":{"tags":["Training"],"summary":"Stop Training Route","description":"Stop the currently running training session.\n\nSends a stop signal to the training process and resets all training state variables.\nThe `detr_output` directory and training logs are preserved.\n\n**Returns:**\n- **success**: Boolean indicating if training was stopped successfully\n- **message**: Descriptive message about the operation result\n- **process_id**: Unique process identifier for this engine instance\n\n**Raises:**\n- `500`: Internal server error while stopping training","operationId":"stop_training_route_training_stop_training_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/training/get-tensorboard-data":{"get":{"tags":["Training"],"summary":"Get Tensorboard Data Route","description":"Download TensorBoard training logs and metrics.\n\nReturns a ZIP file containing all TensorBoard event files, metrics, and logs\ngenerated during the training session.\n\n**Returns:**\n- ZIP file containing TensorBoard logs directory\n\n**Use Case:**\nDownload these logs to visualize training metrics offline using TensorBoard:\n```bash\ntensorboard --logdir=extracted_logs\n```","operationId":"get_tensorboard_data_route_training_get_tensorboard_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/inference/set-trained-model":{"post":{"tags":["Inference"],"summary":"Set Trained Model Route","description":"Load a trained RF-DETR model for inference from an uploaded ZIP file.\n\nSets up the inference engine with a trained model and its configuration.\nThe model must be in a ZIP file containing model weights and hyperparameters.\n\n**Parameters:**\n- **trained_model**: ZIP file containing the trained model checkpoint\n  (`.pth`, `.pt`, or `.ckpt`) and `hyperparameters.json`\n- **hyperparameters**: JSON string with model configuration and inference settings\n\n**Returns:**\n- `True` if model loaded successfully\n\n**Raises:**\n- `500`: Model loading already in progress or internal error","operationId":"set_trained_model_route_inference_set_trained_model_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_set_trained_model_route_inference_set_trained_model_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/set-trained-model-azure":{"post":{"tags":["Inference"],"summary":"Set Trained Model Azure Route","description":"Load a trained RF-DETR model for inference from Azure Blob Storage.\n\nDownloads and configures the inference engine with a model stored in Azure.\nRequires Azure Storage credentials and blob name.\n\n**Parameters:**\n- **trained_model_blob_name**: Name of the blob containing the trained model ZIP file\n- **hyperparameters**: Optional JSON string with model configuration\n- **azure_config**: JSON string with Azure Storage credentials (account, access_key,\n  container, and optional blob_endpoint for self-hosted Azure-compatible storage)\n\n**Returns:**\n- `True` if model loaded successfully\n\n**Raises:**\n- `500`: Model loading already in progress or internal error\n\n**Example azure_config:**\n```json\n{\n    \"account\": \"mystorageaccount\",\n    \"access_key\": \"key==\",\n    \"container\": \"models\",\n    \"blob_endpoint\": null\n}\n```\n\nSet `blob_endpoint` to the full base URL (e.g.\n`https://storage.aisee.software/mystorageaccount`) when targeting a\nself-hosted Azure-compatible storage; leave it `null` for real Azure.","operationId":"set_trained_model_azure_route_inference_set_trained_model_azure_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_trained_model_azure_route_inference_set_trained_model_azure_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/predict-image":{"post":{"tags":["Inference"],"summary":"Predict Image Route","description":"Run inference on an uploaded image.\n\nPerforms object detection/segmentation on the uploaded image using the loaded model.\nReturns predictions with bounding boxes, masks, confidence scores, and class IDs.\n\n**Parameters:**\n- **image**: Image file to run inference on (JPEG, PNG, etc.)\n\n**Returns:**\n- JSON object containing:\n    - **bboxes**: List of bounding boxes [x1, y1, x2, y2]\n    - **masks**: List of segmentation masks (if applicable)\n    - **confidence**: List of confidence scores\n    - **class_ids**: List of detected class IDs\n    - **image_shape**: Original image dimensions\n\n**Raises:**\n- `400`: No image provided\n- `500`: Inference error or model not loaded\n\n**Note:** Results are also saved to disk in the RESULTS_FOLDER.","operationId":"predict_image_route_inference_predict_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_predict_image_route_inference_predict_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/predict-image-azure":{"post":{"tags":["Inference"],"summary":"Predict Image Azure Route","description":"Run inference on an image stored in Azure Blob Storage.\n\nDownloads the image from Azure and performs object detection/segmentation.\nRequires Azure adapter to be initialized via `/set-trained-model-azure`.\n\n**Parameters:**\n- **image_blob_name**: Name of the blob containing the image file\n\n**Returns:**\n- JSON object containing:\n    - **bboxes**: List of bounding boxes [x1, y1, x2, y2]\n    - **masks**: List of segmentation masks (if applicable)\n    - **confidence**: List of confidence scores\n    - **class_ids**: List of detected class IDs\n    - **image_shape**: Original image dimensions\n\n**Raises:**\n- `400`: No image blob name provided or Azure adapter not initialized\n- `500`: Inference error or Azure download failed\n\n**Note:** Temporary files are automatically cleaned up after inference.","operationId":"predict_image_azure_route_inference_predict_image_azure_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_predict_image_azure_route_inference_predict_image_azure_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/get-status":{"get":{"tags":["Inference"],"summary":"Get Status Inference Route","description":"Get the current inference engine status and configuration.\n\nReturns information about the loaded model, hyperparameters, and inference state.\n\n**Returns:**\n- **model_loaded**: Boolean indicating if a model is loaded\n- **hyperparameters**: Current inference configuration settings\n- **model_info**: Information about the loaded model (if available)\n- **process_id**: Unique process identifier for this engine instance\n\n**Use Case:**\nCheck if the inference engine is ready before sending prediction requests.","operationId":"get_status_inference_route_inference_get_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/export":{"post":{"tags":["Export"],"summary":"Export Model","description":"Export a trained RF-DETR model to ONNX format (and optionally TensorRT).\n\nConverts a trained RF-DETR checkpoint (.pth, .pt, or .ckpt) to ONNX format for deployment.\nSupports TensorRT conversion for optimized inference.\n\n**Returns:**\n- ZIP file containing:\n    - Exported ONNX model file (.onnx)\n    - TensorRT engine file (.engine) if tensorrt=true\n    - Updated hyperparameters.json with export settings\n\n**Raises:**\n- `400`: Missing input (no url or file), invalid ZIP, missing checkpoint file, or\n  invalid shape format\n- `500`: Download error, export failure, TensorRT conversion failure, or internal error\n\n**Note:** Old exports are automatically cleaned up to save disk space (max 10 exports kept).","operationId":"export_model_export_post","parameters":[{"name":"url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL to download model ZIP file from (mutually exclusive with uploaded_zip). The ZIP must contain a model checkpoint (.pth, .pt, or .ckpt) and hyperparameters.json file.","examples":["https://example.com/model.zip"],"title":"Url"},"description":"URL to download model ZIP file from (mutually exclusive with uploaded_zip). The ZIP must contain a model checkpoint (.pth, .pt, or .ckpt) and hyperparameters.json file."},{"name":"backbone_only","in":"query","required":false,"schema":{"type":"boolean","description":"Export only the backbone (feature extractor) without the detection head. Useful for transfer learning or when you need just the feature extraction part of the model.","default":false,"title":"Backbone Only"},"description":"Export only the backbone (feature extractor) without the detection head. Useful for transfer learning or when you need just the feature extraction part of the model."},{"name":"batch_size","in":"query","required":false,"schema":{"type":"integer","description":"Batch size for ONNX export. The exported model will expect this batch size during inference. Use 1 for dynamic batching compatibility.","examples":[1,4,8],"default":1,"title":"Batch Size"},"description":"Batch size for ONNX export. The exported model will expect this batch size during inference. Use 1 for dynamic batching compatibility."},{"name":"opset_version","in":"query","required":false,"schema":{"type":"integer","description":"ONNX opset version. Higher versions support more operations but may have less runtime compatibility. Version 17 is recommended for best balance of features and compatibility.","examples":[17,16,15],"default":17,"title":"Opset Version"},"description":"ONNX opset version. Higher versions support more operations but may have less runtime compatibility. Version 17 is recommended for best balance of features and compatibility."},{"name":"shape","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override input shape as 'height,width'. Leave empty to use the training resolution from hyperparameters.json (recommended — it is always valid). If overriding, both dimensions must be divisible by the model's patch_size * num_windows (e.g. 32 for Nano/Small, which use patch_size 16). RF-DETR rejects invalid shapes at export time.","examples":["384,384","576,576","672,672"],"title":"Shape"},"description":"Override input shape as 'height,width'. Leave empty to use the training resolution from hyperparameters.json (recommended — it is always valid). If overriding, both dimensions must be divisible by the model's patch_size * num_windows (e.g. 32 for Nano/Small, which use patch_size 16). RF-DETR rejects invalid shapes at export time."},{"name":"verbose","in":"query","required":false,"schema":{"type":"boolean","description":"Enable verbose logging during ONNX export. Shows detailed information about the export process including tensor shapes and operations.","default":true,"title":"Verbose"},"description":"Enable verbose logging during ONNX export. Shows detailed information about the export process including tensor shapes and operations."},{"name":"tensorrt","in":"query","required":false,"schema":{"type":"boolean","description":"Convert ONNX model to TensorRT engine (.engine) for optimized GPU inference. Requires NVIDIA GPU and TensorRT installed. Significantly faster inference but GPU-specific.","default":false,"title":"Tensorrt"},"description":"Convert ONNX model to TensorRT engine (.engine) for optimized GPU inference. Requires NVIDIA GPU and TensorRT installed. Significantly faster inference but GPU-specific."},{"name":"tensorrt_fp16","in":"query","required":false,"schema":{"type":"boolean","description":"Use FP16 precision for TensorRT engine. Faster inference with minimal accuracy loss. Disable for FP32 if precision is critical.","default":true,"title":"Tensorrt Fp16"},"description":"Use FP16 precision for TensorRT engine. Faster inference with minimal accuracy loss. Disable for FP32 if precision is critical."}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_export_model_export_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tensorboard/status":{"get":{"tags":["TensorBoard"],"summary":"Tensorboard Status","description":"Check if TensorBoard is running and ready.\n\nReturns the current status of the TensorBoard process and whether it's\naccepting connections.\n\n**Returns:**\n- **running**: Boolean indicating if TensorBoard process is running\n- **ready**: Boolean indicating if TensorBoard is ready to accept requests\n- **url**: TensorBoard URL path (if ready), otherwise None\n- **message**: Human-readable status message\n\n**Possible States:**\n- Ready: TensorBoard is fully operational\n- Starting up: Process running but not yet accepting connections\n- Not running: TensorBoard process is stopped","operationId":"tensorboard_status_tensorboard_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tensorboard/start":{"post":{"tags":["TensorBoard"],"summary":"Tensorboard Start","description":"Manually start the TensorBoard server.\n\nLaunches TensorBoard to visualize training metrics and logs. The server\nwill monitor the 'detr_output' directory for training events.\n\n**Returns:**\n- **status**: \"started\" if successful\n- **url**: Path to access TensorBoard UI (\"/tensorboard/\")\n\n**Raises:**\n- `500`: Failed to start TensorBoard process\n\n**Note:**\n- TensorBoard starts automatically when training begins\n- Access the UI at `/tensorboard/` after starting\n- Waits up to 10 seconds for TensorBoard to be ready","operationId":"tensorboard_start_tensorboard_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/tensorboard/stop":{"post":{"tags":["TensorBoard"],"summary":"Tensorboard Stop","description":"Manually stop the TensorBoard server.\n\nGracefully terminates the TensorBoard process. If graceful shutdown fails,\nforcefully kills the process after 5 seconds.\n\n**Returns:**\n- **status**: \"stopped\"\n\n**Note:**\n- Training logs in the 'detr_output' directory are preserved\n- TensorBoard can be restarted using `/tensorboard/start`\n- Safe to call even if TensorBoard is not running","operationId":"tensorboard_stop_tensorboard_stop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/font-roboto/{path}":{"get":{"tags":["TensorBoard"],"summary":"Tensorboard Font Proxy","description":"Proxy font asset requests to TensorBoard.\n\nInternal route used by the TensorBoard UI to load Roboto font files.\nThis is a workaround for the path_prefix font loading issue in TensorBoard.\n\n**Note:** This is an internal proxy route, not intended for direct use.","operationId":"tensorboard_font_proxy_font_roboto__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tensorboard/{path}":{"post":{"tags":["TensorBoard"],"summary":"Tensorboard Proxy","description":"Access the TensorBoard web interface.\n\nProxies all requests to the TensorBoard server running on localhost:6006.\nNavigate to `/tensorboard/` in your browser to view training visualizations.\n\n**Supported Methods:** GET, POST, PUT, DELETE, PATCH\n\n**Raises:**\n- `503`: TensorBoard is not running or still starting up\n- `502`: Failed to connect to TensorBoard backend\n\n**Use Case:**\nAccess this endpoint in your browser to view:\n- Training/validation loss curves\n- Model architecture graphs\n- Learning rate schedules\n- Custom metrics and histograms\n\n**Example:** Navigate to `http://your-server/tensorboard/` to view the dashboard.","operationId":"tensorboard_proxy","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["TensorBoard"],"summary":"Tensorboard Proxy","description":"Access the TensorBoard web interface.\n\nProxies all requests to the TensorBoard server running on localhost:6006.\nNavigate to `/tensorboard/` in your browser to view training visualizations.\n\n**Supported Methods:** GET, POST, PUT, DELETE, PATCH\n\n**Raises:**\n- `503`: TensorBoard is not running or still starting up\n- `502`: Failed to connect to TensorBoard backend\n\n**Use Case:**\nAccess this endpoint in your browser to view:\n- Training/validation loss curves\n- Model architecture graphs\n- Learning rate schedules\n- Custom metrics and histograms\n\n**Example:** Navigate to `http://your-server/tensorboard/` to view the dashboard.","operationId":"tensorboard_proxy","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["TensorBoard"],"summary":"Tensorboard Proxy","description":"Access the TensorBoard web interface.\n\nProxies all requests to the TensorBoard server running on localhost:6006.\nNavigate to `/tensorboard/` in your browser to view training visualizations.\n\n**Supported Methods:** GET, POST, PUT, DELETE, PATCH\n\n**Raises:**\n- `503`: TensorBoard is not running or still starting up\n- `502`: Failed to connect to TensorBoard backend\n\n**Use Case:**\nAccess this endpoint in your browser to view:\n- Training/validation loss curves\n- Model architecture graphs\n- Learning rate schedules\n- Custom metrics and histograms\n\n**Example:** Navigate to `http://your-server/tensorboard/` to view the dashboard.","operationId":"tensorboard_proxy","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["TensorBoard"],"summary":"Tensorboard Proxy","description":"Access the TensorBoard web interface.\n\nProxies all requests to the TensorBoard server running on localhost:6006.\nNavigate to `/tensorboard/` in your browser to view training visualizations.\n\n**Supported Methods:** GET, POST, PUT, DELETE, PATCH\n\n**Raises:**\n- `503`: TensorBoard is not running or still starting up\n- `502`: Failed to connect to TensorBoard backend\n\n**Use Case:**\nAccess this endpoint in your browser to view:\n- Training/validation loss curves\n- Model architecture graphs\n- Learning rate schedules\n- Custom metrics and histograms\n\n**Example:** Navigate to `http://your-server/tensorboard/` to view the dashboard.","operationId":"tensorboard_proxy","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["TensorBoard"],"summary":"Tensorboard Proxy","description":"Access the TensorBoard web interface.\n\nProxies all requests to the TensorBoard server running on localhost:6006.\nNavigate to `/tensorboard/` in your browser to view training visualizations.\n\n**Supported Methods:** GET, POST, PUT, DELETE, PATCH\n\n**Raises:**\n- `503`: TensorBoard is not running or still starting up\n- `502`: Failed to connect to TensorBoard backend\n\n**Use Case:**\nAccess this endpoint in your browser to view:\n- Training/validation loss curves\n- Model architecture graphs\n- Learning rate schedules\n- Custom metrics and histograms\n\n**Example:** Navigate to `http://your-server/tensorboard/` to view the dashboard.","operationId":"tensorboard_proxy","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/explorer/random-images":{"get":{"tags":["Explorer"],"summary":"Get Random Images","description":"Get random images from the training set with annotations drawn.\n\nArgs:\n    count: Number of random images to return (default: 20)\n    quality: JPEG quality 10-95 (default: 40, lower = faster)\n    max_size: Maximum dimension for resizing (default: 800)\n    dataset: Dataset to use: train, valid, or test (default: train)\n\nReturns:\n    List of images with annotations as base64 JPEG","operationId":"get_random_images_explorer_random_images_get","parameters":[{"name":"count","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Count"}},{"name":"quality","in":"query","required":false,"schema":{"type":"integer","maximum":95,"minimum":10,"default":40,"title":"Quality"}},{"name":"max_size","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":200,"default":800,"title":"Max Size"}},{"name":"dataset","in":"query","required":false,"schema":{"type":"string","default":"train","title":"Dataset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/explorer/image/{dataset}/{image_id}":{"get":{"tags":["Explorer"],"summary":"Get Single Image","description":"Get a single image with annotations drawn at high quality.\n\nArgs:\n    dataset: Dataset to use: train, valid, or test\n    image_id: Image ID from COCO annotations\n    quality: JPEG quality 10-100 (default: 85 for good quality)\n    max_size: Maximum dimension for resizing (0 = no resize, original size)\n\nReturns:\n    Single image with annotations as base64 JPEG","operationId":"get_single_image_explorer_image__dataset___image_id__get","parameters":[{"name":"dataset","in":"path","required":true,"schema":{"type":"string","title":"Dataset"}},{"name":"image_id","in":"path","required":true,"schema":{"type":"integer","title":"Image Id"}},{"name":"quality","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":10,"default":85,"title":"Quality"}},{"name":"max_size","in":"query","required":false,"schema":{"type":"integer","maximum":8000,"minimum":0,"default":0,"title":"Max Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/explorer":{"get":{"tags":["Explorer"],"summary":"Explorer Page","description":"Serve the dataset explorer HTML page.\n\nDisplays random images from the training set with annotations.","operationId":"explorer_page_explorer_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/":{"get":{"tags":["UI"],"summary":"Engine Ui","description":"Serve the human-friendly engine landing page (status, playground, controls, links).","operationId":"engine_ui__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Body_export_model_export_post":{"properties":{"uploaded_zip":{"anyOf":[{"type":"string","format":"binary"},{"type":"string"},{"type":"null"}],"title":"Uploaded Zip","description":"Upload model ZIP file directly (mutually exclusive with url). Must contain a model checkpoint (.pth, .pt, or .ckpt) and hyperparameters.json file."}},"type":"object","title":"Body_export_model_export_post"},"Body_model_training_route_training_start_model_training_post":{"properties":{"image_dataset":{"type":"string","format":"binary","title":"Image Dataset"},"hyperparameters":{"type":"string","title":"Hyperparameters"},"model_uuid":{"type":"string","title":"Model Uuid"},"test_image_dataset":{"type":"string","format":"binary","title":"Test Image Dataset"}},"type":"object","required":["image_dataset"],"title":"Body_model_training_route_training_start_model_training_post"},"Body_predict_image_azure_route_inference_predict_image_azure_post":{"properties":{"image_blob_name":{"type":"string","title":"Image Blob Name"}},"type":"object","required":["image_blob_name"],"title":"Body_predict_image_azure_route_inference_predict_image_azure_post"},"Body_predict_image_route_inference_predict_image_post":{"properties":{"image":{"type":"string","format":"binary","title":"Image"}},"type":"object","required":["image"],"title":"Body_predict_image_route_inference_predict_image_post"},"Body_set_trained_model_azure_route_inference_set_trained_model_azure_post":{"properties":{"trained_model_blob_name":{"type":"string","title":"Trained Model Blob Name"},"hyperparameters":{"type":"string","title":"Hyperparameters"},"azure_config":{"type":"string","title":"Azure Config"}},"type":"object","required":["trained_model_blob_name","azure_config"],"title":"Body_set_trained_model_azure_route_inference_set_trained_model_azure_post"},"Body_set_trained_model_route_inference_set_trained_model_post":{"properties":{"trained_model":{"type":"string","format":"binary","title":"Trained Model"},"hyperparameters":{"type":"string","title":"Hyperparameters"}},"type":"object","required":["trained_model","hyperparameters"],"title":"Body_set_trained_model_route_inference_set_trained_model_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}