Loader
app.infrastructure.detection.model.loaderDetection model factory and polymorphic implementations (Torch, YOLO, Dummy).
See Also
DetectionModelError— reports model-loading failuresBaseDetectionModel— common contract for loaded models
Layer: Infrastructure. Context: Implements concrete processing and I/O behind application-facing contracts.
load_detection_model(model_name: str) -> BaseDetectionModel
Instantiate the model implementation registered under model_name.
| PARAMETER | DESCRIPTION |
|---|---|
model_name
|
Registered model name, or
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
BaseDetectionModel
|
Model implementation for the requested TorchVision, YOLO, MTCNN, or dummy model. |
Note
TorchVision, YOLO, and MTCNN names select their matching backend wrapper.
| RAISES | DESCRIPTION |
|---|---|
DetectionModelError
|
If the name is not registered by any supported backend. |