Uh oh!
There was an error while loading. Please reload this page.
fix(data_augmentation): correct dangling tgt_fov_max in sample_perspective absolute clamp - #151
Open
Sai Asish Y (SAY-5) wants to merge 1 commit into
Open
fix(data_augmentation): correct dangling tgt_fov_max in sample_perspective absolute clamp#151Sai Asish Y (SAY-5) wants to merge 1 commit into
Sai Asish Y (SAY-5) wants to merge 1 commit into
Conversation
…mple_perspective The absolute-range clamp in sample_perspective was written as: tgt_fov_x_min, tgt_fov_max = max(...), min(..., tgt_fov_x_max) which shadowed the wrong name: tgt_fov_x_max was never overwritten, so the subsequent rng.uniform(..., tgt_fov_x_max) call silently bypassed the absolute maximum clamp and tgt_fov_max became a dangling local. Rename the target to tgt_fov_x_max so the absolute bound is actually applied when drawing tgt_fov_x. Closesmicrosoft#146.
Sai Asish Y (SAY-5)force-pushed
the
fix-tgt-fov-x-max-typo
branch
from
May 31, 2026 02:42
1b7d094 to
114f662CompareSai Asish Y (SAY-5)
commented
Aug 16, 2026
Author
Bumping this one. It is a one line fix for the dangling tgt_fov_max in the absolute clamp branch of sample_perspective, happy to rebase if the file has changed since. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes#146.
In
moge/utils/data_augmentation.pythe absolute-range clamp insample_perspectivereads:The second LHS target is
tgt_fov_max(typo) rather thantgt_fov_x_max. As a result:tgt_fov_x_maxis never overwritten, so thenp.deg2rad(fov_range_absolute_max)clamp is silently dropped,rng.uniformstill uses the unclampedtgt_fov_x_maxfrom the preceding line.tgt_fov_maxbecomes a dangling local that is never read again.Replace
tgt_fov_maxwithtgt_fov_x_maxso the absolute upper bound is actually applied when drawingtgt_fov_x.Verified against current
mainbefore commit, Python syntax checked viaast.parse. Repo ships no unit tests for this module.