Class DnnModelParams.Builder

java.lang.Object
qupath.opencv.dnn.DnnModelParams.Builder
Enclosing class:
DnnModelParams

public static class DnnModelParams.Builder extends Object
Builder for DnnModelParams.
  • Method Details

    • files

      public DnnModelParams.Builder files(File... files)
      Specify the URIs as files. These will be appended to any existing URIs.
      Parameters:
      files -
      Returns:
    • paths

      public DnnModelParams.Builder paths(Path... paths)
      Specify the URIs as path objects. These will be appended to any existing URIs.
      Parameters:
      paths -
      Returns:
    • URIs

      public DnnModelParams.Builder URIs(URI... uris)
      Specify the URIs. These will be appended to any existing URIs.
      Parameters:
      uris -
      Returns:
    • URIs

      public DnnModelParams.Builder URIs(Collection<URI> uris)
      Specify the URIs as a collection. These will be appended to any existing URIs.
      Parameters:
      uris -
      Returns:
    • lazyInitialize

      public DnnModelParams.Builder lazyInitialize(boolean lazyInitialize)
      Optionally request lazy initialization.
      Parameters:
      lazyInitialize -
      Returns:
    • framework

      public DnnModelParams.Builder framework(String framework)
      Specify the deep learning framework that can use the model.

      It is recommended to use one of the default names available as static variables in DnnModelParams. However, an extension might use some other unique identifier to ensure that it is used in preference to some other implementation.

      Parameters:
      framework -
      Returns:
    • layout

      public DnnModelParams.Builder layout(String layout)
      Specify a string representing the axes layout that the model expects as input. This should follow the Bioimage Model Zoo spec, and include only the characters "bixyczt".
      Parameters:
      layout -
      Returns:
    • inputShape

      public DnnModelParams.Builder inputShape(long... shape)
      Specify the shape for a single input, with the default input name.
      Parameters:
      shape -
      Returns:
    • input

      public DnnModelParams.Builder input(String name, long... shape)
      Specify the shape as a long array for a single input with a specified name.
      Parameters:
      name -
      shape -
      Returns:
    • input

      public DnnModelParams.Builder input(String name, DnnShape shape)
      Specify the shape for a single input with a specified name.
      Parameters:
      name -
      shape -
      Returns:
    • inputs

      public DnnModelParams.Builder inputs(Map<String,DnnShape> inputs)
      Specify the shapes for one or more inputs.
      Parameters:
      inputs -
      Returns:
    • outputShape

      public DnnModelParams.Builder outputShape(long... shape)
      Specify the shape for a single output, with the default output name.
      Parameters:
      shape -
      Returns:
    • output

      public DnnModelParams.Builder output(String name, long... shape)
      Specify the shape as a long array for a single named output.
      Parameters:
      name -
      shape -
      Returns:
    • output

      public DnnModelParams.Builder output(String name, DnnShape shape)
      Specify the shape for a single named output.
      Parameters:
      name -
      shape -
      Returns:
    • outputs

      public DnnModelParams.Builder outputs(Map<String,DnnShape> outputs)
      Specify the shapes for one or more outputs. These will be added to any existing outputs.
      Parameters:
      outputs -
      Returns:
    • build

      public DnnModelParams build()
      Build the params.
      Returns: