Skip to content

Fix reconditioned masks being overwritten during memory encoding Closes #531#533

Open
amier2775 wants to merge 1 commit intofacebookresearch:mainfrom
amier2775:fix/recondition-memory-overwrite
Open

Fix reconditioned masks being overwritten during memory encoding Closes #531#533
amier2775 wants to merge 1 commit intofacebookresearch:mainfrom
amier2775:fix/recondition-memory-overwrite

Conversation

@amier2775
Copy link
Copy Markdown

_recondition_masklets encodes detector masks into memory via propagate_in_video_preflight(run_mem_encoder=True), but the subsequent _tracker_update_memories call re-encodes the original tracker masks and overwrites the reconditioned memory for the same frame.

Fix: replace reconditioned objects' masks in tracker_low_res_masks_global before _tracker_update_memories, so a single memory encoding pass uses the correct detector masks. Remove the now-unnecessary run_mem_encoder=True from _recondition_masklets.

_recondition_masklets encodes detector masks into memory via
propagate_in_video_preflight(run_mem_encoder=True), but the subsequent
_tracker_update_memories call re-encodes the original tracker masks
and overwrites the reconditioned memory for the same frame.

Fix: replace reconditioned objects' masks in tracker_low_res_masks_global
before _tracker_update_memories, so a single memory encoding pass uses
the correct detector masks. Remove the now-unnecessary run_mem_encoder=True
from _recondition_masklets.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 25, 2026
@amier2775 amier2775 changed the title Fix reconditioned masks being overwritten during memory encoding Fix reconditioned masks being overwritten during memory encoding Closes #531 May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant