-
Notifications
You must be signed in to change notification settings - Fork 251
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
Channel mismatch error when converting the code to do multi-class segmentation. #24
Comments
The issue is resolved. Error is due to not passing the correct number of out_ch in net = ISNetGTEncoder(in_ch=4, out_ch=4). |
@srivastavashobhit can you please explain how you managed to make a 4-channel label? Thanks |
@kabbas570 The default value of Later, I also had to make changes to the |
@srivastavashobhit, thanks for the reply. Yes, I changed the gt_prrprocess file and the corresponding number of classes in ISNetGTEncoder,and fortunately, it working now, |
I have made changes to your code to do multiclass segmentation. I have taken care that labels are read right. I have already done this job successfully for your last masterpiece, U2NET. In ISNET, I am getting this error when giving a four-channel multiclass label.
RuntimeError: Given groups=1, weight of size [16, 1, 3, 3], expected input[1, 4, 256, 256] to have 1 channels, but got 4 channels instead
I faced the same error in U2Net, but then this code fix at line 354 and line 459 in https://github.com/xuebinqin/U-2-Net/blob/master/model/u2net.py solved it -
Please check if ISNet needs a similar fix.
Thankful for your incredible work.
End notes
I have set out_channel to 4
I am taking care of gt_preprocess and ensuring it returns a four-channel label.
The text was updated successfully, but these errors were encountered: