Now I want to go back and project it on the real image, or to reconstruct only the segment image form real, what is the easy way to do that?
my real image:  (slice=78, h=633, w=788)
after I do idx = (pred == class_idx).nonzero() I get:
3 ndarray with 4293160.
Not I get in trouble to project it on the real image and reconstruct only the part of the segment, but with saving the pixel value.