kitcar_ml.traffic_sign_detection package
Subpackages
- kitcar_ml.traffic_sign_detection.fasterrcnn package
- Submodules
- kitcar_ml.traffic_sign_detection.fasterrcnn.evaluate module
- kitcar_ml.traffic_sign_detection.fasterrcnn.export module
- kitcar_ml.traffic_sign_detection.fasterrcnn.inference module
- kitcar_ml.traffic_sign_detection.fasterrcnn.model module
- kitcar_ml.traffic_sign_detection.fasterrcnn.train module
- Module contents
Submodules
kitcar_ml.traffic_sign_detection.detection_model module
Classes:
- class DetectionModel[source]
Bases:
ABCMethods:
fit(data_loader, val_data_loader[, epochs])Train the model on the given data_loader.
predict(images, **kwargs)Take in a list of images and return predictions for object locations.
evaluate(data_loader[, evaluator_type])Run evaluator on data loader.
export_to_onnx(output_file)Export this model into a onnx format.
save(file)Save the internal model weights to a file.
load(file)Load a model from a .pth file containing the model weights.
Attributes:
- abstract fit(data_loader: DataLoader, val_data_loader: DataLoader, epochs: int = 10, **kwargs) None[source]
Train the model on the given data_loader.
- abstract predict(images: List[ndarray], **kwargs) List[Tuple[List[ndarray], List[str], List[float]]][source]
Take in a list of images and return predictions for object locations.
- evaluate(data_loader: ~kitcar_ml.utils.data.data_loader.bbox_data_loader.BBoxDataLoader, evaluator_type: ~typing.Type[~kitcar_ml.utils.evaluation.evaluator.Evaluator] = <class 'kitcar_ml.utils.evaluation.simple_evaluator.SimpleEvaluator'>, **kwargs) Evaluator[source]
Run evaluator on data loader.
The evaluator_type can be used to run a different evaluator than SimpleEvaluator. :returns: The evaluator with results.
- abstract export_to_onnx(output_file: str)[source]
Export this model into a onnx format.
- Parameters
output_file – Path to the output file
- abstract save(file: str)[source]
Save the internal model weights to a file.
- Parameters
file – The name of the file. Should have a .pth file extension.
- abstract classmethod load(file: str)[source]
Load a model from a .pth file containing the model weights.
- Parameters
file – The path to the .pth file containing the saved model.
- Returns
The model loaded from the file.
- _abc_impl = <_abc_data object>
Module contents
Traffic Sign Detection Network.