Open jayluo2 opened 2 years ago
Hey @jayluo2, are you running the code locally within a docker or in a virtual environment?
Hi @ngreenwald, I am running Python 3.9.0 in a virtual environment (local).
Got it. We've found that different tensorflow versions can interact in unpredictable ways local machines/trained models. Can you try running it from within the docker to confirm? The instructions are in the main readme.
I am on MacOS 11.3.1 (Big Sur) and don’t think CUDA is supported for this OS. Is there another way to verify?
Hmm, maybe @tddough98 can weigh in?
There's been some work on tensorflow consistency recently, not on my part tho. @elaubsch @msschwartz21 might know more about subtle differences in tensorflow
Are https://deepcell.org/predict and the code version using different versions of Tensorflow? Is there a workaround for this?
Hi Jay,
I confirmed that we are in the process of upgrading the tensorflow environment and model that runs on deepcell.org to match the one in deepcell 0.12. You can keep an eye on this issue (https://github.com/vanvalenlab/kiosk-console/issues/466) to see when we have made the change.
In the meantime, you can try pinning deepcell to 0.11.2 which should match the results you are getting from deepcell.org.
Hi @msschwartz21, deepcell 0.11.2 doesn’t appear to be available on pip (I’m using pip 20.2.3). The installation error is below. Would deepcell 0.11.1 work?
ERROR: Could not find a version that satisfies the requirement deepcell==0.11.2 (from versions: 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.9.0, 0.9.1, 0.9.2, 0.10.0rc1, 0.10.0rc2, 0.10.0rc3, 0.10.0, 0.10.1, 0.10.2, 0.11.0rc1, 0.11.0, 0.11.1, 0.12.0rc0, 0.12.0rc1, 0.12.0rc2, 0.12.0, 0.12.1, 0.12.2)
ERROR: No matching distribution found for deepcell==0.11.2
You may need to create an environment with Python 3.6-3.8 but any 0.11 version of deepcell should also be fine.
Describe the bug Inconsistent segmentation results between https://deepcell.org/predict and code implementation.
To Reproduce Steps to reproduce the behavior: Use the below image as input to https://deepcell.org/predict, with settings
and in code,
output = app.predict(image, image_mpp=1, batch_size=1)
where app is the Mesmer object with pretrained weights. ‘image’ is a numpy array of dimensions (1, 1024, 1024, 2), with both channels containing the same image (below).Expected behavior Identical/nearly identical segmentations between https://deepcell.org/predict and local implementation.
Screenshots Left: binarized predictions (local). Right: https://deepcell.org/predict results. Red boxes highlight example regions of missed cells.
Desktop (please complete the following information):
Additional context I have two questions:
If both the pretrained weights and other configurations are the same across the web and code versions, I am confused on why some cells would be missed in the code version.