https://github.com/frost-beta/sisi Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} frost-beta / sisi Public * Notifications You must be signed in to change notification settings * Fork 4 * Star 173 Semantic Image Search CLI tool. License MIT license 173 stars 4 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights frost-beta/sisi This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 30 Commits .github/workflows .github/ workflows src src .gitignore .gitignore .npmignore .npmignore LICENSE LICENSE README.md README.md package.json package.json tsconfig.json tsconfig.json View all files Repository files navigation * README * MIT license Semantic Image Search CLI (sisi) CLI tool for semantic image search, locally without using third party APIs. Powered by node-mlx, a machine learning framework for Node.js. sisi.mp4 Supported platforms GPU support: * Macs with Apple Silicon CPU support: * x64 Macs * x64/arm64 Linux (No support for Windows yet, but I might try to make MLX work on it in future) For platforms without GPU support, the index command will be much slower, and will take many hours indexing tens of thousands of images. The index is only built for new and modified files, so once your have done the initial building, updating index for new images will be much easier. Usage Install: npm install -g @frost-beta/sisi CLI: --- Semantic Image Search CLI - 0.0.1-dev ---------------- $ sisi --- General commands ------------------------------------- sisi index Build or update index for images under target directory. sisi list-index List the directories in the index. sisi remove-index Remove index for all items under target directory. sisi search [--in #0] [--max #0] [--print] Search the query string from indexed images. Examples Build index for ~/Pictures/: sisi index ~/Pictures/ Search pictures from all indexed images: sisi search 'cat jumping' Search from the ~/Pictures/ directory: sisi search cat --in ~/Pictures/ Search images with image: sisi search https://images.pexels.com/photos/45201/kitty-cat-kitten-pet-45201.jpeg It works with local files too: sisi search file:///Users/Your/Pictures/cat.jpg Under the hood The index is built by computing the embeddings of images using the CLIP model, and then stored in a binary JSON file. Searching the images is computing cosine similarities between the query string and the indexed embeddings. There is no database involved here, everytime you do a search the computation is done for all the embeddings stored, which is very fast even when you have tens of thousands of pictures. The JavaScript implementation of the CLIP model is in a separate module: frost-beta/clip. License MIT About Semantic Image Search CLI tool. Topics nodejs maching-learning mlx Resources Readme License MIT license Activity Custom properties Stars 173 stars Watchers 0 watching Forks 4 forks Report repository Languages * TypeScript 86.4% * JavaScript 13.6% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.