Skip to content

Commit

Permalink
preprocess the inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Jan 14, 2025
1 parent ece1b5e commit d8ea1f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/io/bioimage/modelrunner/model/Stardist3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import io.bioimage.modelrunner.exceptions.LoadEngineException;
import io.bioimage.modelrunner.exceptions.LoadModelException;
import io.bioimage.modelrunner.exceptions.RunModelException;
import io.bioimage.modelrunner.model.processing.Processing;
import io.bioimage.modelrunner.runmode.RunMode;
import io.bioimage.modelrunner.runmode.ops.GenericOp;
import io.bioimage.modelrunner.tensor.Tensor;
Expand Down Expand Up @@ -244,6 +245,8 @@ RandomAccessibleInterval<T> predict(RandomAccessibleInterval<T> image) throws Mo

Model model = Model.createBioimageioModel(this.descriptor.getModelPath());
model.loadModel();
Processing processing = Processing.init(descriptor);
inputList = processing.preprocess(inputList, false);
model.runModel(inputList, outputList);

return Utils.transpose(Cast.unchecked(postProcessing(outputList.get(0).getData())));
Expand Down

0 comments on commit d8ea1f9

Please sign in to comment.