-
-
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 rotate and project #2159
Add rotate and project #2159
Conversation
Reviewer's Guide by SourceryThis PR introduces a new geometric transformation called Sequence diagram for RotateAndProject transformationsequenceDiagram
actor User
participant RotateAndProject
participant fgeometric
User->>RotateAndProject: Initialize with parameters
RotateAndProject->>fgeometric: get_projection_matrix(image_shape, x_angle, y_angle, z_angle, focal_length, center)
fgeometric-->>RotateAndProject: Return projection matrix
RotateAndProject->>fgeometric: get_projection_matrix for bbox
fgeometric-->>RotateAndProject: Return bbox projection matrix
RotateAndProject->>User: Return transformed image and bboxes
Class diagram for RotateAndProjectclassDiagram
class RotateAndProject {
- tuple[float, float] x_angle_range
- tuple[float, float] y_angle_range
- tuple[float, float] z_angle_range
- tuple[float, float] focal_range
- int pad_mode
- ColorType pad_val
- ColorType mask_pad_val
- int interpolation
- int mask_interpolation
- float p
+ get_params_dependent_on_data(params: dict[str, Any], data: dict[str, Any]) dict[str, Any]
+ get_transform_init_args_names() tuple[str, ...]
+ apply_to_bboxes(bboxes: np.ndarray, matrix_bbox: np.ndarray, max_height: int, max_width: int, **params: Any) np.ndarray
}
RotateAndProject --|> Perspective
class Perspective {
<<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: all looks good
- 🟢 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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2159 +/- ##
=========================================
+ Coverage 0 90.07% +90.07%
=========================================
Files 0 48 +48
Lines 0 8628 +8628
=========================================
+ Hits 0 7772 +7772
- Misses 0 856 +856 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Adresses: #2118
Summary by Sourcery
Add the RotateAndProject transformation to apply 3D rotation and perspective projection to images, along with corresponding tests and documentation updates.
New Features:
Documentation:
Tests: