This repository was archived by the owner on Feb 21, 2026. It is now read-only.
Add masked reconstruction branch to inference loop with entropy loss and geometric consistency#6
Open
Add masked reconstruction branch to inference loop with entropy loss and geometric consistency#6
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…istency Co-authored-by: thinksyncs <42225585+thinksyncs@users.noreply.github.com>
Co-authored-by: thinksyncs <42225585+thinksyncs@users.noreply.github.com>
Co-authored-by: thinksyncs <42225585+thinksyncs@users.noreply.github.com>
thinksyncs
approved these changes
Feb 6, 2026
Co-authored-by: thinksyncs <42225585+thinksyncs@users.noreply.github.com>
Co-authored-by: thinksyncs <42225585+thinksyncs@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add masked reconstruction branch with entropy loss and geometric consistency
Add masked reconstruction branch to inference loop with entropy loss and geometric consistency
Feb 6, 2026
Copilot AI
added a commit
that referenced
this pull request
Feb 6, 2026
…entropy loss and geometric consistency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements geometry-aligned masked image modeling (MIM) in the inference path for test-time adaptation, with entropy minimization for geometric consistency.
Changes
Model extensions (
rtdetr_pose/model.py):RenderTeacher: Small CNN encoding mask+depth → geometry featuresDecoderMIM: Reconstructs masked P5 neck featuresRTDETRPose.forward()acceptsgeom_input(mask+normalized depth),feature_mask,return_mimflagLoss functions (
rtdetr_pose/losses.py):mim_reconstruction_loss(): L1 loss on masked regions between reconstructed and teacher featuresentropy_loss(): Minimizes prediction entropy for confident geometric alignmentLossesclass integrates both with configurable weights (0.1, 0.01)API:
Test-time training:
Adapt normalization parameters via MIM + entropy loss on unlabeled test images with predicted geometry.
Compatibility:
Zero overhead when
enable_mim=False(default). Existing inference paths unchanged.Implementation notes
stopgrad()for stable supervisionlog(D_obj / median(D_obj))Implements RT-DETR 6DoF Spec v0.4 §6 (Geometry-Aligned MIM).
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.