pyreason.scripts.learning.classification.yolo_classifier

Module Contents

class YoloLogicIntegratedTemporalClassifier(model, class_names: List[str], identifier: str = 'yolo_classifier', interface_options: pyreason.scripts.learning.utils.model_interface.ModelInterfaceOptions = None, poll_interval: int | datetime.timedelta | None = None, poll_condition: str | None = None, input_fn: Callable[[], Any] | None = None)[source]

Bases: pyreason.scripts.learning.classification.logic_integration_base.LogicIntegrationBase

Class to integrate a YOLO model with PyReason. The output of the model is returned to the user in the form of PyReason facts. The user can then add these facts to the logic program and reason using them. Wraps a YOLO model whose forward(x) returns bounding boxes with class probabilities. Implements _infer, _postprocess, and _pred_to_facts to replace the original forward().

poll_interval = None[source]
poll_condition = None[source]
input_fn = None[source]
logic_program = None[source]