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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Source

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