SuperAPIAI Directory

MaterialSearch

github.com · AI video

Text-to-image search, video

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsWindows · Linux

About this tool

MaterialSearch is an AI semantic search tool for searching local photos and videos through natural language. It can match image content based on text descriptions, and also supports image-to-image search and image-to-video search, helping users quickly locate local materials.

Main capabilities include:

  • Text-to-image search: enter a natural language description to find matching local images.
  • Image-to-image search: upload or specify an image to search for similar local images.
  • Text-to-video search: return matching video clips based on a description.
  • Image-to-video search: search for video clips containing similar visuals based on a screenshot.
  • Image-text similarity calculation: provides a similarity score (the official description says this feature is not very practical).

How to use: The project provides two deployment methods.

  1. Integrated package deployment: download and extract MaterialSearchWindows.7z (does not include models, suitable for advanced users) or MaterialSearchWindows_include_base_model.7z (includes the base model OFA-Sys/chinese-clip-vit-base-patch16, ready to use out of the box, recommended for most users). After extraction, read 使用说明.txt, and the program will automatically select integrated graphics or a dedicated graphics card for acceleration. Download links include GitHub Release, Quark Netdisk, and Baidu Netdisk (extraction code CHNL).
  2. Docker deployment: supports the amd64 architecture, and the image includes the base model and supports GPU acceleration. The image addresses are yumilee/materialsearch (DockerHub) or registry.cn-hongkong.aliyuncs.com/chn-lee-yumi/materialsearch (Alibaba Cloud, recommended for users in mainland China). Before starting, prepare the database save path, local scan path, and mount path inside the container. Modify the environment and volumes configuration in docker-compose.yml. If GPU acceleration is needed, uncomment the corresponding lines, and finally run docker-compose up -d to start. It is not recommended to set a container memory limit. The Docker image's default environment variable is TRANSFORMERS_OFFLINE=1. If you need to change the default model, modify .env and set TRANSFORMERS_OFFLINE=0.

Configuration instructions: All configurations are located in config.py, packageIncludes detailed comments. It is recommended to modify the configuration via environment variables or a .env file in the project root directory; unconfigured variables will use default values. For example, os.getenv('HOST', '127.0.0.1') defaults to 127.0.0.1 when HOST is not configured. If images or videos in certain formats are not scanned, you can add the corresponding extensions to IMAGE_EXTENSIONS and VIDEO_EXTENSIONS. If small images are not scanned, you can try lowering IMAGE_MIN_WIDTH and IMAGE_MIN_HEIGHT. If you need to use a proxy, you can set http_proxy and https_proxy. It is not recommended to set ASSETS_PATH to a remote directory such as SMB/NFS, as this may reduce scanning speed.

Use cases: Suitable for users who need to manage a large number of local photos and video assets, such as photographers, video editors, designers, etc., to quickly retrieve assets through natural language and improve work efficiency.

Limitations and notes:

  • Minimum support is Windows 10; Windows 7 users need to upgrade their system or change computers.
  • Hardware requirements: amd64 (x86_64) architecture CPU, minimum 2GB memory, 4GB or more recommended; if there are many photos, it is recommended to increase memory. The test environment is a J3455 CPU with 8GB memory; on this CPU, approximately 31,000 image matches or 25,000 video frame matches can be performed per second.
  • Some videos cannot be displayed on the web page because the browser does not support their file type (such as SVQ3 encoding); some images (such as tiff format) cannot be displayed when clicked to enlarge; small images will be converted to a thumbnail format supported by the browser, while large images use the original file.
  • When searching videos, if there are too many results and the videos are too large, it may cause the computer to lag; it is recommended that search results not exceed 12.
  • The project's core logic has been split into an independent pip package, materialsearch-core; the current repository only contains the frontend code, and part of the source code is intentionally obfuscated to protect copyright and attribution information, without affecting legitimate use under the GPLv3 license.
  • AI-generated code contributions are not accepted; submitted code must be written and understood by the submitter.
  • The author is only responsible for issues related to the project's functionality, code, and documentation; runtime environment issues (such as Python environment configuration, GPU acceleration, ffmpeg installation, etc.) must be resolved by the user.
  • User support QQ group (1029566498)For community mutual assistance; the author's time is limited.
  • Tutorial videos can be viewed on Bilibili (Chinese).
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools