|
1 | 1 | package fiji.plugin.appose.cellpose; |
2 | 2 |
|
| 3 | +import static fiji.plugin.appose.ApposeUtils.getBestTorchConfig; |
3 | 4 | import static fiji.plugin.appose.ApposeUtils.rawWraps; |
4 | 5 | import static fiji.plugin.appose.ApposeUtils.transferCalibration; |
5 | 6 | import static fiji.plugin.appose.ApposeUtils.useGlasbeyDarkLUT; |
@@ -153,7 +154,8 @@ private static < T extends RealType< T > & NativeType< T > > List< Img< T > > ru |
153 | 154 | */ |
154 | 155 | public static < T extends RealType< T > & NativeType< T > > List< Img< T > > cellpose3( final ImgPlus< T > img, final Cellpose3Parameters params ) throws BuildException, IOException, InterruptedException, TaskException |
155 | 156 | { |
156 | | - final String envName = "cp3"; |
| 157 | + String envSuffix = getBestTorchConfig(); |
| 158 | + final String envName = "cp3" + envSuffix; |
157 | 159 | final String pythonScriptPath = "/cp3.py"; |
158 | 160 | return run( img, params, pythonScriptPath, envName ); |
159 | 161 | } |
@@ -214,7 +216,8 @@ public static ImagePlus[] cellpose3( final ImagePlus imp, final Cellpose3Paramet |
214 | 216 | */ |
215 | 217 | public static < T extends RealType< T > & NativeType< T > > List< Img< T > > cellpose4( final ImgPlus< T > img, final Cellpose4Parameters params ) throws BuildException, IOException, InterruptedException, TaskException |
216 | 218 | { |
217 | | - final String envName = "cp4"; |
| 219 | + String envSuffix = getBestTorchConfig(); |
| 220 | + final String envName = "cp4" + envSuffix; |
218 | 221 | final String pythonScriptPath = "/cp4.py"; |
219 | 222 | return run( img, params, pythonScriptPath, envName ); |
220 | 223 | } |
|
0 commit comments