mayool:

What I want is a binary pixelwise prediction that says me for each pixel, if that pixel belongs to a car/human/whatever or whether it is background.


Based on this description, it seems you would like to work on a multi-class segmentation rather than a binary segmentation, as you are dealing with multiple classes.
Alternatively, if each pixel might belong to multiple classes, you would work on a multi-label segmentation.



 mayool:

I’ve read that I can use nn.ConvTranspose2d() to upsample, but I have no idea what values the parameters should take in order to end up with a pixelwise prediction.


The parameters for upsampling depend on the number of layers you would like to use.
You could “revert” the conv/pooling operation or use another setup with more or less transposed convs.
I’ve written quite a simple UNet implementation a while ago and you can find it here 29.
Maybe it’s good as a starter code or you could have a look at the setup of the transposed conv layers.