-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 plasmashadow #2153
Add plasmashadow #2153
Conversation
Reviewer's Guide by SourceryThis PR introduces a new image augmentation transform called PlasmaShadow that creates organic-looking shadows using plasma fractal noise patterns. The implementation follows the existing pattern of other transforms in the codebase and includes comprehensive documentation, parameter validation, and integration with the existing augmentation framework. Sequence diagram for applying PlasmaShadowsequenceDiagram
participant User
participant PlasmaShadow
participant fmain
User->>PlasmaShadow: Call apply(img, intensity, plasma_pattern)
PlasmaShadow->>fmain: Call apply_plasma_shadow(img, intensity, plasma_pattern)
fmain-->>PlasmaShadow: Return shadowed image
PlasmaShadow-->>User: Return shadowed image
Class diagram for the new PlasmaShadow transformclassDiagram
class PlasmaShadow {
+tuple[float, float] shadow_intensity
+int plasma_size
+float roughness
+float p
+bool|None always_apply
+get_params_dependent_on_data(params: dict[str, Any], data: dict[str, Any]) dict[str, Any]
+apply(img: np.ndarray, intensity: float, plasma_pattern: np.ndarray, **params: Any) np.ndarray
+get_transform_init_args_names() tuple[str, ...]
}
PlasmaShadow --|> ImageOnlyTransform
class ImageOnlyTransform {
<<abstract>>
}
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: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟡 Complexity: 1 issue found
- 🟢 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2153 +/- ##
=========================================
+ Coverage 0 90.33% +90.33%
=========================================
Files 0 48 +48
Lines 0 8391 +8391
=========================================
+ Hits 0 7580 +7580
- Misses 0 811 +811 ☔ View full report in Codecov by Sentry. |
Adresses: #2105
Summary by Sourcery
Add the PlasmaShadow transformation to apply organic-looking shadow effects using plasma fractal noise patterns, update documentation, and include tests for the new feature.
New Features:
Enhancements:
Documentation:
Tests: