rctn / sparsecoding

Reference sparse coding implementations for efficient learning and inference.
BSD 3-Clause "New" or "Revised" License
17 stars 4 forks source link

Image Whitening #68

Open HarrisonSantiago opened 1 week ago

HarrisonSantiago commented 1 week ago

There seems to be a lack of documentation in the repo around whitening images. I couldn't find any about how to use the Whitener class in data/transforms/whiten.py, this could be a bit of a barrier to people wanting to quickly try it out for the first time. Additionally, the setup instructions tell users to download pre-whitened images from https://rctn.org/bruno/sparsenet/IMAGES.mat. However, the documentation for those files seems to indicate a different whitening method than the one in the repo.

Do we want to include the original method here, and should we include more documentation around how to build your own whitened images? I threw together a notebook on these that can be more fully fleshed out if needed.

https://colab.research.google.com/drive/1-Gz-vqoUsR8ivmWd_B-nRwy3TXZ7-FEh?usp=sharing

HarrisonSantiago commented 1 week ago

Updated notebook w/ new implementations of frequency, pca, and zca based whitening. I'll try to clean it up and get a new branch going tomorrow. Docs + testing still tbd, maybe a PR by friday?