soruly commited on
Commit
06525ca
·
verified ·
1 Parent(s): 0c529f7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -45
README.md CHANGED
@@ -1,72 +1,97 @@
1
  ---
2
  license: cc0-1.0
3
  task_categories:
4
- - image-feature-extraction
5
  language:
6
- - en
7
  tags:
8
- - anime
9
  size_categories:
10
- - 100K<n<1M
11
  ---
12
 
13
  # trace.moe database dump
14
 
15
- Direct database dump of video analysis data from trace.moe. Includes MPEG-7 color layout of each frame, detected scene change, media information and the corresponding anilist info.
16
 
17
  This dataset can be used for various research purposes, such as:
18
 
19
- - trace back anime scenes with a screenshot (like trace.moe does) by comparing the color layout vectors.
20
- - find similar scenes across different anime videos
21
- - find duplicated videos or video segments
22
- - study scene change patterns in anime videos
23
- - quantitative analysis of anime visual characteristics over time / across genres
24
 
25
  No video content is included in this dataset. Metadata only.
26
 
27
- | Dataset | Cut-off Date | Analyzed Video | Analyzed Frames | Total Duration |
28
- | --------------- | ------------ | -------------- | --------------- | -------------- |
29
- | 2026-04.sql.zst | 2026-04-06 | 114514 | 3732975086 | 42662.42 hours |
30
 
31
- This dataset can be loaded to postgresql. You can also find the instructions in https://github.com/soruly/trace.moe and the source code for how these video are analyzed.
 
 
 
32
 
33
- ## Example
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  ### files
36
 
