Hello fyy!



 fyy:

@KFrank,
I try to use U-net model to perform medical image segmentation


At this point, the best I can offer you is some general advice.
First:  Independent of u-net or pytorch or machine learning, you
need to understand the problem you are trying to solve.  You
should look at the data you are working with.  Print out some
images and try to segment them by hand (without a computer).
Draw the segmentation in with a pencil, and see how well you
can do.
With all due respect, you replied:


labels[0,17,128]  tell us The first picture in a batch that Pixel values in row 17 and column 128


to my question:



 KFrank:

What do your labels mean? To be concrete, you say that your
batch-of-labels tensor has shape [4, 244, 244] . What does
the value of a specific element of that tensor mean. That is,
labels[0, 17, 128] is some number. Conceptually, what
is that number telling us?


Your data has meaning.  It’s virtually impossible to do any kind
of worthwhile data analysis (machine learning or not) without
understanding your data.
Second:  You need to learn the basics of pytorch before tackling a
more substantive problem.  I suggest that you work though some of
the pytorch tutorials to learn the framework and tools.  In particular
the Training a Classifier tutorial should be useful because your
segmentation problem is a kind of classification problem.
A hint:  I’m convinced that you are working on a binary segmentation
(classification) problem.  Even though you posted them in (false) color,
when I look at your sample labels images, I see black-and-white (that
is, binary, rather than grayscale) images.
Good luck.
K. Frank