Image_Segmentation icon indicating copy to clipboard operation
Image_Segmentation copied to clipboard

some queries

Open soans1994 opened this issue 2 years ago • 1 comments

hello author,

i have some queries regarding your work.

  1. did you use pretrained weights?
  2. input image size is 224x224? how did you select this sorry for noob questions. thank you

edit: i just realized you use binary ground truth. how to change for rgb lables. edit: i chnged the output channles to 3, but i still get errors

why choose batch size 1? for batch size 1 i get error as follows:

File "/home/rahul/.local/lib/python3.8/site-packages/torch/nn/functional.py", line 2069, in binary_cross_entropy raise ValueError("Target and input must have the same number of elements. target nelement ({}) " ValueError: Target and input must have the same number of elements. target nelement (147456) != input nelement (49152)

and for higher batch size i get error,

File "/home/rahul/.local/lib/python3.8/site-packages/torch/utils/data/_utils/collate.py", line 55, in default_collate return torch.stack(batch, 0, out=out) RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 192 and 336 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:612

thank you

soans1994 avatar Aug 06 '21 07:08 soans1994

For input image size is 224x224?, you can check this https://news.ycombinator.com/item?id=12509852, The output channel number is usually 1 in order to get better performance The batch size can change as you like, but the loss the author select is torch.nn.BCELoss(), so you should make there are only two areas of your target. Hope this may help you!

Lloyd-Pottiger avatar Nov 12 '21 16:11 Lloyd-Pottiger