Domain adaptation based on optimal transport
Python package to simplify OT-based domain adaptation. This package uses POT as optimal transport backend.
Install with pip
$ python3 -m pip install otda --user
Install from source
$ python3 setup.py install --user
Exemplary code snippet
adapted_im = otda.colour_transfer(source_im, target_im, method='linear', nsamples=1000)
Run domain adaptation on a single image
$ python3 -m otda.run --source source.jpg --target target.jpg --output output.jpg --method emd
Available methods: linear, gaussian, sinkhorn, emd.
Some examples of the colour adaptation
| Source image | Target domain image | Method | Output |
|---|---|---|---|
| Linear | |||
| Gaussian | |||
| Sinkhorn | |||
| Earth mover's distance (EMD) |
License
This repository is shared under an MIT license.
Author
Luis Carlos Garcia Peraza Herrera (luiscarlos.gph@gmail.com), 2020-2022.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
otda-0.0.1.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
otda-0.0.1-py3.8.egg
(7.1 kB
view details)
File details
Details for the file otda-0.0.1.tar.gz.
File metadata
- Download URL: otda-0.0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c844ef383710a846eabe4fd5fd3b1fde5ecf5ec94cb4d4d50a1d31579dd1909e
|
|
| MD5 |
f1f9a7cdfce6e77bf27059bb817c2b80
|
|
| BLAKE2b-256 |
af7bd1b808acb8d0ab21c8203d96762f45eb3e511f5a274808751b40cba6fc96
|
File details
Details for the file otda-0.0.1-py3.8.egg.
File metadata
- Download URL: otda-0.0.1-py3.8.egg
- Upload date:
- Size: 7.1 kB
- Tags: Egg
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b62e921650744131b9df22d995c58d14dc026397d1c520ec5f502d6753a4bcf
|
|
| MD5 |
737721eab9ec8ff985db79eb8e4b8308
|
|
| BLAKE2b-256 |
6ec7ded1dc34e1c47f385d14be68b9fd4e6cba7f7eff029bdd0244f5187c0f90
|