-
Notifications
You must be signed in to change notification settings - Fork 26
Symmetry Boosting #1072
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
Symmetry Boosting #1072
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1072 +/- ##
===========================================
+ Coverage 88.80% 88.82% +0.02%
===========================================
Files 126 126
Lines 12001 12024 +23
===========================================
+ Hits 10657 10680 +23
Misses 1344 1344 ☔ View full report in Codecov by Sentry. |
b258c81 to
8eb0165
Compare
|
@garrettwrong this is ready for you to take a look. Following up on dev meeting discussion: Implementing the boosting using a loop as opposed to duplicating images (and weights) came with a significant speed up (on laptop) for larger sets of images and high symmetry order. Here are some timings using image duplication with tiling ( |
garrettwrong
left a comment
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.
Thanks, this will be nice to have. Can revisit 10081. Very minor changes.
| i, | ||
| self.weights[:, k], | ||
| symmetry_group=symmetry_group, | ||
| ) / (self.src.n * sym_order) |
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.
Why apply 1/sym_order here instead of in backproject?
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.
No reason other than it made sense to me at the time. This is where we are scaling by number of images and boosting increases the number of images. It also pairs nicely with scaling on line 187.
garrettwrong
left a comment
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.
Thanks for the updates!
I'll try to re-attempt the 10081 gallery example with this branch soon (and the reduction in images that would be induced by boosting as discussed). Depending on what happens there, and with Joakim's review pass, I might ask you to update this PR or make another one with minor updates for the gallery.
janden
left a comment
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.
Looks great!
I feel like I've seen this symmetry group parsing code before. May make sense to have a parsing function (SymmetryGroup.from_string) to encode that logic (including the special case of None → IdentitySymmetryGroup).
Sounds good. Added issue #1083. I'll swing back around and clean that up (in addition to some other symmetry_group issues #1081 I noticed during this PR) Thanks! |

This PR adds symmetry boosting to
MeanEstimatorandWeightedVolumesEstimator.Boosting is controlled by a flag in the
*Estimator's init, which isTrue(on) by default. Then asymmetry_groupis obtained from the providedImageSourceand passed through*Estimator.src_backward()tosource.image.im_backward()and finally toimage.image.backproject()where boosting of the images and rotations occurs.Additionally, boosting takes place when computing the Fourier kernel used in mean estimation.