DatagenTech / dgutils

Apache License 2.0
63 stars 8 forks source link

Issue with camera and CameraJsonParser script #6

Closed sidsingla closed 1 year ago

sidsingla commented 1 year ago

Hi, I think there is an issue with the script https://github.com/DatagenTech/dgutils/blob/7715b399340abdec07970a5e64fe834f5e5b7b2f/Notebooks/scripts/json_parser.py#L33 as Camera Metadata doesn't have ["orientation"]["rotation"] but look_at_vector and up_vector. Maybe the script needs updation?

Thanks!

rlemberskyDatagen commented 1 year ago

On it, @sidsingla. Will update you shortly on the status.

Russell Lembersky Mgr. Computer Vision Product Specialists

On Wed, Feb 1, 2023 at 3:12 PM sidsingla @.***> wrote:

Hi, I think there is an issue with the script https://github.com/DatagenTech/dgutils/blob/7715b399340abdec07970a5e64fe834f5e5b7b2f/Notebooks/scripts/json_parser.py#L5 https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_DatagenTech_dgutils_blob_7715b399340abdec07970a5e64fe834f5e5b7b2f_Notebooks_scripts_json-5Fparser.py-23L5&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=btzK7TQVbouV4VIYalythpvvexG7NVadxz2GrbFlD3k&m=3CdHrFZpSzgKHQ4pXO0PTBvF4o8FdzoPLLtbCXp3hgU&s=_RUGiYpQ1KYmOPBIDxsu3l22jYepX7d2RhZNLP0g2l8&e= as Camera Metadata doesn't have ["orientation"]["rotation"] but look_at_vector and up_vector. Maybe the script needs updation?

Thanks!

— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_DatagenTech_dgutils_issues_6&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=btzK7TQVbouV4VIYalythpvvexG7NVadxz2GrbFlD3k&m=3CdHrFZpSzgKHQ4pXO0PTBvF4o8FdzoPLLtbCXp3hgU&s=mtcdFW1K3l6TrxPVs8g1_xOmrOsuUEmTtUCi95BUXHo&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AY7LV7UXEQ2BM5EIVLSMHVDWVK7R5ANCNFSM6AAAAAAUOFJ7NM&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=btzK7TQVbouV4VIYalythpvvexG7NVadxz2GrbFlD3k&m=3CdHrFZpSzgKHQ4pXO0PTBvF4o8FdzoPLLtbCXp3hgU&s=5MeTU2qEJOaRwrPCLCz4uu3sUmgV8IPNAY1OD4CU0Cs&e= . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rlemberskyDatagen commented 1 year ago

@sidsingla. The json_parser file is not a generic parser for our dataset, sorry for the confusion. To parse our data, please use our sdk, you can find info and download instructions on the readme here:

https://github.com/DatagenTech/dgutils/tree/master/Notebooks#readme

Then follow the instructions in notebook #2 to load our data: https://github.com/DatagenTech/dgutils/blob/master/Notebooks/002_dataset%20_overview.ipynb

If you're instead interested in visualizing a preview of the framing of the head pre-render and offline:

The in_frame notebook returns a visual approximation of the synthetic head as it would be in the generated frame. The input to this notebook is not the camera_metadata.json file, but rather a locally defined dictionary in the notebook:

camera_request = { "name": "camera_1", "type": "perspective", "wavelength_kind": "rgb", "location": { "x": 0.0, "y": -1.6, "z": 0.12 }, "orientation": { "rotation": { "yaw": 20.0, "pitch": -10.0, "roll": 40.0 }, },

sidsingla commented 1 year ago

Oh ok! I think it will be better to have it as a Generic Parser for your repo, else maybe move this script to a local directory or have a comment aleast to which Notebook it pertains. All the scripts in the scripts dir should be generic.

Thankyou! Closing the issue!