Skip to content

Conversation

@JonathanHUnity
Copy link
Contributor

@JonathanHUnity JonathanHUnity commented Mar 23, 2021

Peer Review Information:

Expanding tests for 3d bounding box to cover more cases. Discovered and fixed an issue where the transform hierarchy of the camera was not being applied properly.

Editor / Package versioning:

Editor Version Target: 2019.4

Dev Testing:

Tests Added: Added a bunch of 3d bounding box tests.

Core Scenario Tested: Manually tested 3d bounding boxes on a bunch of combinations of transforms

At Risk Areas:

Checklist

  • - Updated docs
  • - Updated changelog
  • - Updated test rail

Copy link
Contributor

@StevenBorkman StevenBorkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix

var cameraCenter = cameraTransform.InverseTransformPoint(combinedBounds.center);
cameraCenter = Vector3.Scale(cameraTransform.localScale, cameraCenter);
// Now adjust the center and rotation to camera space. Camera space transforms never rescale objects
combinedBounds.center = combinedBounds.center - cameraTransform.position;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be combinedBounds.center -= cameraTransform.position

@JonathanHUnity JonathanHUnity merged commit a377a5b into 0.8.0-preview.1_staging Mar 23, 2021
@JonathanHUnity JonathanHUnity deleted the add_3dbb_tests branch March 23, 2021 17:40
JonathanHUnity added a commit that referenced this pull request Mar 26, 2021
* Fix HDRP warnings on 2020.X (#260)

* Fix HDRP warnings on 2020.2

* Updating changelog

* Fixing HDRP version expression on 2019.4

* Fix keypoint issues (#259)

* Fixing two bugs in KeypointLabeler:
AISV-1254 - Some keypoints fall outside of the image bounds
AISV-1257 - Partially visible characters with no visible keypoints are not reported

* Adding JointLabelEditor  with message about Labeling requirement

* Reorganizing keypoint docs and elaborating on setup requirements.

* Updating PerceptionCamera.md

* Fixing issues on 2020.2 and failing test

* Add object filtering modes to keypoint labeler

* Updating docs for object filtering

* Adding link to tutorial

* Moving KeypointLabeler.md to proper directory

* Update TUTORIAL.md

* Updating capitalization

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>

* Apply doc suggestions

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>

* Update PerceptionCamera.md based on feedback

* Update CHANGELOG.md

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>

* Merge master to 0.8.0 (#265)

* addressed feedback

- new test for keypoint labeler
- added ClearMaterialProperties method to IGroundTruthGenerator
- Other fixes

* docs clarification

* Update CHANGELOG.md

* added missing interface method implementation for HDRP

* Amending dataset schema to describe correct coordinate system (#255)

The summary for the 3d bounding box states the coordinates are from the sensor's reference frame, but the string for the translational component says it's global.  I *think* this is just a typo in the doc, so correcting the description to match the summary for this type of entry.

* Adding supported version badges (#256)

* Cloud rendering support (#227)

* Adding support for cloud rendering in the run simulation window

* minor fixes

* minor update

* Update BoundingBox3DLabeler.cs

* Update BoundingBox3DLabeler.cs

* inner mesh scaling and disabled renderes

* A fix that prevents normal sampler returning values outside of min max (#258)

* Update pull_request_template.md (#257)

* Update com.unity.perception/CHANGELOG.md

* Increasing color variety in instance segmentation. (#261)

* Increasing color variety in instance segmentation.

* Fixing duplicated color issues in InstanceIdToColorMapping introduced after expanding range.

* Using other constants in constant for cleanliness

Co-authored-by: Mohsen Kamalzadeh <>
Co-authored-by: Wesley Smith <wesley@unity3d.com>
Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>
Co-authored-by: Devin Miller (Unity) <mrpropellers@users.noreply.github.com>
Co-authored-by: PriyeshWani <priyesh@unity3d.com>
Co-authored-by: Steve Borkman <66975693+StevenBorkman@users.noreply.github.com>

* fixed bracket spacing in KeypointLabeler

* Add 3dbb tests (#267)

* Adding and updating 3d bb tests.

* Adding more BB3D tests

* Adding more tests for camera transforms and fixing labeler.

* Added tooltips to sample randomizers

* Fix warnings caused by animation randomizer running on disabled GameObjects (#268)

* Updating packge change log and version

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>
Co-authored-by: Wesley Smith <wesley@unity3d.com>
Co-authored-by: Devin Miller (Unity) <mrpropellers@users.noreply.github.com>
Co-authored-by: PriyeshWani <priyesh@unity3d.com>
Co-authored-by: Steve Borkman <66975693+StevenBorkman@users.noreply.github.com>
Co-authored-by: sleal-unity <steven.leal@unity3d.com>
Co-authored-by: Mohsen Kamalzadeh <>
eugeneteoh pushed a commit to eugeneteoh/com.eugeneteoh.perception that referenced this pull request Apr 29, 2023
* Adding and updating 3d bb tests.

* Adding more BB3D tests

* Adding more tests for camera transforms and fixing labeler.
eugeneteoh pushed a commit to eugeneteoh/com.eugeneteoh.perception that referenced this pull request Apr 29, 2023
* Fix HDRP warnings on 2020.X (Unity-Technologies#260)

* Fix HDRP warnings on 2020.2

* Updating changelog

* Fixing HDRP version expression on 2019.4

* Fix keypoint issues (Unity-Technologies#259)

* Fixing two bugs in KeypointLabeler:
AISV-1254 - Some keypoints fall outside of the image bounds
AISV-1257 - Partially visible characters with no visible keypoints are not reported

* Adding JointLabelEditor  with message about Labeling requirement

* Reorganizing keypoint docs and elaborating on setup requirements.

* Updating PerceptionCamera.md

* Fixing issues on 2020.2 and failing test

* Add object filtering modes to keypoint labeler

* Updating docs for object filtering

* Adding link to tutorial

* Moving KeypointLabeler.md to proper directory

* Update TUTORIAL.md

* Updating capitalization

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>

* Apply doc suggestions

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>

* Update PerceptionCamera.md based on feedback

* Update CHANGELOG.md

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>

* Merge master to 0.8.0 (Unity-Technologies#265)

* addressed feedback

- new test for keypoint labeler
- added ClearMaterialProperties method to IGroundTruthGenerator
- Other fixes

* docs clarification

* Update CHANGELOG.md

* added missing interface method implementation for HDRP

* Amending dataset schema to describe correct coordinate system (Unity-Technologies#255)

The summary for the 3d bounding box states the coordinates are from the sensor's reference frame, but the string for the translational component says it's global.  I *think* this is just a typo in the doc, so correcting the description to match the summary for this type of entry.

* Adding supported version badges (Unity-Technologies#256)

* Cloud rendering support (Unity-Technologies#227)

* Adding support for cloud rendering in the run simulation window

* minor fixes

* minor update

* Update BoundingBox3DLabeler.cs

* Update BoundingBox3DLabeler.cs

* inner mesh scaling and disabled renderes

* A fix that prevents normal sampler returning values outside of min max (Unity-Technologies#258)

* Update pull_request_template.md (Unity-Technologies#257)

* Update com.unity.perception/CHANGELOG.md

* Increasing color variety in instance segmentation. (Unity-Technologies#261)

* Increasing color variety in instance segmentation.

* Fixing duplicated color issues in InstanceIdToColorMapping introduced after expanding range.

* Using other constants in constant for cleanliness

Co-authored-by: Mohsen Kamalzadeh <>
Co-authored-by: Wesley Smith <wesley@unity3d.com>
Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>
Co-authored-by: Devin Miller (Unity) <mrpropellers@users.noreply.github.com>
Co-authored-by: PriyeshWani <priyesh@unity3d.com>
Co-authored-by: Steve Borkman <66975693+StevenBorkman@users.noreply.github.com>

* fixed bracket spacing in KeypointLabeler

* Add 3dbb tests (Unity-Technologies#267)

* Adding and updating 3d bb tests.

* Adding more BB3D tests

* Adding more tests for camera transforms and fixing labeler.

* Added tooltips to sample randomizers

* Fix warnings caused by animation randomizer running on disabled GameObjects (Unity-Technologies#268)

* Updating packge change log and version

Co-authored-by: Mohsen K <mohsen.kamalzadeh@unity3d.com>
Co-authored-by: Wesley Smith <wesley@unity3d.com>
Co-authored-by: Devin Miller (Unity) <mrpropellers@users.noreply.github.com>
Co-authored-by: PriyeshWani <priyesh@unity3d.com>
Co-authored-by: Steve Borkman <66975693+StevenBorkman@users.noreply.github.com>
Co-authored-by: sleal-unity <steven.leal@unity3d.com>
Co-authored-by: Mohsen Kamalzadeh <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants