Interface ObjectDetector

All Superinterfaces:
Releasable
All Known Implementing Classes:
NullModel, RknnObjectDetector

public interface ObjectDetector extends Releasable
ObjectDetector lifecycle:
  1. Models are discovered by NeuralNetworkModelManager
  2. Model is selected as a parameter of ObjectDetectionPipe
  3. Model.load() is called to create a ObjectDetector instance
  4. detect(Mat, double, double) is called to perform object detection
  5. Releasable.release() is called to release resources
  • Method Summary

    Modifier and Type
    Method
    Description
    detect(org.opencv.core.Mat in, double nmsThresh, double boxThresh)
    Detects objects in the given input image.
    Returns the classes that the detector can detect
    Returns the model that created this ObjectDetector.

    Methods inherited from interface org.photonvision.vision.opencv.Releasable

    release
  • Method Details

    • getModel

      Model getModel()
      Returns the model that created this ObjectDetector.
    • getClasses

      List<String> getClasses()
      Returns the classes that the detector can detect
      Returns:
      The classes
    • detect

      List<NeuralNetworkPipeResult> detect(org.opencv.core.Mat in, double nmsThresh, double boxThresh)
      Detects objects in the given input image. Preprocessing and postprocessing steps should be embedded into this call.
      Parameters:
      in - The input image to perform object detection on.
      nmsThresh - The threshold value for non-maximum suppression.
      boxThresh - The threshold value for bounding box detection.
      Returns:
      A list of NeuralNetworkPipeResult objects representing the detected objects. Returns an empty list if the detector is not initialized or if no objects are detected.