-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add empirical sampling mode to the RCF model #1339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to add to docs
Lol need to figure out some type hints and stuff too |
probably tests too huh? |
Nah who needs tests??? |
Okay nowwww it LGTM |
Will review post paper |
chiming in at Caleb's request on the naming of the option with Gaussian patches and the option with patches drawn from the dataset: I would call both of these random convolutional features, but in the first the random patches are drawn from a Gaussian distribution and in the second from the empirical distribution of image patches. Thus, I would propose "RCF - Gaussian" and "RCF - Empirical" to distinguish between them, noting that the latter (RCF - empirical) is what what we use in the MOSAIKS paper. To me the most straightforward would be to have one RCF class, with argument for patch_distribution, where that would be either empirical or Gaussian. It's possible that would be harder to implement, so if it's better to have two different classes, maybe RCF_empirical and RCF_gaussian? LMK if I can help clarify further! |
Would RCF-ZCA or RCF-Empirical-ZCA be better since it's more explicit? I'm assuming we could probably use other techniques than ZCA to estimate the kernels using the dataset. |
Yeah using ZCA to whiten the images is an optional preprocessing step but we've found that it can help quite a bit. I still think the most straightforward would be to have one RCF class with arguments for patch_distribution as either "gaussian" or "empirical" and have the ZCA whitening step as an optional (but default?) processing step. Alternatively having two classes (RCF_Gaussian) and (RCF_empirical) and for both of them having ZCA whitening step as an argument make sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we added RCF first, all files and documentation are named after RCF. I haven't read the paper, but my only question is whether we should rename things to be under the RCF or MOSAIKS umbrella.
@adamjstewart @estherrolf -- I combined the functionality of both under a single RCF class that takes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the new organization
The MOSAIKS paper describes RCF, which we've already implemented, and this method (which I'll call MOSAIKS). This method is the same setup as RCF but instead of initializing the conv kernels randomly, you sample patches from the dataset, do ZCA whitening, and use those as the kernels. In some little experiments on EuroSAT and UCM this gives +2 to 5% accuracy over simple RCF kernels.