Skip to content

Updating multi camera schema - #144

Open
divyajoshi11 wants to merge 16 commits into
mainfrom
updating_multi-camera_schema
Open

divyajoshi11 wants to merge 16 commits into
mainfrom
updating_multi-camera_schema

Conversation

@divyajoshi11

Copy link
Copy Markdown
Collaborator

Adding support for ViTPoseH and SAM3DBody in PersonKeypointReconstruction. Added tables for Reprojection Error per Keypoint. Created function to create overlay of reprojected keypoints on a video from one camera only.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the multi-camera tracking pipeline to support additional pose/body methods and adds new reprojection-quality outputs, including a utility to generate a single-camera reprojection overlay video.

Changes:

  • Added skeleton/pair definitions for additional top-down methods (ViTPose-H and SAM3DBody variants) used in reconstruction/visualization.
  • Introduced a new DataJoint computed table to store reprojection error per keypoint per camera.
  • Added a make_single_camera_reprojection_video helper to render detected vs. reprojected keypoints (and optional SAM3D mesh overlay) for one selected camera.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
multi_camera/utils/visualization.py Adds single-camera reprojection video generator; modifies existing reprojection video code path.
multi_camera/datajoint/multi_camera_dj.py Adds method-specific skeleton definitions and a new per-keypoint reprojection error computed table.
Suppressed comments (1)

multi_camera/utils/visualization.py:499

  • camera_params and camera_names are used (and asserted) but are no longer fetched/defined in this function, which will raise a NameError and prevent reprojection from working.
    if keypoints3d is None:
        # get 3D keypoints
        keypoints3d = (PersonKeypointReconstruction & key).fetch1("keypoints3d")

        assert camera_names == video_camera_name.tolist(), "Videos don't match cameras in calibration"

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread multi_camera/utils/visualization.py
Comment thread multi_camera/utils/visualization.py Outdated
Comment thread multi_camera/datajoint/multi_camera_dj.py
Comment thread multi_camera/datajoint/multi_camera_dj.py
Comment thread multi_camera/utils/visualization.py
Comment thread multi_camera/datajoint/multi_camera_dj.py
Comment thread multi_camera/utils/visualization.py
divyajoshi11 and others added 8 commits September 1, 2026 14:54
Added a comment explaining the purpose of the ReprojectionErrorPerKeypoint class and its relation to the ReprojectionError table.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Added a comment to clarify the purpose of the function.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment on lines +338 to +343
skeleton = np.array([(joints.index(p[0]), joints.index(p[1])) for p in pairs])

# select method for reconstruction
reconstruction_method_name = (PersonKeypointReconstructionMethodLookup & key).fetch1(
"reconstruction_method_name"
)
Comment on lines +885 to +892
top_down_method = (TopDownPerson & video_key).fetch1("top_down_method")
if top_down_method in (34, 35, 37):
from pose_pipeline.wrappers.sam3d_body import get_sam3d_callback
sam3d_key = dict(video_key)
sam3d_key["sam3d_method"] = 3
mesh_overlay = get_sam3d_callback(sam3d_key)
else:
mesh_overlay = None
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