imgalz.models.detector package¶
Submodules¶
imgalz.models.detector.yolov5 module¶
- class imgalz.models.detector.yolov5.YOLOv5(model_path, mean=[0, 0, 0], std=[1, 1, 1])[source]¶
Bases:
object
YOLOv5 object detection model wrapper using ONNX Runtime.
This class loads a YOLOv5 model in ONNX format and prepares it for inference, including setting preprocessing parameters like mean and std normalization.
- model_path¶
Path to the ONNX model file.
- Type:
Union[str, Path]
- mean¶
Mean values for image normalization.
- Type:
List[float]
- std¶
Standard deviation values for image normalization.
- Type:
List[float]
imgalz.models.detector.yolov8 module¶
- class imgalz.models.detector.yolov8.YOLOv8(model_path, mean=[0, 0, 0], std=[1, 1, 1], nc=80)[source]¶
Bases:
YOLOv5
YOLOv8 object detection model wrapper extending YOLOv5.
Inherits basic ONNX loading and preprocessing from YOLOv5, and adds support for specifying the number of classes.
- model_path¶
Path to the ONNX model file.
- Type:
Union[str, Path]
- mean¶
Mean values for normalization. Defaults to [0, 0, 0].
- Type:
List[float], optional
- std¶
Standard deviation values for normalization. Defaults to [1, 1, 1].
- Type:
List[float], optional
- nc¶
Number of classes. Defaults to 80.
- Type:
int, optional