Calling StarDist from QuPath no error but does not produce anything

Dear @petebankhead,
sorry to bug you but can’t figure out what is going on. I get no error although I get no cells detected. I do not get the printed “Done!” but it is not running (looking at the resource monitor).

I have built successfully QuPath from source in Windows 7 and included tensorflow (to be able to call StarDist). I then create a project, add an image, create an annotation and make a script from the readthedocs:

import qupath.tensorflow.stardist.StarDist2D

// Specify the model directory (you will need to change this!)
def pathModel = ‘E:/Alvaro/QuPath/Models/dsb2018_heavy_augment’

def stardist = StarDist2D.builder(pathModel)
.threshold(0.5) // Probability (detection) threshold
.channels(‘DAPI’) // Specify detection channel
.normalizePercentiles(1, 99) // Percentile normalization
.pixelSize(0.5) // Resolution for detection

// Run detection for the selected objects
def imageData = getCurrentImageData()
def pathObjects = getSelectedObjects()
if (pathObjects.isEmpty()) {
Dialogs.showErrorMessage(“StarDist”, “Please select a parent object!”)
stardist.detectObjects(imageData, pathObjects)
println ‘Done!’

I am confused because I am doing the same thing that I did yesterday on my mac and there it works like magic.

If you used the GPU version on Windows, try switching to the CPU.
Otherwise, I’m afraid I don’t know – I’m not aware of any reason why it might be different on Windows 7.

Dear @petebankhead,

thanks for the answer. I tried again, a clean installation on windows 7 double checking that it was CPU. Nothing, it does the same. No error but no output. I guess an upgrade to windows 10 was due alrerady. BTW I built qupath this morning on a windows 10 and it runs perfectly.


Thanks @acrevenna for reporting back.

With StarDist?

If so, I guess perhaps some dependency may just not be Windows 7 compatible – I don’t have very many systems to test with, so depend upon feedback like this to know what works :slight_smile:

1 Like

Yes! Ptensorflow-cpu=true in windows 10. No can do windows 7.
Anyway, thanks for making this available man!