public class YoloModelLoader
extends ai.djl.repository.zoo.BaseModelLoader<ai.djl.modality.cv.Image,ai.djl.modality.cv.output.DetectedObjects>
ModelLoader
for YOLO models.
These models were built as part of the Gluon CV library and imported into DJL.
Yolo is a model to solve Application.CV#OBJECT_DETECTION
. Prior models like SingleShotDetectionModelLoader
were built around classifiers and would classify at various
locations in the image simultaneously. However, this is fairly inefficient. Yolo instead uses a
regression that will predict both the bounding boxes and class probabilities leading to better
performance and better precision, although it can increase localization errors (the boxes are
less accurate). [paper]
YOLO is currently the best object detection model in the DJL Model Zoo in terms of both performance and prediction quality.
Constructor and Description |
---|
YoloModelLoader(ai.djl.repository.Repository repository)
Constructs a
YoloModelLoader given the repository, mrl, and version. |
Modifier and Type | Method and Description |
---|---|
ai.djl.Application |
getApplication() |
ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,ai.djl.modality.cv.output.DetectedObjects> |
loadModel(java.util.Map<java.lang.String,java.lang.String> filters,
ai.djl.Device device,
ai.djl.util.Progress progress) |
createModel, getArtifactId, listModels, loadModel, match, toString
public YoloModelLoader(ai.djl.repository.Repository repository)
YoloModelLoader
given the repository, mrl, and version.repository
- the repository to load the model frompublic ai.djl.Application getApplication()
public ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,ai.djl.modality.cv.output.DetectedObjects> loadModel(java.util.Map<java.lang.String,java.lang.String> filters, ai.djl.Device device, ai.djl.util.Progress progress) throws java.io.IOException, ai.djl.repository.zoo.ModelNotFoundException, ai.djl.MalformedModelException
java.io.IOException
ai.djl.repository.zoo.ModelNotFoundException
ai.djl.MalformedModelException