For a mutually exclusive binary classification, i.e. only one class can be set at any time, I would change the output channel to 1.
If you are dealing with a multi-label classification, i.e. both classes can be set for a sample, you should use multiple channels, but this doesn’t seem to make much sense using a background and foreground class.