Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Yolo to initiate the SAMURAI #63

Closed
sendtohen opened this issue Dec 4, 2024 · 4 comments
Closed

Integrate Yolo to initiate the SAMURAI #63

sendtohen opened this issue Dec 4, 2024 · 4 comments

Comments

@sendtohen
Copy link

I would love to use Yolo to initiate the SAMURAI. I tried, but got errors.
SAMURAI mode: False
or
I would get
File "C:\Users\Documents\samurai\sam2\sam2\modeling\sam2_base.py", line 665, in _prepare_memory_conditioned_features
iou_score = output_dict["non_cond_frame_outputs"][i]["best_iou_score"] # Get mask affinity score
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 17

@hsiangwei0903
Copy link
Collaborator

can you provide more details on your modifications?

@sendtohen
Copy link
Author

Yolo_sam.txt
Error
error.txt
Sorry still fairly new to coding as a whole, as I am fascinated by what you are doing.

@hsiangwei0903
Copy link
Collaborator

I think your code will modify the frame_idx to 17, which can further caused error in the following line. I would suggest write a separate script to detect the ball and save it into txt, and then run our code for tracking.

_, _, masks = predictor.add_new_points_or_box(state, box=bbox, frame_idx=frame_idx, obj_id=0)

@sendtohen
Copy link
Author

thanks for the suggestion, i will give this method a try.

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

No branches or pull requests

2 participants