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

How to download the pre-trained models from OSF #36

Closed
LaylaQAQ opened this issue Jul 23, 2024 · 10 comments
Closed

How to download the pre-trained models from OSF #36

LaylaQAQ opened this issue Jul 23, 2024 · 10 comments

Comments

@LaylaQAQ
Copy link

Thanks for the code shared!

I have a question about the 6th step in the "Installation" block:
I'm a new to the linux, there are difficults for me to download files in linux language. May I download the same model straightly in the OSF?
微信图片_20240724002457

@bf777
Copy link
Owner

bf777 commented Aug 14, 2024

Hi @350941716, sorry for the late response on this - you can follow the instructions here (osfclient) to download the tool that will help you get these models from OSF. After installing osfclient in the same Conda environment as MesoNet, you will be able to download these files. If it's still not working for you, try downloading the files listed in get_default_models.sh from our OSF repository: https://osf.io/svztu/. I hope this helps!

@LaylaQAQ
Copy link
Author

LaylaQAQ commented Sep 4, 2024

Oh thanks for your help. 😳
After the issue published, I notice that the DeepLabCut version you used needs a relatively lower version tensorflow pack(1.15), the cuda version corresponds to our GPU(A2000) only supports the tensorflow pack higher versions higher than 1.17.
And unfortunately my python skills are not good enough to support me to modify the contents of the functions in the package.
So it's a pity that we can't use the package any more.😟😟😟

@bf777
Copy link
Owner

bf777 commented Sep 4, 2024

Hi @LaylaQAQ, thanks for letting me know - I am sorry to hear about the TensorFlow issue. I want people including you to be able to use this package with newer tensorflow and deeplabcut versions and will work on updating MesoNet to accommodate these!

bf777 added a commit that referenced this issue Sep 4, 2024
1.20: Updated deeplabcut and tensorflow versions (#36)
@LaylaQAQ
Copy link
Author

Hi @bf777 , thanks for updating the supporting versions, now there is a stable problem throughout this and the previous version: after I press the "predict brain regions using landmarks" button, it always reports this error: ModuleNotFoundError: No module named 'keras.legacy_tf_layers'. I checked up the GPT and it say: the new version of keras don't support 'legacy_tf_layers' method any more. So may there is some way to solve it?
image

@bf777
Copy link
Owner

bf777 commented Oct 22, 2024

Hi @LaylaQAQ , I have set the tensorflow and keras versions to 2.12.0 to attempt to address this issue in a newly pushed version #44. The "predict brain regions using landmarks" button offers a custom workflow that is less reliable (it is based on the checkboxes you select above it). If you can test one of the default pipelines on the right side of the GUI, especially 1 or 2, they should give you comparable results for the calcium image alignment.

@LaylaQAQ
Copy link
Author

Hi@bf777 , I set up the environment again, and now troubles with tensorflow and keras are solved perfectly, thanks very much. There is another problem: I press the '1-atlas to brain' button, it error :'FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\Users\user\Desktop\mesonet\atlas-DongshengXiao-2020-08-03\training-datasets\iteration-2\UnaugmentedDataSet_atlasAug3', below in the pic is my config in the GUI. May I need to change something in my env to reset the path? Or a manual DLC step is necessary?
image

@bf777
Copy link
Owner

bf777 commented Oct 24, 2024

Hi @LaylaQAQ , which folder were you in when you ran the script get_default_models.sh? You may need to run this script, which downloads the files listed in the error message, from within the directory in which it is located (as opposed to running the script from another directory). This will ensure that all external files are downloaded into the dlc subfolder of the mesonet directory (the paths in the directory are relative paths, which may have caused the issue). Alternatively, if you already ran this script, you can look at the script here: https://github.com/bf777/MesoNet/blob/master/mesonet/get_default_models.sh and move each of the files listed into the corresponding subfolders in your mesonet folder.

@LaylaQAQ
Copy link
Author

Hi@bf777, here is another question that, in 'Read me' -> 'installation' -> '6. Run bash get_default_models.sh to download...', in step 5, I'm in the '/Mesonet' folder, but when I input 'bash get_default...' it errors: '/usr/bin/bash: get_default_models.sh: No such file or directory', so I 'cd mesonet' again. And this time in /Mesonet/mesonet path, it downloads a 'models' folder. But it seems not in the path you noted in readme. Is that right? Which 'mesonet' should the 'models' be in? Very thanks.

@bf777
Copy link
Owner

bf777 commented Oct 25, 2024

@LaylaQAQ Yes, you should do it in the mesonet directory within the main MesoNet git repository folder, where the bash script is (check to see in which folder the script is contained). I will make sure this is clearer in the readme.

@bf777
Copy link
Owner

bf777 commented Nov 18, 2024

I am closing this issue due to inactivity.

@bf777 bf777 closed this as completed Nov 18, 2024
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

2 participants