albumentations-team / albumentations

Fast and flexible image augmentation library. Paper about the library: https://www.mdpi.com/2078-2489/11/2/125
https://albumentations.ai
MIT License
14.23k stars 1.65k forks source link

Question // potential transformations // Image Statistics Matching #641

Open aabramovrepo opened 4 years ago

aabramovrepo commented 4 years ago

Dear All,

first of all, thanks for making this library available, some great work here! Together with my colleagues I have been working over the last year on unsupervised Domain Adaptation (DA) for object detection. In our work a DA problem for object detection was tackled from a new perspective: we solely matched image statistics between source and target domains without involving additional architectural add-ons and hyper-parameters. Thus, a detection model and training schedule stay as they are and you get state-of-the-art performance in the presence of a domain shift. For matching we used two operations: Feature Distribution Matching and Histogram Matching, you can find further details along with all experiments in our paper for CVPR'20 workshop:

Keep it Simple: Image Statistics Matching for Domain Adaptation.

From my point of view, both methods can be used for data augmentation as well, however, they require images from target distribution (or similar ones). I'm just wondering whether this might be of interest for albumentations library, so it would be great to hear your opinion on this. I could actually make a proposal with both methods for the library.

Best, Alexey

BloodAxe commented 4 years ago

Greetings Alexey! Thanks for your proposal. It's indeed looks interesting and this technique could be considered as augmentation. Do you have an open-source implementation of your work, so that we can take a look and see what's needed to make albumentations-compatible wrapper and measure processing time?

aabramovrepo commented 4 years ago

@BloodAxe thanks for your response! Actually we are planning to make the code with all experiments open source over this summer. However, only Histogram Matching and Feature Distribution Matching parts are relevant for Albumentations. I think I could prepare a pull request with both operations for the library (taking already implemented operations as an example) and then we can polish it, would this be fine?

BloodAxe commented 4 years ago

@aabramovrepo any updates on this? We are looking forward to see the draft and ready to help you with the integration of your PR.

aabramovrepo commented 4 years ago

@BloodAxe thanks for getting back to me! Yes, we are preparing at the moment a separate small repository with Histogram Matching and Feature Distribution Matching only, so that you can easily guide us through the integration. Our code will come with unit tests (pytest) and will satisfy mypy / flake8 / pylint checks. I will ping you as soon as we are ready. I think we still need about 1-1.5 months.

aabramovrepo commented 3 years ago

@BloodAxe our repository is finally online, please have a look: image-statistics-matching, we can talk about the integration, it would be great if you could give us a short overview of Albumentation's architecture.