Skip to content

Commit

Permalink
correct bug, pre and post-processing was not applied before
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Nov 20, 2024
1 parent fc96c36 commit 49ff319
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ public String getDescription() {
}

public List<TransformSpec> getPreprocessing(){
if (this.input)
if (!this.input)
return new ArrayList<TransformSpec>();
return this.preprocessing;
}

public List<TransformSpec> getPostprocessing(){
if (!this.input)
if (this.input)
return new ArrayList<TransformSpec>();
return this.postprocessing;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ public String getDescription() {
}

public List<TransformSpec> getPreprocessing(){
if (this.input)
if (!this.input)
return new ArrayList<TransformSpec>();
return this.preprocessing;
}

public List<TransformSpec> getPostprocessing(){
if (!this.input)
if (this.input)
return new ArrayList<TransformSpec>();
return this.postprocessing;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/bioimage/modelrunner/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ else if (ww.getFramework().equals(ModelWeight.getTensorflowID()) && !(new File(b
throw new IOException("Please install a compatible engine with the model weights. "
+ "To be compatible the engine has to be of the same framework and the major version needs to be the same. "
+ "The model weights are: " + descriptor.getWeights().getSupportedWeightNamesAndVersion());
Model model = Model.createDeepLearningModel(bmzModelFolder, modelSource, info, classloader);
Model model = new Model( info, bmzModelFolder, modelSource, null );
model.descriptor = descriptor;
return model;
}
Expand Down

0 comments on commit 49ff319

Please sign in to comment.