offlinemot.detection.YoloDetector

class offlinemot.detection.YoloDetector(config=<config.configs object>)[source]

A class to load trained Yolov4 model from memory, and perform detection on frames.

…

Variables
  • ~YoloDetector.m (Pytorch Model class instance) – A model of Yolov4 architecture

  • ~YoloDetector.use_cude (bool) – Run on CPU if False or GPU if True

  • ~YoloDetector.class_names (list) – list of class names from which detection performed

detect(numpy array) -> list, (int, int)[source]

Process a new frame to find the detections along with their positions and probabilities

better_detection(numpy array, list) -> list, (int, int)[source]

Detect the classes within the image at the proposed areas based on the previous detections.