aigarmic.model
Implementation of Model classes
Classes
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
SoftmaxModel is a one-stop model when more than one growth category is present, e.g.: |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
Functions
|
Convert a cv2 image to a keras image |
Module Contents
- aigarmic.model.convert_cv2_to_keras(image, size_x=160, size_y=160) numpy.ndarray[source]
Convert a cv2 image to a keras image
- Parameters:
image – Image loaded using cv2.imread
size_x – Width to resize image to (pixels)
size_y – Height to resize image to (pixels)
- Returns:
Image as a numpy array
- class aigarmic.model.Model(key: list[str] | None)[source]
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- class aigarmic.model.KerasModel(path: str, trained_x: int, trained_y: int, key: list[str] | None)[source]
Bases:
ModelHelper class that provides a standard way to create an ABC using inheritance.
- class aigarmic.model.SoftmaxModel(path: str, trained_x: int, trained_y: int, key: list[str] | None)[source]
Bases:
KerasModelSoftmaxModel is a one-stop model when more than one growth category is present, e.g.: [‘No growth’, ‘Poor growth’, ‘Good growth’]
- class aigarmic.model.BinaryModel(path: str, trained_x: int, trained_y: int, key: list[str] | None, threshold: float = 0.5)[source]
Bases:
KerasModelHelper class that provides a standard way to create an ABC using inheritance.
- class aigarmic.model.BinaryNestedModel(first_line_model: BinaryModel, second_line_model: BinaryModel, first_model_accuracy_acceptance: float = 0.9, suppress_first_model_accuracy_check: bool = False)[source]
Bases:
ModelHelper class that provides a standard way to create an ABC using inheritance.