facebookresearch / facebookresearch/EdgeTAM

Bug when objects with different `frame_idx` are added using `predictor.add_new_points_or_box`

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
978
Forks
83
PR merge metrics
No merged PRs in 30d

Description

I have different object entering the FoV of my camera at different frame index. In order to track all these objects I do the following:

```py
for fidx, obj_id, box_coords in zip(ann_frame_idxs, ann_obj_ids, boxes):
_, out_ids, out_logits = predictor.add_new_points_or_box(
inference_state=inference_state,
frame_idx=fidx,
obj_id=obj_id,
box=box_coords,
)
```

When all the boxes added have the same `frame_idx`, in this case 0. Everything seems to work as expected:

Frame0
![Image](https://github.com/user-attachments/assets/eb15d7ba-9b89-4cce-b7bb-191b72bec7c7)
Frame1
![Image](https://github.com/user-attachments/assets/b3b1978a-080e-4d6a-9fb7-410db9b98874)

However, when boxes with different `frame_idx` are added, `EdgeTAM` does not behave as expected. Deleting all the previous tracks:

Frame0
![Image](https://github.com/user-attachments/assets/254cf987-ee53-4887-9f76-f91ff8a77807)
Frame1
![Image](https://github.com/user-attachments/assets/5f0eceb4-3a14-4096-8ef8-346f0e24bc4f)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.