Class DnnModels

java.lang.Object
qupath.opencv.dnn.DnnModels

public class DnnModels extends Object
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 Details

    • DnnModels

      public DnnModels()
  • Method Details

    • registerDnnModel

      public static <T extends DnnModel> void registerDnnModel(Class<T> subtype, String name)
      Register a new DnnModel class for JSON serialization/deserialization.
      Type Parameters:
      T -
      Parameters:
      subtype -
      name -
    • registerBuilder

      public static boolean registerBuilder(DnnModelBuilder builder)
      Register a new DnnModelBuilder.
      Parameters:
      builder -
      Returns:
    • buildModel

      public static DnnModel buildModel(DnnModelParams params)
      Build a DnnModel 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