alaamaalouf / FollowAnything

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run it on other videos?

Alex-fishred opened this issue · comments

How should the required object annotation be annotated?
I have successfully run follow_anything.py to manually detect and track the desired object via the bounding box
image

But how do I proceed to the next step?
I try to run annotate_features.py I click the required object from the image and the window is stuck as follows
image

I try to close the image window, and then the program asks to enter the class label, any number is fine? How many features(.pt file) do I need to generate?
image

I try I enter 0 for the car
But Run the system with --detect dino -redetect_by dino
Unable to detect the desired object
what is the problem?

"python annotate_features.py --desired_height 240 --desired_width 320 --queries_dir --path_to_images " will try to annotate all images in the directory you provide, where path_to_images is a path to a few images you can annotate.
  • You will click on a few objects and assign each one a label. Indeed, the more (i) you click on a similar object with the same label in diverse scenarios, and (ii) the more labels (objects) you annotate --> the better the results in the next step.

  • This process does not train any network, it just computes feature descriptors for the object you clicked on.

After that, you can run "python follow_anything.py --desired_height 240 --desired_width 320 --path_to_video --save_images_to outputs/ --detect dino --use_sam --tracker aot --queries_dir --desired_feature <desired_label> --plot_visualizations"

where --queries_dir is where you store the annotation in the previous command, and --desired_feature is the object you wish to detect, you can apply --desired_feature more than once for multiple objects.

Note --class_threshold flag: threshold below which similarity scores are assigned as not the desired class.