Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Anime Scene Search by Image

License

NotificationsYou must be signed in to change notification settings

soruly/trace.moe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LicenseDiscord

Anime Scene Search Engine

Trace back the scene where an anime screenshots is taken from.

It tells you which anime, which episode, and the exact moment this scene appears.

Try this image yourself.

Web Integrations

Link to trace.moe from other websites, you can pass image URL in query string like this:

https://trace.moe/?url=https://images.plurk.com/32B15UXxymfSMwKGTObY5e.jpg

trace.moe API

For Bots/Apps, refer tohttps://soruly.github.io/trace.moe-api/

System Overview

This repo is just an index page for the whole trace.moe system. It consists of different parts as below:

Client-side:

Server-side:

  • trace.moe-api - API server for image search and database updates
  • trace.moe-media - media server for video storage and scene preview generation, now integrated into trace.moe-api
  • trace.moe-worker - includes hasher, loader and watcher, now integrated into trace.moe-api
  • LireSolr - image analysis and search plugin for Solr, now integrated into trace.moe-api

Others:

  • anilist-crawler - getting anilist info and store in mariaDB, now integrated into trace.moe-api
  • slides - past presentation slides on the project

Hosting your own trace.moe system

You're going to need these docker images. They are provided in thecompose.yml file.

PartsDocker CI BuildDocker Image
trace.moe-wwwGitHub Workflow StatusDocker Image Size
trace.moe-apiGitHub Workflow StatusDocker Image Size

Prerequisites

You need docker compose for your OS. Windows is supported via WSL2.

Getting started

  1. Create directory/mnt/c/trace.moe/video/

  2. Create subdirectory using anilist ID as folder name.

  3. Put video files in it. The full path should look like this/mnt/c/trace.moe/video/{anilist_ID}/foo.mp4

  4. Copy.env.example to.env and setVIDEO_PATH to/mnt/c/trace.moe/video/

  5. Start the containersdocker compose up -d

It will scan theVIDEO_PATH every minute for new video files (.mp4 .mkv .webm files only, others are ignored).

You can check the indexing process the from logs of api server

  1. Openhttp://localhost:3000 and start searching

More configurations

Other configurations like port mapping are defined in compose.yml

You can also increaseMAX_WORKER to make hashing faster.

Using pre-hashed data

Loading all 100,000+ files to Milvus requires about 192GB RAM. (will crash if it runs out of memory)

  1. Download the pre-hashed data here:trace.moe database dump 2025-10

  2. Install zstd

sudo apt install zstd   # Ubuntu / Debiansudo yum install zstd   # CentOS / RHELsudo dnf install zstd   # Fedorasudo pacman -S zstd     # Arch Linux
  1. Start all containers
docker compose up -d
  1. Load the database dump to postgres
docker exec -i tracemoe-postgres-1 psql -U postgres postgres < <(zstdcat dump.sql.zst)

This process takes a few minutes. You can ignore all errors likeERROR: relation "xxx" already exists.

  1. Load all hashes to Milvus
docker exec -i tracemoe-postgres-1 psql -U postgres postgres < <(echo "UPDATE files SET status='HASHED'")

wait a minute for scan to start, or trigger it manually by

curl http://localhost:3001/scan

This process may take 24 hours. You can check the progress by

docker exec -i tracemoe-postgres-1 psql -U postgres postgres < <(echo "SELECT status, COUNT(*) FROM files GROUP BY status")

Once all files are LOADED, it's ready for search. But background optimization in Milvus may take a few days to complete.

How to cleanup everything

To remove all docker containers and delete all database volumes:

docker compose down -v

Finally, manually clean up theVIDEO_PATH directory if you need to.

About

Anime Scene Search by Image

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp