Few-Shot Domain Adaptive Object Detection for Microscopic Images

Sumayya Inayat,Nimra Dilawar,Waqas Sultani,Mohsen Ali
2024-07-10
Abstract:In recent years, numerous domain adaptive strategies have been proposed to help deep learning models overcome the challenges posed by domain shift. However, even unsupervised domain adaptive strategies still require a large amount of target data. Medical imaging datasets are often characterized by class imbalance and scarcity of labeled and unlabeled data. Few-shot domain adaptive object detection (FSDAOD) addresses the challenge of adapting object detectors to target domains with limited labeled data. Existing works struggle with randomly selected target domain images that may not accurately represent the real population, resulting in overfitting to small validation sets and poor generalization to larger test sets. Medical datasets exhibit high class imbalance and background similarity, leading to increased false positives and lower mean Average Precision (map) in target domains. To overcome these challenges, we propose a novel FSDAOD strategy for microscopic imaging. Our contributions include a domain adaptive class balancing strategy for few-shot scenarios, multi-layer instance-level inter and intra-domain alignment to enhance similarity between class instances regardless of domain, and an instance-level classification loss applied in the middle layers of the object detector to enforce feature retention necessary for correct classification across domains. Extensive experimental results with competitive baselines demonstrate the effectiveness of our approach, achieving state-of-the-art results on two public microscopic datasets. Code available at <a class="link-external link-https" href="https://github.co/intelligentMachinesLab/few-shot-domain-adaptive-microscopy" rel="external noopener nofollow">this https URL</a>
Image and Video Processing,Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is Few - Shot Domain Adaptive Object Detection (FSDAOD) in microscopic images. Specifically, the paper aims to overcome the following challenges: 1. **Domain shift problem**: When the data distributions of the source domain and the target domain are different, existing deep - learning models are difficult to be directly applied. Especially in medical image datasets, differences in factors such as imaging devices, illumination conditions, and microscope lens resolutions lead to significant domain shifts. 2. **Scarcity of labeled data**: Medical image datasets usually have problems of class imbalance and scarcity of labeled data. Especially in the few - shot setting, the labeled data in the target domain is very limited, which makes it difficult for the model to effectively learn the features of the target domain. 3. **Insufficient generalization ability**: Existing methods perform poorly when dealing with randomly selected target - domain images. They are prone to over - fitting on small validation sets and perform poorly on larger test sets. In addition, the high class - imbalance and background - similarity problems common in medical image datasets lead to a high false - positive rate and a low mean average precision (mAP). To solve these problems, the paper proposes a new FSDAOD strategy, which mainly includes the following aspects: - **Domain - adaptive class - balance strategy**: Generate samples of rare classes and insert them into images reasonably to balance the class distribution in the dataset. - **Multi - level instance - level cross - domain and intra - domain alignment**: Enhance the instance similarity of the same class between different domains and the instance differences between different classes at the same time, thereby improving the generalization ability of the model. - **Intermediate - layer classification loss**: Apply instance - level classification loss at the intermediate layer of the target detector to ensure that the model can retain the correct classification features, regardless of which domain these features come from. Through these methods, the paper aims to improve the performance of few - shot domain - adaptive object detection in microscopic images, especially when dealing with high class - imbalance and background - similarity situations. Experimental results show that this method has achieved state - of - the - art performance on two publicly available microscopic image datasets. ### Formula summary - **Similarity loss**: \[ L_{\text{sim}}=\sum_{i = 1}^{N}\frac{1}{\binom{n_i}{2}}\sum_{k = 1}^{n_i}\sum_{l = k + 1}^{n_i}\text{sim}(v_{ik},v_{il}) \] where \(v_{ik}\) and \(v_{il}\) are the feature vectors of the \(k\) - th and \(l\) - th instances of the \(i\) - th class respectively, and \(\text{sim}\) represents cosine similarity. - **Differential loss**: \[ L_{\text{dis}}=\sum_{k = 1}^{N - 1}\sum_{l = k + 1}^{N}\max\left(0,\frac{\bar{v}_k\cdot\bar{v}_l}{\|\bar{v}_k\|\|\bar{v}_l\|}-m\right) \] where \(\bar{v}_k\) and \(\bar{v}_l\) are the mean feature vectors of the \(k\) - th and \(l\) - th classes respectively, and \(m\) is the threshold of cosine similarity. - **Classification loss**: \[ L_{\text{cls}}=\sum_{i = 1}^{N}\frac{1}{n_i}\sum_{k = 1}^{n_i}l_{ik} \] where \(l_{ik}\) is the classification loss of the \(k\) - th instance of the \(i\) - th class. - **Total loss**: \[ L_{I2DA}=\lambda_1L_{\text{sim}}+\lambda_2L_{\text{dis}} \]