Class ObjectDetection

java.lang.Object
ai.djl.zero.cv.ObjectDetection

public final class ObjectDetection extends Object
ObjectDetection takes an image and extract one or more main subjects in the image.
  • Method Summary

    Modifier and Type
    Method
    Description
    static ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,ai.djl.modality.cv.output.DetectedObjects>
    train(ai.djl.basicdataset.cv.ObjectDetectionDataset dataset, Performance performance)
    Trains the recommended object detection model on a custom dataset.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • train

      public static ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,ai.djl.modality.cv.output.DetectedObjects> train(ai.djl.basicdataset.cv.ObjectDetectionDataset dataset, Performance performance) throws IOException, ai.djl.translate.TranslateException
      Trains the recommended object detection model on a custom dataset. Currently, trains a SingleShotDetection Model.

      In order to train on a custom dataset, you must create a custom ObjectDetectionDataset to load your data.

      Parameters:
      dataset - the data to train with
      performance - to determine the desired model tradeoffs
      Returns:
      the model as a ZooModel with the Translator included
      Throws:
      IOException - if the dataset could not be loaded
      ai.djl.translate.TranslateException - if the translator has errors