trace.moe

按图像搜索动漫场景。(Anime Scene Search by Image)

Github stars Tracking Chart

trace.moe

trace.moe 网站(whatanime.ga)

根据图像反向搜索动漫场景。

使用动漫屏幕截图搜索该场景的拍摄地。

它告诉您在日本动漫中哪个动画,哪个情节以及该场景的确切时刻。

演示

演示图片

搜索结果会告诉您它出现的时间。

它是如何工作的

trace.moe 使用 sola 索引视频并与 liresolr 一起使用。 此仓库仅包含 trace.moe 的 Web 应用,该 Web 应用演示了如何集成动画列表信息以及如何生成缩略图/视频预览。 如果要创建自己的视频场景搜索引擎,请参阅 sola

要了解更多信息,请阅读下面的演示幻灯片

2016年5月提供的演示幻灯片

2017年6月给出的演示幻灯片

2018年6月给出的演示幻灯片

系统总览

您可能会在这里找到其他相关的repo

官方API文档(测试版)

https://soruly.github.io/trace.moe/


Overview

Name With Ownersoruly/trace.moe
Primary Language
Program languageShell (Language Count: 0)
PlatformLinux, Mac, Windows
License:MIT License
Release Count0
Created At2016-05-27 05:09:59
Pushed At2024-03-16 17:05:37
Last Commit At2024-03-17 02:05:33
Stargazers Count4.2k
Watchers Count91
Fork Count224
Commits Count493
Has Issues Enabled
Issues Count64
Issue Open Count0
Pull Requests Count24
Pull Requests Open Count0
Pull Requests Close Count4
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

trace.moe

License
Discord

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=http://searchimageurl

trace.moe API

For Bots/Apps, refer to https://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 (gray parts):

Server-side (blue and red parts):

Others:

  • anilist-crawler - getting anilist info and store in mariaDB
  • slides - past presentation slides on the project

Hosting your own trace.moe system

You're going to need these docker images.

Parts Docker CI Build Docker Image
MariaDB Docker Image Size
Adminer Docker Image Size
redis Docker Image Size
liresolr GitHub Workflow Status Docker Image Size
trace.moe-www GitHub Workflow Status Docker Image Size
trace.moe-api GitHub Workflow Status Docker Image Size
trace.moe-media GitHub Workflow Status Docker Image Size
trace.moe-worker-hasher GitHub Workflow Status Docker Image Size
trace.moe-worker-loader GitHub Workflow Status Docker Image Size
trace.moe-worker-watcher GitHub Workflow Status Docker Image Size
  1. Copy .env.example to .env and update config as you need
WWW_PORT=3310
API_PORT=3311
MEDIA_PORT=3312
ADMINER_PORT=3313
SOLR_PORT=8983

NEXT_PUBLIC_API_ENDPOINT=http://172.17.0.1:3311    # external URL
NEXT_PUBLIC_MEDIA_ENDPOINT=http://172.17.0.1:3312  # external URL

WATCH_DIR=/home/soruly/trace.moe-incoming/  # suggest using fast drives
MEDIA_DIR=/home/soruly/trace.moe-media/     # suggest using large drives
HASH_DIR=/home/soruly/trace.moe-hash/       # suggest using fast drives
SOLR_DIR=/home/soruly/mycores               # suggest using super fast drives
MYSQL_DIR=/home/soruly/mysql

TRACE_MEDIA_SALT=YOUR_TRACE_MEDIA_SALT
TRACE_API_SALT=YOUR_TRACE_API_SALT
TRACE_API_SECRET=YOUR_TRACE_API_SECRET
MARIADB_ROOT_PASSWORD=YOUR_MARIADB_ROOT_PASSWORD
  1. Ensure the directories are created and are empty before starting the containers. And for SOLR_DIR, you must set the owner to uid,gid to 8983
mkdir -p /home/soruly/trace.moe-incoming/
mkdir -p /home/soruly/trace.moe-media/
mkdir -p /home/soruly/trace.moe-hash/
mkdir -p /home/soruly/mycores
mkdir -p /home/soruly/mysql
sudo chown 8983:8983 /home/soruly/mycores
  1. Start the containers
docker-compose up
  1. Once the cluster is ready, you can adding files to incoming folder

The files in incoming folder must be contained in 1-level folders, e.g.

trace.moe-incoming/foo.mp4  <= not ok
trace.moe-incoming/1/foo.mp4 <= ok
trace.moe-incoming/1/bar/foo.mp4 <= ok, but will be uploaded as /1/foo.mp4

trace.moe assumes the folder name is anilist ID. If your data is not related to anilist ID, you can use any id/text you want. The system would still work without anilist data.

Do not create the folders in the incoming directory. You should first put video files in folders, then move/copy the folders into the incoming directory.

Once the video files are in incoming directory, the watcher would start uploading the video to trace.moe-media. When it's done, it would delete the video in incoming directory. After Hash worker and Load workers complete the job, you can search the video by image in your www website at WWW_PORT.

To the top