-
Notifications
You must be signed in to change notification settings - Fork 29
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
mriSuperresolution in antspynet #50
Comments
The first example uses a 2-D image (super-resolution is 3-D) and the second example, as stated in the README, is deprecated. Try using the second image in the first example. |
Still facing error:TypeError Traceback (most recent call last) ~/anaconda3/lib/python3.8/site-packages/antspynet/utilities/super_resolution_utilities.py in apply_super_resolution_model_to_image(image, model, target_range, batch_size, regression_order, verbose) ~/anaconda3/lib/python3.8/site-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs) ~/anaconda3/lib/python3.8/site-packages/keras/engine/base_layer.py in init(self, trainable, name, dtype, dynamic, **kwargs) TypeError: Expected |
Please let me know how I can troubleshoot this to get this module working. I am using pop os 21.10 (Linux) as the operating system, in case that is necessary. I tried in ubuntu 20.04 LTS, with no luck as well. And in addition, I also received the same error when trying: image_srr=antspynet.utilities.mri_super_resolution(image) |
I just ran it and didn't have any problem (see below). You might want to clean out your ANTsXNet cache (~/.keras/ANTsXNet) to make sure you have the correct model.
|
Hi, I tried to see whether ANTsXNet cache had files that were not correct. So I cleaned the directory (~/.keras/ANTsXNet) and re run it in two different linux distros.
and the download in the process resulted in writing mriSuperResolution.h5 in the keras cache. ubuntu 20.04 LTS:
so the model seems to be correct if this mriSuperResolution.h5 weight file is supposed to be written in the keras cache. Would be nice to get it running, so please let me know what I should do. I am also new to antspynet and antspy, so your help here would be much appreciated. |
I can't reproduce this error so there's not much I can suggest. However, I would recommend looking at the error that's being thrown in
Perhaps you have an outdated version of keras/tensorflow. |
Hi, Ntustison, So in order to run the newest antspynet edition properly tensorflow 2.8 seems important. now the error that I mentioned earlier, was an error that comes from the model file mriSuperResolution.h5, which has to do with setting some kind of trainable argument, I am not an expert here, just starting on antspy and antspynet. which threw the error in Python 3.9.7 (default, Sep 16 2021, 13:09:58)
It turns out "/home/uname/anaconda3/lib/python3.8/site-packages/keras/engine/base_layer.py", line 349, in init Now that this module is working for me, I do have some follow up questions, although these are not really issues in running the model, but more of the details in understanding the architectures available, and their usage, etc, but I am not sure whether this is the right platform. Its more like a discussion rather than an issue. So it would be great if you could let me know the correct platform for such queries, and discussion. Thank you again for such quick response, the entire ANTS community do care a lot about their users. |
Just start a separate issue. |
Hi encountered the errors, while running image superresolution module of antspynet
And while running the doSuperresolution.py from https://github.com/ANTsXNet/MRISuperResolution:
python Scripts/doSuperResolution.py Data/Example/1097782_defaced_MPRAGE_downsampled.nii.gz 1097782_defaced_MPRAGE_superResolution.nii.gz
I encountered the following errors:
ValueError: Layer count mismatch when loading weights from file. Model expected 125 layers, found 43 saved layers.
Really need help to get it working.
my python version
python 3.8.8
tensorflow 2.8.0
The text was updated successfully, but these errors were encountered: