Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the version of keras #2

Open
zlpsophina opened this issue Sep 14, 2020 · 8 comments
Open

the version of keras #2

zlpsophina opened this issue Sep 14, 2020 · 8 comments

Comments

@zlpsophina
Copy link

Hi ,I got a bug describe as ValueError: Unknown layer:name,this is because the version of keras intalled in your running envrioment is different from mine,so could you please tell me the version of keras you are using?

@RobertJirsaraie
Copy link

Hi @zlpsophina,

I reached out directly to Vishnu regarding this issue and received the follow information below.
Keras==2.2.4
Keras-Applications==1.0.6
Keras-Preprocessing==1.0.5
tensorflow-gpu==1.12.0
pandas==0.23.4
Pillow==5.2.0

I am still running into issues with loading the models that I downloaded directly from the website as pasted below. I am actively debugging why this is happening but if you have any suggestions please let me know.

model = load_model('/scratch/rjirsara/RobertJirsaraie/projects/Models/DBN_Model/Tensorflow/saved_model.pb')
OSError: Unable to open file (file signature not found)

model = load_model('/scratch/rjirsara/RobertJirsaraie/projects/Models/DBN_Model/DBN_model.h5')
AttributeError: module 'tensorflow' has no attribute 'placeholder'

@RobertJirsaraie
Copy link

Hi @zlpsophina,

I got the model to using Python 3.6.3 and the following command below to install tensorflow-gpu==1.12.0, which is the only one that gave me trouble.

python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl

I also ran into the error below when using the 5h file that I directly downloaded from GitHub but the ones on the CBICA website that he linked to the README worked just fine. Hope this helps!

OSError: Unable to open file (file signature not found)

@jakepalmer
Copy link

jakepalmer commented Aug 17, 2021

I've used the below Neurodocker command to generate a Dockerfile for a container that seems to be working. The resulting container has NOT BEEN EXTENSIVELY TESTED but sharing as may be useful starting point for anyone coming across this issue as I did. Some things to note:

  • Intended to use ANTs for non-DeepBrainNet steps (i.e. brain extraction and linear registration)
  • No CUDA libraries are installed as just intended for CPU in my case
  • Downloads templates from TemplateFlow which could be changed easily
  • The DBN_model.h5 is downloaded from the site in the DeepBrainNet README and currently overrides the existing file due to the file signature error noted above

UPDATE:
Using curl https://upenn.app.box.com/v/DeepBrainNet/folder/116313459451/DBN_model.h5 was resulting in zero byte file size and the same OSError: Unable to open file (file signature not found) error. Based on this, selecting "Copy Link Address" through Chrome developer tools gives the full address to download the model with curl. The address is not included here as I don't know whether it would vary between connections or something (and it's really long).

docker run --rm repronim/neurodocker:master generate docker \
        --base=ubuntu:20.04 \
        --pkg-manager=apt \
        --ants version=2.3.0 \
        --miniconda \
                conda_install="python=3.6 pip pandas numpy nibabel keras=2.2.4 tensorflow=1.12.0 pillow scikit-learn git git-annex" \
                pip_install="datalad datalad-installer h5py==2.10.0 --force-reinstall" \
                use_env="base" \
        --run "apt-get update && apt-get install -y \
                libz-dev \
                libpng-dev \
                netbase" \
        --run "git config --global --add user.name test && \
                git config --global --add user.email test && \
                git clone https://github.com/vishnubashyam/DeepBrainNet.git /opt/DeepBrainNet && \
                cd /opt/DeepBrainNet/Models && \
                curl <download link>" \
        --run "datalad install -r ///templateflow && \
                cd /templateflow && \
                datalad get tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz && \
                datalad get tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_desc-brain_T1w.nii.gz && \
                datalad get tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_desc-brain_probseg.nii.gz" > Dockerfile

UPDATE 2:
Came across an implementation of DeepBrainNet in ANTsPyNet (antspynet.utilities.brain_age). Also includes option for preprocessing which makes it very easy to run.

@yaolp123
Copy link

Dear authors:
Recently I have a looking at your this project and feel interested in it ! I am interested in this project, but I also face some challenges. and I wish I could receive your suggestion from your guide.
The question is that, where could I find the used dataset used in this project?
Any suggestion or recommendation is appreciated.
Thank you. I am looking forward to your reply Sincerely!

Best regards.

@mateuszpawlik
Copy link

It took us some time to execute the code and put it in a pipeline. The pipeline is implemented with Nextflow and assumes BIDS dataset input. Feedback is welcome. /cc @tannerjared

@tannerjared
Copy link

tannerjared commented Jan 31, 2024

Thanks! I'll try out the new pipeline and let you know if there are any problems on my end.

@tannerjared
Copy link

I've run the pipeline successfully. I still need to compare results from this pipeline with the semi-automated version. Thanks for putting this together @mateuszpawlik!

@mateuszpawlik
Copy link

Thanks for the feedback @tannerjared. Feel free to open issues and contribute there. FYI There's a short discussion about the predicted values depending on preprocessing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants