To use with maven:
<dependency>
<groupId>io.bioimage</groupId>
<artifactId>dl-modelrunner-pytorch-javacpp</artifactId>
<version>0.3.0</version>
</dependency>
and add to </repositories>
the following:
<repository>
<id>scijava.public</id>
<url>https://maven.scijava.org/content/groups/public</url>
</repository>
In order to have GPU support to the project add the following deps to the pom.xml (regard that this is only for when the code it is executed on its own, not from the modelrunner JDLL):
<!-- Additional dependencies required to use CUDA, cuDNN, and NCCL -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>pytorch-platform-gpu</artifactId>
<version>2.0.1-1.5.9</version>
</dependency>
<!-- Additional dependencies to use bundled CUDA, cuDNN, and NCCL -->
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>cuda-platform-redist</artifactId>
<version>11.8-8.6-1.5.8</version>
</dependency>