Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Conversation

@arsenyinfo
Copy link
Contributor

@arsenyinfo arsenyinfo commented Jul 10, 2021

This PR implements a new pixel-level domain adaptation transform based on https://github.com/arsenyinfo/qudida. Basically, it fits a simple scikit-learn transform (such as PCA, StandardScaler or MinMaxScaler) on both original and the reference image, transforms the original image with transform trained on this image, and then performs inverse transformation using transform fitted on the reference image.

@arsenyinfo arsenyinfo changed the title [WIP] add PixelDistributionAdaptation transform add PixelDistributionAdaptation transform Jul 11, 2021
@Dipet Dipet requested review from BloodAxe, creafz and ternaus July 11, 2021 14:11
@creafz
Copy link
Contributor

creafz commented Jul 14, 2021

Hey @arsenyinfo

Thanks for your contribution.

Currently, qudida has opencv-python as a dependency, but albumentations' wheel requires opencv-python-headless. So if we merge the current PR albumentations will start to download and install both opencv-python-headless (it own dependency) and opencv-python (qudida's dependency) into a single Python environment.

The simplest way to fix it, in my opinion, is to slightly modify the logic in qudida's setup.py and configure a CI pipeline to upload to PyPI 2 versions of the library:

  1. qudida, which will be the current version that depends on opencv-python.
  2. qudida-headless, which has opencv-python-headless as a dependency (and not opencv-python).

Then we will add qudida-headless as a dependency for albumentations.

If you want, I can contribute a PR with these changes to qudida

@arsenyinfo arsenyinfo changed the base branch from master to add-ultralytics August 10, 2021 17:51
@arsenyinfo arsenyinfo changed the base branch from add-ultralytics to master August 10, 2021 17:51
@BloodAxe BloodAxe merged commit e18dad8 into albumentations-team:master Aug 11, 2021
@arsenyinfo arsenyinfo deleted the arseny/more_domain_adaptation branch August 11, 2021 18:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants