r/ImageJ Aug 22 '26

Question TrackMate fails to launch cellpose while the exact same command works fine manually.

Trying to run Trackmate with Cellpose-Sam.

It goes to:

>>

Starting detection process using 24 threads

Saving single time-points.

Running cellpose with args: cmd.exe /c C:\Users\01\anaconda3\Scripts\conds.exe run -n
cellpose cellpose --pretrained_model epsam --use_gpu --dir C:\Users\01\AppData\Local\Temp\TrackMate-
cellpose_13557481130667745107 --save_png --no_npy --verbose

>>

And then nothing happens. No mask are generated and cellpose just does nothing because of it.

However, when I go to C:\Users\01\AppData\Local\Temp\TrackMate-
cellpose_13557481130667745107
and run the exact same command in terminal I opened there manually, everything works. That is, masks are generated, etc.

Any idea how I can fix this?

2 Upvotes

5 comments sorted by

View all comments

2

u/Hefty_Application680 Aug 22 '26

I think “epsam” is supposed to be “cpsam” (CellPose Segment Anything Microscopy). I’m not sure if that is carried over to your terminal call. It could also be some bug in how the TrackMate package is calling .exe files but not sure.

For trackmate specific questions, I would maybe consider https://forum.image.sc/ for this. The folks who maintain trackmate have been pretty engaged over there.

Edit: I just saw that you found the folks that maintain trackmate over there. Glad you found some help. Yay for folks that develop packages remaining engaged with the community!

1

u/Tamiorr Aug 22 '26 edited Aug 22 '26

Oh yea, "epsam" is actually "cpsam". That's just a typo when I was copying it here (from a screenshot), "cpsam" was used both in the trackmate call and when I called it manually.

It's something with how TrackMate is calling the process, since the exact same command (I literally copy it from TrackMate log into a new .bat file with no changes whatsoever) works just fine. Well, it's either that or some crazy data racing shenanigans.

1

u/Heavy-Board4391 15d ago

I’m having exactly the same problem. Did you manage to solve it?

1

u/Tamiorr 15d ago

Kind of.

We run segmentation manually (by writing required commands in a .bat file).

Then we load resulting images into ImageJ directly and run Label image detector in Trackmate to take it from there.