This work was conducted based on the following paper: Active Domain Adaptation via Clustering Uncertainty-Weighted Embeddings (ICCV 2021)
The main goal of this study was to evaluate whether the proposed approach is applicable to the segmentation task.
The core implementation is located in the src directory. A complete description of all parameters is provided in the run.py file.
A pretrained UNet model can be downloaded from the following link:
UNet Model
To create a virtual environment and install dependencies, run the following commands:
python3 -m venv CLUE
source CLUE/bin/activate
pip install -r requirements.txtBefore running the code, activate the virtual environment:
source ./CLUE/bin/activateExecute the following command to run the code with default parameters:
python3 run.py --train False --num_clusters 20 --clue_softmax_t 0.1 \
--adapt_num_epochs 10 --device cuda:0 --uncertainty CrossEntropy \
--kernel_size 5 --stride 2 --target_size 4096- Ensure that the correct CUDA device is specified in the
--deviceparameter. - Modify the parameters as needed to adapt to different segmentation tasks.