37
- | id | anilist_id | episode | path | loaded | created | updated | size | duration | nb_streams | bit_rate | frame_count | scene_count | media_info | scene_changes | color_layout |
38
- | ------ | ---------- | ------- | ---------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------- | ------------------------- | --------- | -------- | ---------- | -------- | ----------- | ----------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------ |
39
- | 140363 | 208517 | 1 | 208517/Does It Count If You Lose Your Innocence to an Android (2026) - S00E01 (BD 1080p HEVC AAC) [80615CD9] [GSH].mkv | 1 | 2026-04-06 08:08:50.512343 | 2026-04-06 08:09:04.97893 | 392553818 | 301.333 | 7 | 10421794 | 7224 | 61 | {"format": {"size": "392553818", "tags": {"IMDB": "tt39255171", "TMDB": "tv/291414", "TVDB": "463638...} | [[3.003, 1], [4.796, 0.252373], [8.258, 0.685002], [21.146, 0.450657], [24.149, 0.525811], [27.402 | 34,844 bytes |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  ### anilist
42
 
43
- | id | updated | json |
44
- | ------ | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
45
- | 208517 | 2026-04-06 12:20:54.751398 | {"id": 208517, "type": "ANIME", "idMal": 63330, "title": {"native": "アンドロイドは経験人数に入りますか?? 5日間続けて……?" |
 
 
46
 
47
- ## Database schema
48
 
49
- ### files
50
 
51
- | field | type | description | example |
52
- | ------------- | --------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
53
- | id | integer | Unique identifier | 140363 |
54
- | anilist_id | integer | Anilist ID of the anime | 208517 |
55
- | episode | integer | Episode number (see notes) | 1 |
56
- | path | text | file path of the video for reference | 208517/Does It Count If You Lose Your Innocence to an Android (2026) - S00E01 (BD 1080p HEVC AAC) [80615CD9] [GSH].mkv |
57
- | loaded | boolean | Whether the video is loaded to milvus (0: no, 1: yes ; always 1 in this dataset) | 1 |
58
- | created | timestamp | When the file was added to the database | 2026-04-06 08:08:50.512343 |
59
- | updated | timestamp | When the file was last analyzed | 2026-04-06 08:09:04.97893 |
60
- | size | bigint | Size of the video file in bytes (derived from media_info) | 392553818 |
61
- | duration | real | Duration of the video in seconds (derived from media_info) | 301.333 |
62
- | nb_streams | smallint | Total number of streams in the video (derived from media_info) | 7 |
63
- | bit_rate | bigint | Bit rate of the video in bits per second (derived from media_info) | 10421794 |
64
- | frame_count | integer | Total number of frames in the video (length of color_layout) | 7224 |
65
- | scene_count | integer | Total number of scenes detected in the video (derived from scene_changes) | 61 |
66
- | media_info | jsonb | JSON object containing detailed media information | {"format": {"size": "392553818", "tags": {"IMDB": "tt39255171", "TMDB": "tv/291414", "TVDB": "463638...} |
67
- | scene_changes | jsonb | 2D array containing [timestamp, diff] for detected scene changes | [[3.003, 1], [4.796, 0.252373], [8.258, 0.685002], [21.146, 0.450657], [24.149, 0.525811], [27.402, ...] |
68
- | color_layout | bytea | Image hash (color layout) of each frame in compressed json format (.json.zst) | [{"time":0,"vector":[8,15,11,17,16,12,14,16,14,14,16,17,16,16,15,16,16,16,15,15,15,35,19,17,14,16,14,28,12,15,17,15,17]},...] |
69
-
70
- Notes:
71
-
72
- - There are many different episode numbering systems. This episode number follows Anilist, which is always an integer starting with 1 and never larger than the total number of episodes. (no EP0 or EP12.5) Please refer to the file path for the original episode numbering in the source video, which may be more familiar to users.
 
1
  ---
2
  license: cc0-1.0
3
  task_categories:
4
+ - image-feature-extraction
5
  language:
6
+ - en
7
  tags:
8
+ - anime
9
  size_categories:
10
+ - 100K<n<1M
11
  ---
12
 
13
  # trace.moe database dump
14
 
15
+ Direct database dump of video analysis data from trace.moe. Includes MPEG-7 color layout of each frame, detected scene changes, media information, and the corresponding AniList info.
16
 
17
  This dataset can be used for various research purposes, such as:
18
 
19
+ - Trace back anime scenes with a screenshot (like trace.moe does) by comparing the color layout vectors.
20
+ - Find similar scenes across different anime videos.
21
+ - Find duplicated videos or video segments.
22
+ - Study scene change patterns in anime videos.
23
+ - Quantitative analysis of anime visual characteristics over time / across genres.
24
 
25
  No video content is included in this dataset. Metadata only.
26
 
27
+ ## Available Dumps
 
 
28
 
29
+ | Dataset | Cut-off Date | Analyzed Videos | Analyzed Frames | Total Duration | Notes |
30
+ | ----------------- | ------------ | --------------- | --------------- | --------------- | ------------------------------------------------------------------------ |
31
+ | `2026-10.sql.zst` | 2026-10-05 | 116,380 | 3,780,486,155 | 43,158.85 hours | Added `episode_start`, `episode_end`, `crc32`. Removed `episode` column. |
32
+ | `2026-04.sql.zst` | 2026-04-06 | 114,514 | 3,732,975,086 | 42,662.42 hours | Single `episode` column. No `crc32`. |
33
 
34
+ **Note**: Newer dumps may not contain all files present in the older dumps, as some files will be deleted across dumps.
35
+
36
+ ## How to Import
37
+
38
+ The dataset is provided as a Zstandard-compressed PostgreSQL SQL dump. You can decompress and pipe it directly into PostgreSQL:
39
+
40
+ ```bash
41
+ zstd -dc 2026-10.sql.zst | docker exec -i tracemoe-api-postgres-1 psql -U postgres postgres
42
+ ```
43
+
44
+ Or for a standalone/local PostgreSQL instance:
45
+
46
+ ```bash
47
+ zstd -dc 2026-10.sql.zst | psql -U postgres postgres
48
+ ```
49
+
50
+ You can also find instructions in [soruly/trace.moe](https://github.com/soruly/trace.moe) and the source code for how these videos are analyzed.
51
+
52
+ ## Database Schema
53
 
54
  ### files
55
 
56
+ | field | type | description | example |
57
+ | ------------- | --------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
58
+ | id | integer | Unique identifier (Primary Key) | 114514 |
59
+ | anilist_id | integer | AniList ID of the anime | 103872 |
60
+ | episode_start | smallint | Starting episode number (see notes) | 24 |
61
+ | episode_end | smallint | Ending episode number (see notes) | 24 |
62
+ | path | text | File path of the video for reference | 103872/[Leopard-Raws] Okoshiyasu, Chitose-chan - 24 END (MX 1280x720 x264 AAC).mp4 |
63
+ | crc32 | bigint | CRC32 checksum of the video file | 3890346861 |
64
+ | loaded | boolean | Whether the video is loaded into Milvus (`true`/`false`) | true |
65
+ | created | timestamp | When the file was added to the database | 2025-07-14 15:21:32.337159 |
66
+ | updated | timestamp | When the file was last analyzed | 2026-02-10 16:55:08.683307 |
67
+ | size | bigint | Size of the video file in bytes (derived from media_info) | 48616711 |
68
+ | duration | real | Duration of the video in seconds (derived from media_info) | 179.968 |
69
+ | nb_streams | smallint | Total number of streams in the video (derived from media_info) | 2 |
70
+ | bit_rate | bigint | Bit rate of the video in bits per second (derived from media_info) | 2161126 |
71
+ | frame_count | integer | Total number of frames in the video (length of color_layout) | 4313 |
72
+ | scene_count | integer | Total number of scenes detected in the video (derived from scene_changes) | 34 |
73
+ | media_info | jsonb | JSON object containing detailed media information (from ffprobe) | {"format": {"size": "48616711", "tags": {"encoder": "Lavf58.12.100", "major_brand": "tv/isom", "minor_version": "512"}}} |
74
+ | scene_changes | jsonb | 2D array containing [timestamp, diff] for detected scene changes | [[3.878875, 1], [11.928583, 0.349155], [17.225542, 0.38642], [20.061708, 0.362655], [26.609917, 0.385737], ...] |
75
+ | color_layout | bytea | Image hash (color layout) of each frame in compressed json format (.json.zst) | [{"time":0,"vector":[59,16,16,15,15,15,16,15,16,16,15,16,15,15,15,16,15,16,16,15,16,0,16,16,16,16,15,41,16,16,16,16,16]},...] |
76
+
77
+ - **Episode Numbering**:
78
+ - Episode numbers follow AniList, which are integers starting with 1 and never larger than the total number of episodes (no EP0 or EP12.5).
79
+ - Standard single-episode files have `episode_start = episode_end`.
80
+ - Multi-episode / combined files (e.g. `S01E01-E02`) record the start and end of the span in `episode_start` and `episode_end`.
81
+ - Episode numbers are manually corrected with the above rules, thus they may be different from the episode number in the file name.
82
 
83
  ### anilist
84
 
85
+ | field | type | description | example |
86
+ | ------- | --------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------ |
87
+ | id | integer | AniList anime ID (Primary Key) | 103872 |
88
+ | updated | timestamp | When the AniList record was last updated | 2026-10-03 20:08:50.773472 |
89
+ | json | jsonb | Full AniList anime metadata (JSON) | {"id": 103872, "type": "ANIME", "idMal": 38089, "title": {"native": "おこしやす、ちとせちゃん"}} |
90
 
91
+ ## Creating the Dump
92
 
93
+ The database dump is created by running the following command on the production database host:
94
 
95
+ ```bash
96
+ docker exec tracemoe-api-postgres-1 pg_dump -U postgres -t anilist -t files postgres | zstdmt > 2026-10.sql.zst
97
+ ```