vanvalenlab / deepcell-applications

Run DeepCell Applications
Other
8 stars 6 forks source link

ValueError: input array dimensions for the concatenation axis mismatch #43

Closed KOBE24DUNK closed 4 months ago

KOBE24DUNK commented 4 months ago

Hi,

Thanks for the great tool. The workflow worked smoothly on images with single DAPI and single channel membrane images.

However, I met the following mismatch error when working on DAPI and Membrane(merged by ImageJ) images. (I followed this (https://microscopy.duke.edu/guides/overlay-images-imageJ) tutorial to merge membrane images.)

export APPLICATION=mesmer
export NUCLEAR_FILE=/data/Nuclei.tif
export MEMBRANE_FILE=/data/Composite(RGB).tif
python /usr/src/app/run_app.py mesmer  \
--nuclear-image $NUCLEAR_FILE \
--membrane-image $MEMBRANE_FILE \
--output-directory /data/masks \
--output-name "RGB_mask.tif" \
--compartment "whole-cell"

ERROR: 2024-07-17 15:30:44.533275: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/lib/python3.8/dist-packages/cv2/../../lib64:/.singularity.d/libs 2024-07-17 15:30:44.533327: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2024-07-17 15:30:47.855242: E tensorflow/stream_executor/cuda/cuda_driver.cc:271] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected 2024-07-17 15:30:47.855388: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (hpc-cpu-24): /proc/driver/nvidia/version does not exist 2024-07-17 15:30:47.855675: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. WARNING:tensorflow:No training configuration found in save file, so the model was not compiled. Compile it manually. [2024-07-17 15:30:54,297]:[WARNING]:[tensorflow]: No training configuration found in save file, so the model was not compiled. Compile it manually. Traceback (most recent call last): File "/usr/src/app/run_app.py", line 60, in run_application(dict(ARGS._get_kwargs())) File "/usr/src/app/deepcell_applications/app_runners.py", line 55, in run_application image = dca.prepare.prepare_input(arg_dict['app'], arg_dict) File "/usr/src/app/deepcell_applications/prepare.py", line 36, in prepare_input return prepare_mesmer_input(kwargs) File "/usr/src/app/deepcell_applications/prepare.py", line 75, in prepare_mesmer_input img = np.concatenate([nuclear_img, membrane_img], axis=-1) File "<__array_function__ internals>", line 180, in concatenate ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 19470 and the array at index 1 has size 512

Any help would be quite appreciated.

KOBE24DUNK commented 4 months ago

It looks like I shoudn't merge them.