hkchengrex / XMem

[ECCV 2022] XMem: Long-Term Video Object Segmentation with an Atkinson-Shiffrin Memory Model
https://hkchengrex.com/XMem/
MIT License
1.72k stars 191 forks source link

Long-Time Video Tools #113

Closed z-jiaming closed 1 year ago

z-jiaming commented 1 year ago

When getting quantitative results on Long-Time Video, we follow the INFERENCE.md to use davis2017-evaluation

We first point --davis_path to long_video_davis or long_video_davis_x3, then remove resolution

But raise error as follow:

image

Could you please help me to fix this bug, or directly provide your fixed tools? Thanks a lot!

hkchengrex commented 1 year ago

It should work without any "fixes" to the tool. For debugging, I would recommend printing out the path to the file that it is trying to read and figuring out why it failed to read that file.

z-jiaming commented 1 year ago

I print "self.sequences[sequence][obj_type]" in self._get_all_elements(sequence, 'mask'). It looks like many "-1", due to "masks.extend([-1] * (len(images) - len(masks)))" in def init()

image

I simply filter out "-1",

image

but it also raises an error:

image

Could you please directly provide your fixed tools? It will help a lot!

hkchengrex commented 1 year ago

Again, I did not apply any "fix". davis2017-evaluation should work out-of-the-box. I just tested it and it still works. From your error message, it seems like the annotation and the segmentation have different shapes. Are you sure you are using the correct directories?

z-jiaming commented 1 year ago

I eval results along the following steps:

1) Download Long-Time Video datasets from [here] which provided in GETTING_STARTED.md, and unzip like:

image

2) Download your [Precomputed Results] and unzip like:

image

And delete your provided csv.

3) git clone davis2017-evaluation, fix img and mask directories as:

image

4) eval as follows: eval: python evaluation_method.py --davis_path xxx/long_video_set/long_video --task semi-supervised --results_path xxx/LongVideo-1X-r10 eval 3X: python evaluation_method.py --davis_path xxx/long_video_set/long_video_x3 --task semi-supervised --results_path xxx/LongTime-3X-r10

Then, raise the above errors.

Could you please help me to find where is wrong.

hkchengrex commented 1 year ago
  1. You don't need the "fix" the directories as mentioned above.
  2. In your post, you mentioned that you "point --davis_path to long_video_davis". The command that you have shown does not.
z-jiaming commented 1 year ago
  1. I fix the directories due to DAVIS has 480p and Full-resolution, but LongTimeVideo not
  2. I set davis_path as --davis_path xxx/long_video_set/long_video_x3
hkchengrex commented 1 year ago

How about you revert (1) and follow (2) as mentioned in our documentation? 😄

z-jiaming commented 1 year ago

Oh, I know it, my mistake! Thanks a lot!!!!