-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Speed up elastic #2321
Speed up elastic #2321
Conversation
Reviewer's Guide by SourceryThis pull request focuses on optimizing the Sequence diagram for optimized elastic transformsequenceDiagram
participant M as Main Process
participant G as Random Generator
participant B as Gaussian Blur
M->>G: Request noise fields
G-->>M: Return pre-allocated fields
M->>B: Apply blur to all fields at once
B-->>M: Return blurred fields
Note over M: Scale fields by alpha
Note over M: Return field views
Flow diagram for optimized elastic transform processflowchart TD
A[Start] --> B[Generate Fields]
B --> C{Same DXDY?}
C -->|Yes| D[Generate single field]
C -->|No| E[Generate two fields]
D --> F[Apply Gaussian Blur]
E --> F
F --> G[Scale by Alpha]
G --> H[Return displacement fields]
H --> I[End]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ternaus - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Improve the performance and memory efficiency of the elastic transform by optimizing displacement field generation and map creation. Use vectorized operations and in-place modifications to reduce memory usage and speed up computations.
Enhancements:
Tests: