From 79539d82abc75ef285e1f14ff6000f4ccb7dc4a3 Mon Sep 17 00:00:00 2001 From: Nick Kuang <111142664+Nick-Kuang@users.noreply.github.com> Date: Sat, 20 Jan 2024 01:59:03 -0500 Subject: [PATCH] patched custom model deleted bug --- .../trackmate/detector/lacss/LacssDetectorFactory.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/fiji/plugin/trackmate/detector/lacss/LacssDetectorFactory.java b/src/main/java/fiji/plugin/trackmate/detector/lacss/LacssDetectorFactory.java index 5b8dd2c..ba320b6 100644 --- a/src/main/java/fiji/plugin/trackmate/detector/lacss/LacssDetectorFactory.java +++ b/src/main/java/fiji/plugin/trackmate/detector/lacss/LacssDetectorFactory.java @@ -165,9 +165,12 @@ private void addOnShutdownHook() public void run() { // new File(pyFilePath).delete(); - new File(modelPath).delete(); - - if (pyServer.isAlive()) { + if (settings.get(KEY_LACSS_MODEL) == PretrainedModel.Default) + { + new File(modelPath).delete(); + } + if (pyServer.isAlive()) + { pyServer.destroy(); } }