jiyuuchc / TrackMate-Lacss

A plugin of a plugin. A cell detector for TrackMate
https://imagej.net/plugins/trackmate/detectors/trackmate-lacss
GNU General Public License v3.0
1 stars 1 forks source link

Custom Model Handling and IPC Msg #4

Closed Nick-Kuang closed 10 months ago

jiyuuchc commented 11 months ago

After some thought, I now believe this should probably be handled on the Java side.

The proposal is to monitor changes in LacssDetectFactory.settings, If the model settings is changed since the last time the factory was run, the factory should kill the existing py process and start a new one.

Nick-Kuang commented 11 months ago

Edited getPyServere() Function. To Monitor InputModel Changes.

I'm not sure if the change is actually carried through yet; Lots of stuff is commented out that may/maynot be needed.

jiyuuchc commented 10 months ago

Candidate fix at commit 3336ec.

Nick, could you test on windows before I close this issue?

Nick-Kuang commented 10 months ago

I can confirm the error message works when the Python env isn't working correctly with a log. Below:

Capture

I "think" the custom model choice is working. It's hard to know 100% since two lacss.pkl models predictions look nearly the same to me. But I will look for a more poorly trained model for further testing

jiyuuchc commented 10 months ago

The logging windows should print the relative info if a new model is loaded from disk. It should also print the backend (gpt/cpu) used. Maybe check that instead?

Ji


From: Nick Kuang @.***> Sent: Tuesday, December 12, 2023 8:35 PM To: jiyuuchc/TrackMate-Lacss Cc: Yu,Ji; Comment Subject: Re: [jiyuuchc/TrackMate-Lacss] Custom Model Handling and IPC Msg (Issue #4)

Attention: This is an external email. Use caution responding, opening attachments or clicking on links.

I can confirm the error message works when the Python env isn't working correctly with a log. Below:

Capture.PNG (view on web)https://urldefense.com/v3/__https://github.com/jiyuuchc/TrackMate-Lacss/assets/111142664/3f5eb038-88b1-4a43-aae5-ea03a4f73912__;!!Cn_UX_p3!iYfvOWANXyf66vTbi9cRD9ZLMAefiLKczwZjvdtqzZC8N8WNO4HuQvC5k3f4OHc9aT6AUFVGsZsmVWF9K0fpkA$

I "think" the custom model choice is working. It's hard to know 100% since two lacss.pkl models predictions look nearly the same to me. But I will look for a more poorly trained model for further testing

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/jiyuuchc/TrackMate-Lacss/issues/4*issuecomment-1853127123__;Iw!!Cn_UX_p3!iYfvOWANXyf66vTbi9cRD9ZLMAefiLKczwZjvdtqzZC8N8WNO4HuQvC5k3f4OHc9aT6AUFVGsZsmVWGW9AaG1A$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAKRPNWCB2CWUVZHN2TPVB3YJEA7HAVCNFSM6AAAAAA7TDZ4UKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGEZDOMJSGM__;!!Cn_UX_p3!iYfvOWANXyf66vTbi9cRD9ZLMAefiLKczwZjvdtqzZC8N8WNO4HuQvC5k3f4OHc9aT6AUFVGsZsmVWFfG6jjGQ$. You are receiving this because you commented.Message ID: @.***>

Nick-Kuang commented 10 months ago

Oh did not read the log that closely on success. Appears working

image

Nick-Kuang commented 10 months ago

It does not print the GPU/CPU Python Verification however

jiyuuchc commented 10 months ago

Right. The relevant code is in python and you likely haven't updated the lacss yet.

jiyuuchc commented 10 months ago

Close as the fix seems to be working.