public class PpWordRecognition
extends ai.djl.repository.zoo.BaseModelLoader
Constructor and Description |
---|
PpWordRecognition(ai.djl.repository.Repository repository,
java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
ai.djl.repository.zoo.ModelZoo modelZoo)
Creates the Model loader from the given repository.
|
Modifier and Type | Method and Description |
---|---|
ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,java.lang.String> |
loadModel(java.util.Map<java.lang.String,java.lang.String> filters,
ai.djl.Device device,
ai.djl.util.Progress progress)
Loads the model with the given search filters.
|
public PpWordRecognition(ai.djl.repository.Repository repository, java.lang.String groupId, java.lang.String artifactId, java.lang.String version, ai.djl.repository.zoo.ModelZoo modelZoo)
repository
- the repository to load the model fromgroupId
- the group id of the modelartifactId
- the artifact id of the modelversion
- the version of the model to loadmodelZoo
- the modelZoo type that is being used to get supported engine typespublic ai.djl.repository.zoo.ZooModel<ai.djl.modality.cv.Image,java.lang.String> 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
filters
- the search filters to match against the loaded modeldevice
- the device the loaded model should useprogress
- the progress tracker to update while loading the modeljava.io.IOException
- for various exceptions loading data from the repositoryai.djl.repository.zoo.ModelNotFoundException
- if no model with the specified criteria is foundai.djl.MalformedModelException
- if the model data is malformed