Visitar URL original
Validated pydantic 3D project configs `ProjectConfig3D` by deruyter92 · Pull Request #3589 · DeepLabCut/DeepLabCut · GitHub
Skip to content

Validated pydantic 3D project configs ProjectConfig3D - #3589

Draft
deruyter92 wants to merge 3 commits into
jaap/config-absolute-project-pathfrom
jaap/validated-3d-configs
Draft

deruyter92 wants to merge 3 commits into
jaap/config-absolute-project-pathfrom
jaap/validated-3d-configs

Conversation

@deruyter92

Copy link
Copy Markdown
Collaborator

Validated 3D project configs (ProjectConfig3D)

Fixes #3585. Builds on #3587 (its two commits are included; rebase drops them if #3587 merges first).

Summary
The config loading of 3D projects was mixed with that of 2D projects, which introduced validation errors since 3.0.1, when validated configs were introduced for 2D projects. (A regression bug, described in #3585 and fixed in #3587). This PR builds on top of that fix and introduces validated pydantic 3D project configurations for 3D projects, similar to ProjectConfig.

Changes

  • add ProjectConfig3D / CameraConfig3D: Note that the model uses a slightly different layout than what is on-disk. Per-camera settings are grouped in cameras[name], ensuring fixed top-level fields. The on-disk yaml layout is unchanged (top-level yaml keys depend on the camera name).
  • All 3D functions use the model.
  • a key-rename hack in calibrate_cameras is removed, as it is not necessary anymore (it renamed config_file_camera-<i> / shuffle_camera-<i> to the user's camera names, but not trainingsetindex_)
  • Clear errors for mixed-up configs
  • create_config_template_3d / write_config_3d are no longer used internally but still exported; deprecation left for a separate PR.

@deruyter92
deruyter92 added this pull request to stack #3590 November 13, 2026 17:08

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant