Open ankit-rl4 opened 1 year ago
I have same problem with you, did you result it? It is no sense that in put need [2,2,H,W], I have no idea about the second "2". I try to mask the [2,0,H,W] as 1 if the lable is black and [2,1,H,W] as 0 if the lable is white, but when it passed one_hot function, It becomed [2,2,2,H,W]. I have no ideal about the code
Hi , can I train this on breakhis dataset for breast cancer images . It has 3 channel input and grayscale mask. I trained the model with it but the model returns 3 channel output so i had to convert it to grayscale . I am not sure if thats correct the output i got was like this
Which is wrong . I am not sure where i made the mistake. I am a learner.
I have made a change here type cast x to float `class StdConv2d(nn.Conv2d):
and this is the class i use for dataloading
`class BreakhisDataset(Dataset): def init(self, root_dir, split, img_size, transform=None): self.root_dir = root_dir self.transform = transform self.split = split self.img_size = (224, 224) self.image_paths, self.mask_paths = load_dataset(self.root_dir, self.split)
`
and converting it in grayscale like this here
I am trying to figure out what's wrong , The output i get is in 3 channel. I am not sure if its suppose to be that way since i trained it on 3 channel input and grayscale mask