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

Tuple index out of range #1

Open
sp4m4r opened this issue Aug 13, 2021 · 4 comments
Open

Tuple index out of range #1

sp4m4r opened this issue Aug 13, 2021 · 4 comments

Comments

@sp4m4r
Copy link

sp4m4r commented Aug 13, 2021

Ladies and Gentlemen,

thank you for sharing this very interesting work. I'm not a specialist in neural networks but anyway very interested in trying to apply your method.

I updated and installed all required packeges, using pip(3) and python 3.9.5. However, using the example from the folder "Archive/Automatic_SEM_Image_Segmentation' I'm getting the error:

File "C:\Users***\Desktop\automatic-sem-image-segmentation-master\Archive\Automatic_SEM_Image_Segmentation\startProcess.py", line 347, in
imgTiles = imgTiles.reshape([imgTiles.shape[0], imgTiles.shape[1], imgTiles.shape[2], 1]) / 255.0
IndexError: tuple index out of range

As the template is used right as is I can not figure out what's causing the problem here. Any suggestion is very welcome, thank you in advance!

@iMasak
Copy link

iMasak commented May 11, 2022

I see the same issue while testing the archive file and data.
Are there any updates or solutions?
thank you,

@bruehle
Copy link
Collaborator

bruehle commented May 14, 2022

This error is most probably due to changes in one of the dependencies that is not backwards compatible. I tested it with the following dependency versions, and it ran without a problem (tested on Windows 10, python 3.7.4, CUDA 11.1, cuDNN 7.6):

numpy==1.18.5
tensorflow==2.2.0
tensorflow_addons==0.11.2
imageio==2.5.0
scikit-image==0.15.0
Pillow==8.2.0
scipy==1.4.1
opencv-python==4.5.2.54
matplotlib==3.5.2
tqdm==4.62.3
opensimplex==0.3

I hope I will eventually get around uploading an updated and refactored version of the code that will also run with more recent versions of the dependencies, but in the meantime, please let me know if using the above-mentioned versions fixed your issue.

PS: If you are getting an error during saving the CycleGAN model, you might also need to shorten the path name (the default after downloading, i.e., C:\users<username>\Documents\automatic-sem-image-segmentation-master\Automatic_SEM_Image_Segmentation might create too long pathnames after appending the model save path, C:\users<username>\Documents\segmentation should however work).

@pramethg
Copy link

pramethg commented Aug 5, 2022

Ladies and Gentlemen,

thank you for sharing this very interesting work. I'm not a specialist in neural networks but anyway very interested in trying to apply your method.

I updated and installed all required packeges, using pip(3) and python 3.9.5. However, using the example from the folder "Archive/Automatic_SEM_Image_Segmentation' I'm getting the error:

File "C:\Users***\Desktop\automatic-sem-image-segmentation-master\Archive\Automatic_SEM_Image_Segmentation\startProcess.py", line 347, in
imgTiles = imgTiles.reshape([imgTiles.shape[0], imgTiles.shape[1], imgTiles.shape[2], 1]) / 255.0
IndexError: tuple index out of range

As the template is used right as is I can not figure out what's causing the problem here. Any suggestion is very welcome, thank you in advance!

Were you able to fix this?

@bruehle
Copy link
Collaborator

bruehle commented Aug 5, 2022

The error should not occur when using the versions mentioned in my comment above. Please use

pip install -r requirements.txt

to install the packages with the versions mentioned above. And please also make sure you also have the correct versions of python, CUDA, and cuDNN installed (if I remember correctly, tensorflow 2.2 is not compatible with python 3.9).

I am currently working on an updated and refactored version of the code that will run with newer versions of python and tensorflow which I hope to release next week, but in the meantime, please try with the versions mentioned above.

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

4 participants