Closed zsz00 closed 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.
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.
eq
hash
https://github.com/hkchengrex/Cutie/blob/2a85b3ebf29a98958b8ecf670997b05e0118ff8e/cutie/inference/object_info.py#L15-L21
ok, I see.
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.