Fisheye cameras in camera calibration block#1996
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91b618015b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| x = (grid_x - cx) / fx | ||
| y = (grid_y - cy) / fy |
There was a problem hiding this comment.
Keep fisheye remap arrays in float32
In the fisheye branch, x and y are computed from float32 grids using Python float intrinsics (cx, cy, fx, fy), which promotes them to float64; all downstream arrays (r2, discriminant, scale, map_x, map_y) then stay float64 as well. For high-resolution inputs (for example 4K), this creates several full-frame 8-byte temporaries and can spike per-frame memory into hundreds of MB, causing severe throughput drops or OOMs when use_fisheye_model is enabled. Casting intrinsics once to np.float32 (or otherwise forcing float32 math) avoids this regression.
Useful? React with 👍 / 👎.
inference/core/workflows/core_steps/transformations/camera_calibration/v1.py
Outdated
Show resolved
Hide resolved
inference/core/workflows/core_steps/transformations/camera_calibration/v1.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com>
What does this PR do?
Before (current cam model)


After (with fisheye model enabled):
Type of Change
Testing
Test details:
Checklist