CompImg / LST-AI

LST-AI - Deep Learning Ensemble for Accurate MS Lesion Segmentation
https://doi.org/10.1016/j.nicl.2024.103611
MIT License
20 stars 4 forks source link

error in Conv3DTranspose #28

Closed tylerreekes closed 10 hours ago

tylerreekes commented 5 days ago

When running the segmentation, the following TypeError message is returned: Exception encountered: Unrecognized keyword arguments passed to Conv3DTranspose: {'groups': 1}

We installed the software via the python recommended steps with the following exception: -downloaded greedy binaries from ITK-SNAP instead of wget (6.1.i) MacBook M3 - macOS Sonoma 14.6.1
TensorFlow Version: 2.18.0

jqmcginnis commented 5 days ago

Hi @tylerreekes, thanks for posting the problem here :+1:

Can you let me know how you create the environment and installed the python version? The tensorflow version does not comply with the versions specified in the setup.py (i.e. < 2.16), so I am curious how it's possible that the installation is using a higher version. Did you have any other environments activated while created the venv? Did the installation succeed or were there any error messages?

Best, Julian

tylerreekes commented 5 days ago

We create and source the virtual environment in the same way as described in steps 2 and 3. python3 -m venv /Users/tylerreekes/lst_env source /Users/tylerreekes/lst_env/bin/activate

From here we pip installed LST-AI and HD-BET. We then compiled the greedy binaries as instructed in ~/bin.

In the virtual environment, we pip/brew installed tensor flow. Both installations were successful.

tylerreekes commented 5 days ago

We were able to run and get results with the following steps. We downloaded an older version of python (3.9) and that allowed for older versions of numpy and tensorflow not available in the current version(s) (>3.12).

We confirmed it worked with v 3.9 but have not checked other more recent versions.

brew install python@3.9

mkdir lst_directory cd lst_directory

python3.9 -m venv /Users/tylerreekes/lst_env source /Users/tylerreekes/lst_env/bin/activate

git clone https://github.com/CompImg/LST-AI/ cd LST-AI pip install -e . cd ..

git clone https://github.com/MIC-DKFZ/HD-BET cd HD-BET
pip install -e .
cd ..

download ITK-SNAP http://www.itksnap.org/pmwiki/pmwiki.php?n=Downloads.SNAP4.

ITK-SNAP is packaged with several useful command-line programs. Visit http://itksnap.org/cmdl for a listing of these tools.

To create links to these programs in /usr/local/bin, execute the following command in the Terminal App:

sudo /Applications/ITK-SNAP.app/Contents/bin/install_cmdl.sh

To create links in another directory 'my_directory', execute

sudo /Applications/ITK-SNAP.app/Contents/bin/install_cmdl.sh ~/bin

To enable the tools for a single session, enter this command into the Terminal window:

export PATH=/Applications/ITK-SNAP.app/Contents/bin:$PATH

cd LST-AI

pip install -r requirements.txt

use --cpu if gpu is not available

lst --t1 /path/to/T1/.nii.gz --flair /path/to/FLAIR/.nii.gz --temp /path/to/temporary/directory --output /path/to/results/folder

jqmcginnis commented 5 days ago

Fantastic @tylerreekes ! 🙂

I hope the rest works seamlessly! Let us know if you encounter any other problems, and thanks for reporting back!

I will add this issue to our future release issues #27. Adding this as a note to our future development efforts:

@twiltgen lets look if we can find a way of supporting newer versions of python, or if we need to limit this in setup.py as well, soon or later we might need to change the model format to incorporate more recent tf releases as well.

Cheers,

Julian