Package qupath.opencv.dnn
Class DnnModels
java.lang.Object
qupath.opencv.dnn.DnnModels
Helper class for building new DnnModels.
This includes a ServiceLoader
to support adding new implementations
via extensions.
- Since:
- v0.4.0
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DnnModel
buildModel
(DnnModelParams params) Build aDnnModel
from the given parameters.static boolean
registerBuilder
(DnnModelBuilder builder) Register a newDnnModelBuilder
.static <T extends DnnModel>
voidregisterDnnModel
(Class<T> subtype, String name) Register a newDnnModel
class for JSON serialization/deserialization.
-
Constructor Details
-
DnnModels
public DnnModels()
-
-
Method Details
-
registerDnnModel
Register a newDnnModel
class for JSON serialization/deserialization.- Type Parameters:
T
-- Parameters:
subtype
-name
-
-
registerBuilder
Register a newDnnModelBuilder
.- Parameters:
builder
-- Returns:
-
buildModel
Build aDnnModel
from the given parameters. This queries all available DnnModelBuilders through a service loader.- Parameters:
params
-- Returns:
- a new DnnModel, or null if no model could be built
-