Package ai.djl.zero.cv
Class ObjectDetection
java.lang.Object
ai.djl.zero.cv.ObjectDetection
ObjectDetection takes an image and extract one or more main subjects in the image.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 withperformance
- to determine the desired model tradeoffs- Returns:
- the model as a
ZooModel
with theTranslator
included - Throws:
IOException
- if the dataset could not be loadedai.djl.translate.TranslateException
- if the translator has errors
-