hkchengrex / Cutie

[CVPR 2024 Highlight] Putting the Object Back Into Video Object Segmentation
https://hkchengrex.com/Cutie/
MIT License
732 stars 71 forks source link

if obj not in self.obj_to_tmp_id bug #113

Closed zsz00 closed 2 months ago

zsz00 commented 2 months ago

https://github.com/hkchengrex/Cutie/blob/2a85b3ebf29a98958b8ecf670997b05e0118ff8e/cutie/inference/object_manager.py#L141

def has_all(self, objects: List[int]) -> bool: for obj in objects: if obj not in self.obj_to_tmp_id: return False return True

obj is int, self.obj_to_tmp_id key is ObjectInfo.

hkchengrex commented 2 months ago

Sorry for the complex code there. We should have overridden the eq and hash functions of ObjectInfo to make this work. Let us know if you still run into problems.

https://github.com/hkchengrex/Cutie/blob/2a85b3ebf29a98958b8ecf670997b05e0118ff8e/cutie/inference/object_info.py#L15-L21

zsz00 commented 2 months ago

ok, I see.