Fourier Domain Adaption (FDA)
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
Install with pip
$ python3 -m pip install fda --user
Install from source
$ python3 setup.py install --user
Exemplary code snippet
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)
Run domain adaptation on a single image
$ python3 -m fda.run --source source.jpg --target target.jpg --output output.jpg --beta 0.005
Some examples of the domain adaptation
| 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 |
Run unit tests
$ python3 tests/test_fourier.py
License
This repository is shared under an MIT license.
Author
Luis Carlos Garcia Peraza Herrera (luiscarlos.gph@gmail.com), 2020-2022.
Metadata
Release files for fda 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fda-0.0.2.tar.gz | 5.4 kB | Without provenance | Details |
Release files / fda-0.0.2.tar.gz
| Download URL | fda-0.0.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98909787906edd7df7fa27e61236c75f67e37656cd830d4f3d1211c8894ff28b
|
|
BLAKE2b-256 checksum How to use checksums |
2f6e0f0bd795ea11cad9e1596acfd6772df0a19de697d807813ca7f21d16550f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.4.2 requests/2.27.1 setuptools/62.3.1 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.10
|
Security for fda 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.