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
Unable to load the repository in google colab #80
Comments
Hi @sankalpmittal1911-BitSian |
Thank you for the reply. I will check and get back to this ASAP. |
I followed your suggestions. Now it shows this error. I think it is a typo. Can you please change the name in your repository? I think it is in init.py inside segmentation_models/backbone/ (Here: segmentation_models/segmentation_models/backbones/init.py) (On second thought, its not a typo. Then why is it showing the error?) Thank you. |
|
I am trying to run the model in google collaboratory and it uses !pip instead of pip and !git instead of git. Shall I use !pip install setup.py or something? |
|
Thanks a lot. The first one worked. Will get back with the results. |
I am trying to do multiclass segmentation here. I call the model by:
The input is formed by combining 7 grayscale images stacked as (128,128,7) i.e. 7 channels. The error which comes now is:
This has something to do with input shapes. How to eliminate this error? |
ImageNet weights are compatible only with (None, None, 3) shape. In case of (None, None, 7) set |
Thanks. This essentially means I will have to train model from scratch. |
I am closing this issue. I will create a new issue of implementation if necessary. Thank you once again. |
One more note, choose another network for multiclass segmentation. Unet has only 16 filters at the end, it would be hard to separate 255 classes. Better take PSP or FPN. |
Yes I will. I will get back with the results in the new issue (if needed). Also does increasing the filters in UNet help? I tried with 256 filters in my custom model and it was still failing. Thanks. |
Never did it with so many classes. I think it depends on data a lot. P.S. add aux output to help training (reed paper of PSPNet) |
I will try batch-wise loading using a custom generator to reduce memory. As a sanity check, I tried implementing U-Net for just 10 images to check if it at least overfits them:
Hopefully I am not downsampling anything since original dimensions are (128,128). U-Net does not seem to figure out even for little data if the classes are 255. It's actually crop segmentation. I will try those suggestions and create a new issue. Thanks. Edit: use weighted loss function. Please explain? Currently I am using categorical cross entropy since it's pixel-wise classification in a way. |
I guess you have different number of pixels for each class, so your data is imbalanced. Read paper (pspnet), you will find a way to modify loss function in this case. |
Hi, I'm trying to install this library on google google colab with him. (from source code). Thank you for your help.
I found that keras_applications are needed, but I'm working on google colab (tf.keras.applications already exists.) So I want to install SM with tf.keras.applications, not separate keras_applications. Could I do that? |
I have already cloned the repository using:
!git clone https://github.com/qubvel/segmentation_models
Now when I try to load it (import it), it shows following error:
from segmentation_models import Unet
Can anyone help regarding this? Thanks.
The text was updated successfully, but these errors were encountered: