z-x-yang / Segment-and-Track-Anything

An open-source project dedicated to tracking and segmenting any objects in videos, either automatically or interactively. The primary algorithms utilized include the Segment Anything Model (SAM) for key-frame segmentation and Associating Objects with Transformers (AOT) for efficient tracking and propagation purposes.
GNU Affero General Public License v3.0
2.77k stars 334 forks source link

FPS issue #102

Closed mathieucoppey closed 10 months ago

mathieucoppey commented 11 months ago

Hello, I cannot run the demo on google colab, even with the video provided. Here is the error:

File "/usr/local/lib/python3.10/dist-packages/imageio/plugins/pillow.py", line 383, in write raise TypeError( TypeError: The keyword fps is no longer supported. Use duration(in ms) instead, e.g. fps=50 == duration=20 (1000 * 1/50).

edit: now it works with installing imageio 2.5.

New problem, when I try to upload my own series of images, I get the error:

first_frame = imgs_path[0] IndexError: list index out of range

hedada-hc commented 11 months ago

Inside file seg_track_anything.py

Replace " imageio.mimsave(io_args['output_gif'], masked_pred_list, fps=fps) " with " imageio.mimsave(io_args['output_gif'], masked_pred_list, duration=1000/fps) "