Skip to content
프로젝트

소개

시맨틱 이미지 검색 CLI 도구입니다.

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
-1
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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.

https://github.com/user-attachments/assets/66e6e437-c27b-48cf-80cc-a5a0c8c0bdfb

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 <command>

━━━ General commands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  sisi index <target>
    Build or update index for images under target directory.

  sisi list-index
    List the directories in the index.

  sisi remove-index <target>
    Remove index for all items under target directory.

  sisi search [--in #0] [--max #0] [--print] <query>
    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

관련 프로젝트 살펴보기

불러오는 중…