Visitar URL original
Switch 3D config reads to plain read by C-Achard · Pull Request #3587 · DeepLabCut/DeepLabCut · GitHub
Skip to content

Switch 3D config reads to plain read - #3587

Open
C-Achard wants to merge 3 commits into
devfrom
cy/fix-3d-config-validation
Open

C-Achard wants to merge 3 commits into
devfrom
cy/fix-3d-config-validation

Conversation

@C-Achard

Copy link
Copy Markdown
Member

Fixes #3585.

Problem

The 3D entry points load the 3D config.yaml with read_config, which validates it as a 2D ProjectConfig (extra fields forbidden).

@C-Achard C-Achard added bug fix config Related to config.yaml, ruamel, YAML parsing, ... labels Nov 13, 2026
@C-Achard
C-Achard requested a balanced review from Copilot November 13, 2026 09:33

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.

🟡 Changes recommended

Copied or moved 3D projects retain a stale project_path, allowing calibration to overwrite the original project's config and undistortion to silently use its calibration.

1 open issue
What changed in this PR

This PR addresses #3585 by loading 3D project configurations as plain YAML instead of validating them against the 2D ProjectConfig schema.

Changes:

  • Switch 3D calibration, triangulation, visualization, and matched-frame extraction to read_plainconfig.
  • Update the 3D example to use the same reader.
  • Add regression tests for 3D configuration loading and preservation of configuration values.
File Description
tests/​test_3d_project_config.py Tests configuration loading across five 3D entry points and checks configuration preservation.
tests/​generate_training_dataset/​test_frame_extraction.py Adds coverage for loading a 3D configuration in match mode.
examples/​testscript_3d.py Uses plain configuration loading in the 3D example.
deeplabcut/​pose_estimation_3d/​triangulation.py Switches triangulation and point undistortion to plain reads.
deeplabcut/​pose_estimation_3d/​plotting3D.py Switches 3D labeled-video creation to plain reads.
deeplabcut/​pose_estimation_3d/​camera_calibration.py Switches calibration and undistortion checks to plain reads.
deeplabcut/​generate_training_dataset/​frame_extraction.py Uses a plain read for the 3D configuration in match mode.

Review effort: Balanced

@deruyter92
deruyter92 self-requested a review November 13, 2026 12:08

@deruyter92 deruyter92 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@C-Achard thanks for the hotfix. Good solution. I agree with co-pilot that the missing config path repair was a regression (it risks edits to the wrong project in case a project is copied).

Addressed that in a follow-up commit. Let's merge this PR before 3.0.3 release.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0.3 bug fix config Related to config.yaml, ruamel, YAML parsing, ...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants