This Python package implements a classic frequency domain adaptation, as shown in:
FDA: Fourier Domain Adaptation for Semantic Segmentation, Yanchao Yang and Stefano Soatto, CVPR 2020
$ python3 -m pip install fda --user
$ python3 setup.py install --user
import fda
# Read source and target images
source_im = cv2.imread('source.jpg')
target_im = cv2.imread('target.jpg')
# Perform domain adaptation
adapted_im = fda.fda(source,_im, target_im, beta=0.005)$ python3 -m fda.run --source source.jpg --target target.jpg --output output.jpg --beta 0.005
| Source image | Target domain image | Beta | Output |
|---|---|---|---|
![]() |
![]() |
0.001 | ![]() |
| 0.01 | ![]() |
||
| 0.1 | ![]() |
||
![]() |
![]() |
0.001 | ![]() |
| 0.01 | ![]() |
||
| 0.1 | ![]() |
||
![]() |
![]() |
0.001 | ![]() |
| 0.01 | ![]() |
||
| 0.1 | ![]() |
$ python3 tests/test_fourier.py
This repository is shared under an MIT license.
Luis Carlos Garcia Peraza Herrera (luiscarlos.gph@gmail.com), 2020-2023.














