Skip to main content

Package for doing optimal transport based domain adaptation.

Project description

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.

Project details


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)

Uploaded Source

Built Distribution

otda-0.0.1-py3.8.egg (7.1 kB view details)

Uploaded Source

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

Hashes for otda-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c844ef383710a846eabe4fd5fd3b1fde5ecf5ec94cb4d4d50a1d31579dd1909e
MD5 f1f9a7cdfce6e77bf27059bb817c2b80
BLAKE2b-256 af7bd1b808acb8d0ab21c8203d96762f45eb3e511f5a274808751b40cba6fc96

See more details on using hashes here.

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: 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

Hashes for otda-0.0.1-py3.8.egg
Algorithm Hash digest
SHA256 4b62e921650744131b9df22d995c58d14dc026397d1c520ec5f502d6753a4bcf
MD5 737721eab9ec8ff985db79eb8e4b8308
BLAKE2b-256 6ec7ded1dc34e1c47f385d14be68b9fd4e6cba7f7eff029bdd0244f5187c0f90

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page