  Image demosaicing is an important step in the image processing pipeline for
digital cameras. In data centric approaches, such as deep learning, the
distribution of the dataset used for training can impose a bias on the
networks' outcome. For example, in natural images most patches are smooth, and
high-content patches are much rarer. This can lead to a bias in the performance
of demosaicing algorithms. Most deep learning approaches address this challenge
by utilizing specific losses or designing special network architectures. We
propose a novel approach, SDAT, Sub-Dataset Alternation Training, that tackles
the problem from a training protocol perspective. SDAT is comprised of two
essential phases. In the initial phase, we employ a method to create
sub-datasets from the entire dataset, each inducing a distinct bias. The
subsequent phase involves an alternating training process, which uses the
derived sub-datasets in addition to training also on the entire dataset. SDAT
can be applied regardless of the chosen architecture as demonstrated by various
experiments we conducted for the demosaicing task. The experiments are
performed across a range of architecture sizes and types, namely CNNs and
transformers. We show improved performance in all cases. We are also able to
achieve state-of-the-art results on three highly popular image demosaicing
benchmarks.
