Question about antsxnet_cache_directory (string) in antspynet.utilities.brain_extraction.
Hi, When I exacted brain using antspynet.utilities.brain_extraction according to AntsPyNet document (https://antsx.github.io/ANTsPyNet/docs/build/html/utilities.html#applications), an error happened.
According this document, the antsxnet_cache_directory was used to store the downloaded template and model weights. I haved download brainExtractionRobustT1.h5 and S_template3_resampled.nii.gz in a folder. Then I set antsxnet_cache_directory to this folder path. the code was as following:
brainExtractionRobustT1.h5 and S_template3_resampled.nii.gz were in /home/wei/DeepLearning/Model_pth/, Since I haved downloaded template and model weights to the folder path which antsxnet_cache_directory was pointed to,why antspynet.utilities.brain_extraction still need to download data from https://ndownloader.figshare.com/files/22597175
Then I copy brainExtractionRobustT1.h5 and S_template3_resampled.nii.gz to ~/.keras/ANTsXNet, and run antspynet.utilities.brain_extraction twice, the same error happed.
When I copy https://ndownloader.figshare.com/files/22597175 to my google chrome, It automatically download S_template3_resampled.nii.gz . I don't know the reason why error happend.
Code looks correct, always good to verify that the file is accessible before calling brain_extraction
import os
mycachedir = '/home/wei/DeepLearning/Model_pth/'
os.listdir(mycachedir)
os.access(os.path.join(mycachedir, 'brainExtractionRobustT1.h5'), os.R_OK)
And, fyi, I would always check with the self-contained, minimal tutorials for antsxnet available here.
Code looks correct, always good to verify that the file is accessible before calling brain_extraction
import os mycachedir = '/home/wei/DeepLearning/Model_pth/' os.listdir(mycachedir) os.access(os.path.join(mycachedir, 'brainExtractionRobustT1.h5'), os.R_OK)
Thanks! I tried the code above and the file is accessible.
The same error happened as before. Is it needed to install any other dependencies or Tensorflow/pytorch before using brain_exaction?
I made #130 in an effort to simplify cache issues like this