assetfind
Local semantic and visual-similarity search engine across all game art.
Incremental SQLite-backed visual search index over game art repositories, enabling text-to-image search via CLIP, image-to-image similarity via DINOv2, and cross-project duplicate detection.
git clone https://github.com/BestRoiMedia/bestroi-game-tools.gitWhy we built it
Across dozens of prototypes and games, artists and agents were regenerating props or textures that already existed in another folder. assetfind makes the entire art library searchable by text description or reference image in milliseconds.
Architecture & how it works
assetfind.py walks configured game directories (skipping build artifacts, VCS, caches, and key files), renders SVGs via resvg, and indexes unique PNG/JPG/WEBP/SVG files into ~/.cache/assetfind/index.sqlite using vision's CLIP ViT-B/32 and DINOv2-small embeddings. Queries return ranked JSON hits and write visual contact-sheet PNGs.
Key capabilities
- Incremental indexing keyed by file size, mtime, and SHA-256 deduplication
- Natural-language art search using CLIP text-to-image cosine similarity
- Visual similarity search using DINOv2 embeddings to locate matching styles or subjects
- Cross-project exact and near-duplicate clustering prioritizing multi-game overlaps
- Generates ranked contact-sheet PNGs alongside JSON hit lists
Usage example
python3 assetfind/assetfind.py index ./game/assets
python3 assetfind/assetfind.py search "gothic arched window at night" --k 24
python3 assetfind/assetfind.py similar ./ref.png --k 16
python3 assetfind/assetfind.py dupes --threshold 0.97