feat(scenegraph): add SoftwareCamIndex for visual hash similarity queries

- Add SoftwareCamIndex class with xnor_popcount_score for CAM-style matching
- Add CamMatch and SceneGraphMatch dataclasses for query results
- Add query_by_visual_hash method to SimpleSceneGraph
- Add comprehensive tests for SoftwareCamIndex and xnor_popcount_score
This commit is contained in:
2026-05-17 21:00:54 +08:00
parent ddb8cff6a9
commit 583b2156ea
4 changed files with 314 additions and 2 deletions

View File

@@ -14,15 +14,20 @@ from .hash_codec import (
)
from .objectnode import ObjectNode
from .roomnode import RoomNode
from .scenegraph import SimpleSceneGraph
from .scenegraph import SceneGraphMatch, SimpleSceneGraph
from .software_cam import CamMatch, SoftwareCamIndex, xnor_popcount_score
__all__ = [
"CamMatch",
"ObjectNode",
"RoomNode",
"SceneGraphMatch",
"SimpleSceneGraph",
"SoftwareCamIndex",
"bits_tensor_to_cam_row",
"bits_tensor_to_hash_bytes",
"cam_row_to_hash_bytes",
"hash_bytes_to_bits_array",
"hash_bytes_to_cam_row",
"xnor_popcount_score",
]