diff --git a/src/main/java/io/bioimage/modelrunner/model/Stardist2D.java b/src/main/java/io/bioimage/modelrunner/model/Stardist2D.java index bbf7337d..79fe1581 100644 --- a/src/main/java/io/bioimage/modelrunner/model/Stardist2D.java +++ b/src/main/java/io/bioimage/modelrunner/model/Stardist2D.java @@ -112,9 +112,9 @@ private Stardist2D(ModelDescriptor descriptor) { * @param modelPath * path to the Bioimage.io model * @return an instance of a Stardist2D model ready to be used - * @throws ModelSpecsException if there is any error in the configuration of the specs rdf.yaml file of the Bioimage.io - * @throws IOException - * @throws FileNotFoundException + * @throws ModelSpecsException If there is any error in the configuration of the specs rdf.yaml file of the Bioimage.io. + * @throws FileNotFoundException If the model file is not found. + * @throws IOException If there's an I/O error. */ public static Stardist2D fromBioimageioModel(String modelPath) throws ModelSpecsException, FileNotFoundException, IOException { ModelDescriptor descriptor = ModelDescriptorFactory.readFromLocalFile(modelPath + File.separator + Constants.RDF_FNAME); diff --git a/src/main/java/io/bioimage/modelrunner/model/Stardist3D.java b/src/main/java/io/bioimage/modelrunner/model/Stardist3D.java index d335d8be..a832c8f2 100644 --- a/src/main/java/io/bioimage/modelrunner/model/Stardist3D.java +++ b/src/main/java/io/bioimage/modelrunner/model/Stardist3D.java @@ -63,7 +63,34 @@ import net.imglib2.view.Views; /** - * Implementation of an API to run Stardist 3D models out of the box with little configuration. + * This class provides an implementation of an API to run Stardist 3D models, including pre- + * and post-processing, with minimal configuration. The class allows for loading pretrained + * models from Bioimage.io and also includes methods for running predictions using 3D images. + * + *
Stardist is a deep learning model specialized in detecting object shapes, particularly + * star-convex shapes in images, which is especially useful in biomedical imaging applications + * such as cell nuclei detection.
+ * + *The Stardist3D class includes methods for installing the necessary requirements (such as + * Python environments), running predictions, and handling Stardist-specific post-processing.
+ * + *TODO: add support for fine-tuning models and Mac ARM processors.
+ * + * Example usage: + *+ * {@code + * Stardist3D.installRequirements(); + * Stardist3D model = Stardist3D.fromPretained("StarDist Plant Nuclei 3D ResNet", false); + * RandomAccessibleInterval+ * + * @see io.bioimage.modelrunner.model.ModelDescriptor + * @see io.bioimage.modelrunner.bioimageio.description.ModelDescriptorFactory + * @see io.bioimage.modelrunner.exceptions.LoadModelException + * @see io.bioimage.modelrunner.exceptions.RunModelException + * @see io.bioimage.modelrunner.runmode.ops.GenericOp * *TODO add fine tuning *TODO add support for Mac arm @@ -112,9 +139,9 @@ private Stardist3D(ModelDescriptor descriptor) { * @param modelPath * path to the Bioimage.io model * @return an instance of a Stardist3D model ready to be used - * @throws ModelSpecsException if there is any error in the configuration of the specs rdf.yaml file of the Bioimage.io - * @throws IOException - * @throws FileNotFoundException + * @throws ModelSpecsException if the model configuration is incorrect in the specs file (rdf.yaml). + * @throws FileNotFoundException if the model file is not found in the specified path. + * @throws IOException if there is an issue reading the model file. */ public static Stardist3D fromBioimageioModel(String modelPath) throws ModelSpecsException, FileNotFoundException, IOException { ModelDescriptor descriptor = ModelDescriptorFactory.readFromLocalFile(modelPath + File.separator + Constants.RDF_FNAME);img = ArrayImgs.floats(new long[] {116, 120, 66}); + * RandomAccessibleInterval res = model.predict(img); + * } + *