-
Notifications
You must be signed in to change notification settings - Fork 30
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
Training image and mask error #19
Comments
@Cheng-Lin-Li help wanted |
Please refer to the readme. Your input should be 3 channels (512, 512, 1) |
I step through the code. in load_2d_data.py line84, "mask = convert_mask_data(mask)" convert mask images to NPZ,Then,in custom_data_aug.py line238 "change_background_color" need 4 channels( Convert mask color of 4 channels png image to new color ).I checked coco's mask is 4 channel, so it works. For my data, mask is 2D (512,512) binary image, I annotated line84 “convert_mask_data” line instead of adding mask=np.expand_dim(mask,-1) to make mask being (512,512,1).so It works for my data. |
Then,I trained my data,but val_out_seg_dice_hard did not improve from 0.42 after 2 epoch, and test result is error. 996/1000 [============================>.] - ETA: 4s - loss: 0.7128 - out_seg_loss: 0.6852 - out_recon_loss: 0.0276 - out_seg_dice_hard: 0.1990INFO 2019-11-30 16:02:46,381: 997/1000 [============================>.] - ETA: 3s - loss: 0.7129 - out_seg_loss: 0.6852 - out_recon_loss: 0.0276 - out_seg_dice_hard: 0.1989INFO 2019-11-30 16:02:47,458: 998/1000 [============================>.] - ETA: 2s - loss: 0.7127 - out_seg_loss: 0.6851 - out_recon_loss: 0.0276 - out_seg_dice_hard: 0.1990INFO 2019-11-30 16:02:48,536: 999/1000 [============================>.] - ETA: 1s - loss: 0.7125 - out_seg_loss: 0.6849 - out_recon_loss: 0.0276 - out_seg_dice_hard: 0.1990INFO 2019-11-30 16:02:49,680: 1000/1000 [==============================] - 1082s 1s/step - loss: 0.7122 - out_seg_loss: 0.6846 - out_recon_loss: 0.0276 - out_seg_dice_hard: 0.1995 - val_loss: 0.6265 - val_out_seg_loss: 0.5915 - val_out_recon_loss: 0.0351 - val_out_seg_dice_hard: 0.3270 Epoch 00014: val_out_seg_dice_hard did not improve from 0.39148 I adjust the cords,such as initial_lr, loss. The effects did not improved. |
Thank you for your implementation of SegCaps.
I train on my dataset ,got a problem"Unable to load img or masks for 00001,too many indices for array,Skipping file".
When loading MSCOO dataset with 10 images, it works.
My image are 2D uint8 greyscale of (512,512), masks are the same 2D uint8 greyscale of (512,512). I checked the Issues, someone said masks should be (512,512,1), Does my images and masks fit the input format?If not, what should I do for it?
Any advice would be appreciated.
The text was updated successfully, but these errors were encountered: