Hi, I need some help with a custom loss function that I’m trying to build for a class project

I’m trying to make a GAN model to reconstruct one image from another. So I have two MRI images I put one example of these images, which my input is the top one and the target is the bottom one. My problem here is that I’m trying to create a custom loss function that would penalize pixels that are from the background that are not inside of the brain. A professor told me about masking the image inside of the loss function so I’m kinda lost :/. Can anyone help me ?

Edit: My image didn’t upload so I’m attaching the link

submitted by /u/DaSpaceman245
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *