bioimage-io / JDLL

The Java library to run Deep Learning models
https://github.com/bioimage-io/JDLL/wiki
Apache License 2.0
27 stars 6 forks source link

Improve memory efficiency of the ScaleRangeTransformation #2

Closed carlosuc3m closed 2 years ago

carlosuc3m commented 2 years ago

Improve the memory management of said transformation. At the moment it seems that some memory is not correcly deleted, it seems to be related to the obtention of max and min values using the methods provided by Nd4j library.

https://github.com/bioimage-io/model-runner-java/blob/8a38d3ab9ec4fcf0a3620a3cf4ffe7952731a785/src/main/java/org/bioimageanalysis/icy/deeplearning/transformations/ScaleRangeTransformation.java#L105

carlosuc3m commented 2 years ago

The use of ND4J has been deprecated in favour of ImgLib2 (https://github.com/bioimage-io/model-runner-java/commit/78f79511634037125ee3136a114e143014b72e35). All the processing is done now in Java, so no errors with memory management.