EntropyDrop commited on
Commit
c66abb6
·
1 Parent(s): e832943
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. best_annotator/.gitignore +4 -0
  2. best_annotator/README.md +38 -0
  3. best_annotator/app.py +258 -0
  4. best_annotator/static/app.js +359 -0
  5. best_annotator/static/index.html +58 -0
  6. best_annotator/static/style.css +1 -0
  7. best_annotator/static/vendor/skinview3d-3.4.2.bundle.js +0 -0
  8. best_annotator/static/vendor/skinview3d-LICENSE +22 -0
  9. best_annotator/test_app.py +102 -0
  10. best_annotator/ui_test_server.log +56 -0
  11. entropydrop_website_generations/SKING_DDJ_v54/13PTZMFQWXN3JRL1_result_v101.png +3 -0
  12. entropydrop_website_generations/SKING_DDJ_v54/13PTZMFQWXN3JRL1_result_v103.png +3 -0
  13. entropydrop_website_generations/SKING_DDJ_v54/13PTZMFQWXN3JRL1_result_v104.png +3 -0
  14. entropydrop_website_generations/SKING_DDJ_v54/14CN7VTM7MBVWXV6_result_v101.png +3 -0
  15. entropydrop_website_generations/SKING_DDJ_v54/14CN7VTM7MBVWXV6_result_v103.png +3 -0
  16. entropydrop_website_generations/SKING_DDJ_v54/14CN7VTM7MBVWXV6_result_v104.png +3 -0
  17. entropydrop_website_generations/SKING_DDJ_v54/15QL2MDQB2AJYZ2B_result_v101.png +3 -0
  18. entropydrop_website_generations/SKING_DDJ_v54/15QL2MDQB2AJYZ2B_result_v103.png +3 -0
  19. entropydrop_website_generations/SKING_DDJ_v54/15QL2MDQB2AJYZ2B_result_v104.png +3 -0
  20. entropydrop_website_generations/SKING_DDJ_v54/16LHC1EB4FQV7H2G_result_v101.png +3 -0
  21. entropydrop_website_generations/SKING_DDJ_v54/16LHC1EB4FQV7H2G_result_v103.png +3 -0
  22. entropydrop_website_generations/SKING_DDJ_v54/16LHC1EB4FQV7H2G_result_v104.png +3 -0
  23. entropydrop_website_generations/SKING_DDJ_v54/17L5FNFLSN9BBDGZ_result_v101.png +3 -0
  24. entropydrop_website_generations/SKING_DDJ_v54/17L5FNFLSN9BBDGZ_result_v103.png +3 -0
  25. entropydrop_website_generations/SKING_DDJ_v54/17L5FNFLSN9BBDGZ_result_v104.png +3 -0
  26. entropydrop_website_generations/SKING_DDJ_v54/17T2H34KK3Z62XF9_result_v101.png +3 -0
  27. entropydrop_website_generations/SKING_DDJ_v54/17T2H34KK3Z62XF9_result_v103.png +3 -0
  28. entropydrop_website_generations/SKING_DDJ_v54/17T2H34KK3Z62XF9_result_v104.png +3 -0
  29. entropydrop_website_generations/SKING_DDJ_v54/17U8ZVRWNETUFZAX_result_v101.png +3 -0
  30. entropydrop_website_generations/SKING_DDJ_v54/17U8ZVRWNETUFZAX_result_v103.png +3 -0
  31. entropydrop_website_generations/SKING_DDJ_v54/17U8ZVRWNETUFZAX_result_v104.png +3 -0
  32. entropydrop_website_generations/SKING_DDJ_v54/1897D1MKQ63RK458_result_v101.png +3 -0
  33. entropydrop_website_generations/SKING_DDJ_v54/1897D1MKQ63RK458_result_v103.png +3 -0
  34. entropydrop_website_generations/SKING_DDJ_v54/1897D1MKQ63RK458_result_v104.png +3 -0
  35. entropydrop_website_generations/SKING_DDJ_v54/18KJ4AZNABLACZJJ_result_v101.png +3 -0
  36. entropydrop_website_generations/SKING_DDJ_v54/18KJ4AZNABLACZJJ_result_v103.png +3 -0
  37. entropydrop_website_generations/SKING_DDJ_v54/18KJ4AZNABLACZJJ_result_v104.png +3 -0
  38. entropydrop_website_generations/SKING_DDJ_v54/19CLC1CJLH6CRG7H_result_v101.png +3 -0
  39. entropydrop_website_generations/SKING_DDJ_v54/19CLC1CJLH6CRG7H_result_v103.png +3 -0
  40. entropydrop_website_generations/SKING_DDJ_v54/19CLC1CJLH6CRG7H_result_v104.png +3 -0
  41. entropydrop_website_generations/SKING_DDJ_v54/19GUSYTDK497T7UV_result_v101.png +3 -0
  42. entropydrop_website_generations/SKING_DDJ_v54/19GUSYTDK497T7UV_result_v103.png +3 -0
  43. entropydrop_website_generations/SKING_DDJ_v54/19GUSYTDK497T7UV_result_v104.png +3 -0
  44. entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_best.txt +1 -0
  45. entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_result_v101.png +3 -0
  46. entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_result_v103.png +3 -0
  47. entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_result_v104.png +3 -0
  48. entropydrop_website_generations/SKING_DDJ_v54/1DQW79RUHEPKSQ4N_result_v101.png +3 -0
  49. entropydrop_website_generations/SKING_DDJ_v54/1DQW79RUHEPKSQ4N_result_v103.png +3 -0
  50. entropydrop_website_generations/SKING_DDJ_v54/1DQW79RUHEPKSQ4N_result_v104.png +3 -0
best_annotator/.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ __pycache__/
2
+ *.pyc
3
+ server.log
4
+ server.pid
best_annotator/README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DDJ 最佳结果标注
2
+
3
+ 一个局域网内使用的小工具,递归读取 `SKING_DDJ_Dataset` 的 source 与同目录、同编号的多个 result。Python 3.10+ 标准库即可启动;3D 预览依赖已随工具附带,无需连接 CDN 或安装 Node。
4
+
5
+ ```bash
6
+ python3 app.py --root /home/ds/llms/SKING_DDJ_Dataset --host 192.168.0.111 --port 8765
7
+ ```
8
+
9
+ 浏览器打开 `http://192.168.0.111:8765`。默认只显示有 result 的待标注条目;“全部”包含没有结果的 source 和 source_err 样例。支持 PNG/JPG/JPEG/WebP。
10
+
11
+ - 左侧查看 source,也可以切换 edited 中间图;点击图片可放大。
12
+ - 右侧并排显示各版本 3D 皮肤与 UV 贴图。拖动、滚轮和视角按钮会同步各版本;可查看头部、背面、隐藏外层或只看 UV。
13
+ - 点击“选为最佳”或按数字键 1–9,自动保存并进入下一项。
14
+ - “暂时忽略”(S)不写文件,只在本次页面内暂时跳过。下次打开或刷新页面,未标注条目仍可选择。
15
+ - “上一个”(←)可回看刚才的条目。“已标注”筛选中可以重选或撤销。
16
+ - “刷新目录”重新扫描新增/删除的图片;如果原最佳图片已删除,条目会恢复为待标注。
17
+
18
+ ## 标注格式
19
+
20
+ 在对应图片的同一目录写入 UTF-8 文件 `{id}_best.txt`,内容只有选中的 result 文件名和换行,例如:
21
+
22
+ ```text
23
+ 14CN7VTM7MBVWXV6_result_v104.png
24
+ ```
25
+
26
+ 程序不修改图片。保存会验证 source/result 仍存在,以临时文件 + 原子替换写入,且拒绝覆盖来自另一页面的新选择。撤销只移除当前标注文件。数据以磁盘文件为准,重启服务后仍有效。
27
+
28
+ 部署启动时的后台进程号和日志位于本目录 `server.pid`、`server.log`。重新启动前应先结束原进程,或使用另一个端口。
29
+
30
+ ## 检查
31
+
32
+ ```bash
33
+ python3 -m unittest -v test_app.py
34
+ ```
35
+
36
+ 测试使用临时数据,不写真实数据集的标注。
37
+
38
+ 3D 组件:[skinview3d 3.4.2](https://github.com/bs-community/skinview3d),MIT 许可证,见 `static/vendor/skinview3d-LICENSE`。
best_annotator/app.py ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Small local DDJ best-result annotator. Python standard library only."""
3
+ import argparse
4
+ import hashlib
5
+ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
6
+ import json
7
+ import mimetypes
8
+ import os
9
+ from pathlib import Path
10
+ import re
11
+ import tempfile
12
+ import threading
13
+ from urllib.parse import parse_qs, quote, unquote, urlsplit
14
+
15
+ APP_DIR = Path(__file__).resolve().parent
16
+ STATIC_DIR = APP_DIR / 'static'
17
+ SOURCE_RE = re.compile(r'^(?P<id>.+)_source(?P<error>_err)?\.(png|jpe?g|webp)$', re.I)
18
+ RESULT_RE = re.compile(r'^(?P<id>.+?)_result(?:_(?P<version>.+))?\.(png|jpe?g|webp)$', re.I)
19
+ EDITED_RE = re.compile(r'^(?P<id>.+)_edited(?P<error>_err)?\.(png|jpe?g|webp)$', re.I)
20
+ IMAGE_SUFFIXES = {'.png', '.jpg', '.jpeg', '.webp'}
21
+
22
+
23
+ class ReviewError(Exception):
24
+ def __init__(self, message, status=400):
25
+ super().__init__(message)
26
+ self.status = status
27
+
28
+
29
+ def natural_key(value):
30
+ return tuple((0, int(x)) if x.isdigit() else (1, x.lower())
31
+ for x in re.split(r'(\d+)', value))
32
+
33
+
34
+ class Dataset:
35
+ def __init__(self, root):
36
+ self.root = Path(root).resolve()
37
+ if not self.root.is_dir():
38
+ raise ValueError('数据集目录不存在')
39
+ self.lock = threading.RLock()
40
+ self.records = {}
41
+ self.assets = set()
42
+ self.scan()
43
+
44
+ def _inside_file(self, path):
45
+ return path.is_file() and not path.is_symlink() and path.resolve().is_relative_to(self.root)
46
+
47
+ def scan(self):
48
+ with self.lock:
49
+ records, assets = {}, set()
50
+ def fail(error):
51
+ raise error
52
+ for directory, folders, files in os.walk(self.root, followlinks=False, onerror=fail):
53
+ parent = Path(directory)
54
+ folders[:] = sorted(x for x in folders
55
+ if x not in {'.git', '.cache', '__pycache__'} and (parent / x).resolve() != APP_DIR)
56
+ sources, result_groups, edited_groups = {}, {}, {}
57
+ for name in sorted(files):
58
+ path = parent / name
59
+ if path.suffix.lower() not in IMAGE_SUFFIXES or not self._inside_file(path):
60
+ continue
61
+ match = SOURCE_RE.fullmatch(name)
62
+ if match:
63
+ identity = match['id']
64
+ previous = sources.get(identity)
65
+ if previous is None or (previous[1] and not match['error']):
66
+ sources[identity] = (name, bool(match['error']))
67
+ result = RESULT_RE.fullmatch(name)
68
+ if result:
69
+ result_groups.setdefault(result['id'], []).append(
70
+ {'name': name, 'version': result['version'] or 'original', 'path': path})
71
+ edited_match = EDITED_RE.fullmatch(name)
72
+ if edited_match and (edited_match['id'] not in edited_groups or not edited_match['error']):
73
+ edited_groups[edited_match['id']] = path
74
+ for identity, (source, error) in sources.items():
75
+ folder = str(parent.relative_to(self.root))
76
+ key = hashlib.sha256((folder + '/' + identity).encode()).hexdigest()[:24]
77
+ results = result_groups.get(identity, [])
78
+ edited = edited_groups.get(identity)
79
+ results.sort(key=lambda x: (x['version'] != 'original', natural_key(x['version']), x['name']))
80
+ record = {'key': key, 'id': identity, 'folder': folder, 'source': parent / source,
81
+ 'source_error': error, 'edited': edited, 'results': results,
82
+ 'best_path': parent / (identity + '_best.txt')}
83
+ records[key] = record
84
+ assets.add(record['source'])
85
+ if edited is not None:
86
+ assets.add(edited)
87
+ assets.update(x['path'] for x in results)
88
+ self.records = dict(sorted(records.items(), key=lambda kv: (natural_key(kv[1]['folder']), natural_key(kv[1]['id']))))
89
+ self.assets = assets
90
+
91
+ def best_state(self, record):
92
+ path = record['best_path']
93
+ if path.is_symlink():
94
+ raise ReviewError('标注文件是符号链接,已拒绝访问', 409)
95
+ try:
96
+ data = path.read_bytes()
97
+ except FileNotFoundError:
98
+ return None, 'missing'
99
+ if len(data) > 8192:
100
+ raise ReviewError('标注文件异常,大小超过 8 KB', 409)
101
+ return data.decode('utf-8').strip(), hashlib.sha256(data).hexdigest()
102
+
103
+ def media(self, path):
104
+ if path is None:
105
+ return None
106
+ try:
107
+ stat = path.stat()
108
+ except FileNotFoundError:
109
+ return None
110
+ relative = str(path.relative_to(self.root))
111
+ return '/media?path=' + quote(relative, safe='') + f'&v={stat.st_mtime_ns}-{stat.st_size}'
112
+
113
+ def describe(self, record):
114
+ value, revision = self.best_state(record)
115
+ results = [{'name': x['name'], 'version': x['version'], 'url': self.media(x['path'])}
116
+ for x in record['results'] if self._inside_file(x['path'])]
117
+ valid = value is not None and value in {x['name'] for x in results}
118
+ return {'key': record['key'], 'id': record['id'], 'folder': record['folder'],
119
+ 'source_url': self.media(record['source']), 'source_error': record['source_error'],
120
+ 'edited_url': self.media(record['edited']), 'results': results,
121
+ 'best': value if valid else None, 'invalid_best': bool(value and not valid),
122
+ 'revision': revision, 'best_file': str(record['best_path'].relative_to(self.root))}
123
+
124
+ def state(self):
125
+ with self.lock:
126
+ items = [self.describe(x) for x in self.records.values() if self._inside_file(x['source'])]
127
+ stats = {'total': len(items), 'done': sum(x['best'] is not None for x in items),
128
+ 'pending': sum(bool(x['results']) and x['best'] is None for x in items),
129
+ 'no_results': sum(not x['results'] for x in items)}
130
+ return {'items': items, 'stats': stats, 'dataset': str(self.root)}
131
+
132
+ def choose(self, key, result_name, expected_revision, clear=False):
133
+ with self.lock:
134
+ record = self.records.get(key)
135
+ if record is None or not self._inside_file(record['source']):
136
+ raise ReviewError('条目或 source 已被移除,请刷新目录', 404)
137
+ _, revision = self.best_state(record)
138
+ if not isinstance(expected_revision, str) or revision != expected_revision:
139
+ raise ReviewError('该标注已在其他页面被修改,请刷新后重试', 409)
140
+ path = record['best_path']
141
+ if path.parent.resolve() != record['source'].parent.resolve():
142
+ raise ReviewError('无效的保存目录')
143
+ if clear:
144
+ path.unlink(missing_ok=True)
145
+ else:
146
+ chosen = next((x for x in record['results'] if x['name'] == result_name), None)
147
+ if chosen is None or not self._inside_file(chosen['path']):
148
+ raise ReviewError('请选择当前条目中存在的 result 图片')
149
+ temporary = None
150
+ try:
151
+ with tempfile.NamedTemporaryFile(mode='w', encoding='utf-8', newline='\n',
152
+ prefix='.' + path.name + '.', suffix='.tmp', dir=path.parent, delete=False) as stream:
153
+ temporary = Path(stream.name)
154
+ stream.write(result_name + '\n')
155
+ stream.flush()
156
+ os.fsync(stream.fileno())
157
+ os.replace(temporary, path)
158
+ finally:
159
+ if temporary is not None:
160
+ temporary.unlink(missing_ok=True)
161
+ return self.describe(record)
162
+
163
+ def resolve_media(self, relative):
164
+ path = self.root / relative
165
+ if path not in self.assets or not self._inside_file(path):
166
+ raise ReviewError('图片不存在', 404)
167
+ return path
168
+
169
+
170
+ def make_server(dataset, host, port):
171
+ class Handler(BaseHTTPRequestHandler):
172
+ server_version = 'DDJReview/1.0'
173
+
174
+ def send(self, status, data, content_type='application/json; charset=utf-8', cache='no-store'):
175
+ if not isinstance(data, bytes):
176
+ data = json.dumps(data, ensure_ascii=False).encode()
177
+ self.send_response(status)
178
+ self.send_header('Content-Type', content_type)
179
+ self.send_header('Content-Length', str(len(data)))
180
+ self.send_header('Cache-Control', cache)
181
+ self.send_header('X-Content-Type-Options', 'nosniff')
182
+ self.send_header('Referrer-Policy', 'same-origin')
183
+ self.send_header('Content-Security-Policy', "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; connect-src 'self'; object-src 'none'; frame-ancestors 'none'")
184
+ self.end_headers()
185
+ self.wfile.write(data)
186
+
187
+ def do_GET(self):
188
+ try:
189
+ request = urlsplit(self.path)
190
+ if request.path == '/api/state':
191
+ return self.send(200, dataset.state())
192
+ if request.path == '/api/health':
193
+ return self.send(200, {'status': 'ok', 'sources': len(dataset.records)})
194
+ if request.path == '/media':
195
+ relative = parse_qs(request.query).get('path', [''])[0]
196
+ with dataset.lock:
197
+ path = dataset.resolve_media(relative)
198
+ return self.send(200, path.read_bytes(), mimetypes.guess_type(path.name)[0] or 'application/octet-stream', 'private, max-age=3600')
199
+ name = 'index.html' if request.path == '/' else unquote(request.path).lstrip('/')
200
+ path = (STATIC_DIR / name).resolve()
201
+ if not path.is_relative_to(STATIC_DIR) or not path.is_file():
202
+ raise ReviewError('文件不存在', 404)
203
+ return self.send(200, path.read_bytes(), mimetypes.guess_type(path.name)[0] or 'application/octet-stream')
204
+ except (ReviewError, OSError, UnicodeError) as error:
205
+ self.send(getattr(error, 'status', 500), {'error': str(error)})
206
+
207
+ def do_POST(self):
208
+ try:
209
+ origin = self.headers.get('Origin')
210
+ if origin and urlsplit(origin).netloc != self.headers.get('Host'):
211
+ raise ReviewError('不允许跨站修改', 403)
212
+ if self.headers.get('X-Annotation-Client') != 'ddj-review':
213
+ raise ReviewError('缺少客户端标识', 403)
214
+ if self.headers.get_content_type() != 'application/json':
215
+ raise ReviewError('需要 JSON 请求')
216
+ length = int(self.headers.get('Content-Length', '0'))
217
+ if not 0 <= length <= 16384:
218
+ raise ReviewError('请求过大', 413)
219
+ body = json.loads(self.rfile.read(length) or b'{}')
220
+ if not isinstance(body, dict):
221
+ raise ReviewError('无效请求')
222
+ if self.path == '/api/refresh':
223
+ dataset.scan()
224
+ return self.send(200, dataset.state())
225
+ if self.path not in {'/api/choose', '/api/clear'}:
226
+ raise ReviewError('接口不存在', 404)
227
+ if not isinstance(body.get('key'), str):
228
+ raise ReviewError('缺少条目编号')
229
+ item = dataset.choose(body['key'], body.get('result'), body.get('revision'), self.path == '/api/clear')
230
+ return self.send(200, {'item': item})
231
+ except (ReviewError, OSError, ValueError, UnicodeError) as error:
232
+ self.send(getattr(error, 'status', 400), {'error': str(error)})
233
+
234
+ server = ThreadingHTTPServer((host, port), Handler)
235
+ server.daemon_threads = True
236
+ return server
237
+
238
+
239
+ def main():
240
+ parser = argparse.ArgumentParser(description=__doc__)
241
+ parser.add_argument('--root', type=Path, default=APP_DIR.parent)
242
+ parser.add_argument('--host', default='127.0.0.1')
243
+ parser.add_argument('--port', type=int, default=8765)
244
+ args = parser.parse_args()
245
+ dataset = Dataset(args.root)
246
+ server = make_server(dataset, args.host, args.port)
247
+ print(json.dumps({'url': f'http://{args.host}:{server.server_port}', 'root': str(dataset.root),
248
+ 'stats': dataset.state()['stats']}, ensure_ascii=False), flush=True)
249
+ try:
250
+ server.serve_forever()
251
+ except KeyboardInterrupt:
252
+ pass
253
+ finally:
254
+ server.server_close()
255
+
256
+
257
+ if __name__ == '__main__':
258
+ main()
best_annotator/static/app.js ADDED
@@ -0,0 +1,359 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+ const $ = id => document.getElementById(id);
3
+ const state = {items: [], current: null, filter: 'pending', skipped: new Set(), history: [],
4
+ viewers: [], busy: false, generation: 0, camera: 'angle', uvOnly: false, sourceTab: 'source', syncing: false};
5
+ let toastTimer;
6
+
7
+ function toast(message, error = false) {
8
+ clearTimeout(toastTimer);
9
+ $('toast').textContent = message;
10
+ $('toast').classList.toggle('error', error);
11
+ $('toast').hidden = false;
12
+ toastTimer = setTimeout(() => { $('toast').hidden = true; }, error ? 6500 : 3200);
13
+ }
14
+
15
+ async function api(path, body) {
16
+ const response = await fetch(path, body === undefined ? {} : {method: 'POST',
17
+ headers: {'Content-Type': 'application/json', 'X-Annotation-Client': 'ddj-review'}, body: JSON.stringify(body)});
18
+ const data = await response.json();
19
+ if (!response.ok) throw new Error(data.error || '请求失败,请重试');
20
+ return data;
21
+ }
22
+
23
+ function currentItem() { return state.items.find(x => x.key === state.current); }
24
+ function label(result) { return result.version === 'original' ? '原版' : result.version === 'err' ? '原版 · err' : result.version; }
25
+ function matches(item) {
26
+ if ($('folder').value && item.folder !== $('folder').value) return false;
27
+ if (!item.id.toLowerCase().includes($('search').value.trim().toLowerCase())) return false;
28
+ if (state.filter === 'pending') return item.results.length > 0 && !item.best;
29
+ if (state.filter === 'done') return Boolean(item.best);
30
+ if (state.filter === 'no_results') return !item.results.length;
31
+ return true;
32
+ }
33
+ function pool() { return state.items.filter(x => matches(x) && !state.skipped.has(x.key)); }
34
+
35
+ function updateStats() {
36
+ const done = state.items.filter(x => x.best).length;
37
+ const pending = state.items.filter(x => x.results.length && !x.best).length;
38
+ $('doneCount').textContent = done;
39
+ $('pendingCount').textContent = pending;
40
+ $('totalCount').textContent = state.items.length;
41
+ $('noResultCount').textContent = state.items.filter(x => !x.results.length).length;
42
+ $('progressText').textContent = `${done} / ${done + pending}`;
43
+ $('progressFill').style.width = `${done + pending ? done / (done + pending) * 100 : 0}%`;
44
+ $('sessionNote').textContent = state.skipped.size ? `本次已忽略 ${state.skipped.size} 项 · 下次打开仍可选择` : '忽略不保存,下次打开仍可选择';
45
+ document.querySelectorAll('[data-filter]').forEach(button => button.classList.toggle('active', button.dataset.filter === state.filter));
46
+ }
47
+
48
+ function updateJump() {
49
+ const select = $('jump');
50
+ select.replaceChildren();
51
+ const rows = state.items.filter(matches);
52
+ const current = currentItem();
53
+ if (current && !rows.some(x => x.key === current.key)) rows.unshift(current);
54
+ for (const item of rows) {
55
+ const option = document.createElement('option');
56
+ option.value = item.key;
57
+ option.textContent = `${item.best ? '✓ ' : ''}${item.id}${state.skipped.has(item.key) ? ' · 已忽略' : ''}`;
58
+ select.append(option);
59
+ }
60
+ select.value = state.current || '';
61
+ }
62
+
63
+ function setBusy(busy) {
64
+ state.busy = busy;
65
+ document.body.classList.toggle('busy', busy);
66
+ document.querySelectorAll('.choose-button, #skip, #refresh, #clearBest, #jump, #folder, #search').forEach(x => { x.disabled = busy; });
67
+ $('previous').disabled = busy || !state.history.length;
68
+ if (!busy) document.querySelectorAll('.result-card.selected .choose-button').forEach(x => { x.disabled = true; });
69
+ }
70
+
71
+ function disposeViewers() {
72
+ state.generation++;
73
+ for (const entry of state.viewers) {
74
+ entry.observer.disconnect();
75
+ entry.viewer.dispose();
76
+ entry.viewer.renderer.forceContextLoss();
77
+ }
78
+ state.viewers = [];
79
+ }
80
+
81
+ function cameraPreset(viewer) {
82
+ const camera = viewer.camera;
83
+ if (state.camera === 'head') {
84
+ viewer.controls.target.set(0, 10, 0);
85
+ camera.position.set(10, 12, 18);
86
+ } else {
87
+ viewer.controls.target.set(0, 0, 0);
88
+ const distance = 48;
89
+ if (state.camera === 'front') camera.position.set(0, 0, distance);
90
+ else if (state.camera === 'back') camera.position.set(0, 0, -distance);
91
+ else camera.position.set(23, 7, 42);
92
+ }
93
+ camera.lookAt(viewer.controls.target);
94
+ camera.updateProjectionMatrix();
95
+ viewer.controls.update();
96
+ }
97
+
98
+ function applyCamera() {
99
+ state.syncing = true;
100
+ try { state.viewers.forEach(x => cameraPreset(x.viewer)); }
101
+ finally { state.syncing = false; }
102
+ document.querySelectorAll('[data-camera]').forEach(x => x.classList.toggle('active', x.dataset.camera === state.camera));
103
+ }
104
+
105
+ function syncCamera(source) {
106
+ if (state.syncing) return;
107
+ state.syncing = true;
108
+ try {
109
+ for (const {viewer} of state.viewers) {
110
+ if (viewer === source) continue;
111
+ viewer.camera.position.copy(source.camera.position);
112
+ viewer.camera.quaternion.copy(source.camera.quaternion);
113
+ viewer.camera.zoom = source.camera.zoom;
114
+ viewer.controls.target.copy(source.controls.target);
115
+ viewer.camera.updateProjectionMatrix();
116
+ viewer.controls.update();
117
+ }
118
+ } finally { state.syncing = false; }
119
+ }
120
+
121
+ function createViewer(stage, result, generation) {
122
+ const status = stage.querySelector('.preview-status');
123
+ if (!window.skinview3d) { status.textContent = '3D 组件不可用,请查看下方 UV'; return; }
124
+ let viewer;
125
+ try {
126
+ viewer = new skinview3d.SkinViewer({canvas: stage.querySelector('canvas'), width: stage.clientWidth || 220,
127
+ height: stage.clientHeight || 300, pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
128
+ renderPaused: state.uvOnly, model: 'default'});
129
+ viewer.controls.enablePan = false;
130
+ viewer.controls.enableDamping = false;
131
+ viewer.controls.minDistance = 12;
132
+ viewer.controls.maxDistance = 120;
133
+ viewer.controls.addEventListener('change', () => syncCamera(viewer));
134
+ const observer = new ResizeObserver(() => {
135
+ if (!viewer.disposed && stage.clientWidth && stage.clientHeight) {
136
+ viewer.width = stage.clientWidth;
137
+ viewer.height = stage.clientHeight;
138
+ }
139
+ });
140
+ observer.observe(stage);
141
+ state.viewers.push({viewer, observer});
142
+ Promise.resolve(viewer.loadSkin(result.url, {model: 'default'})).then(() => {
143
+ if (generation !== state.generation || viewer.disposed) return;
144
+ viewer.playerObject.skin.setOuterLayerVisible($('outerLayer').checked);
145
+ status.hidden = true;
146
+ }).catch(() => {
147
+ if (generation === state.generation) status.textContent = '此图片无法生成 3D 预览,可查看 UV';
148
+ });
149
+ } catch (error) {
150
+ if (viewer && !viewer.disposed) viewer.dispose();
151
+ status.textContent = '3D 预览不可用,可查看下方 UV';
152
+ }
153
+ }
154
+
155
+ function showImage(url, title, pixelated = false) {
156
+ $('dialogTitle').textContent = title;
157
+ $('dialogImage').src = url;
158
+ $('dialogImage').classList.toggle('pixelated', pixelated);
159
+ $('imageDialog').showModal();
160
+ }
161
+
162
+ function renderSource() {
163
+ const item = currentItem();
164
+ if (!item) return;
165
+ if (state.sourceTab === 'edited' && !item.edited_url) state.sourceTab = 'source';
166
+ $('sourceTab').classList.toggle('active', state.sourceTab === 'source');
167
+ $('editedTab').classList.toggle('active', state.sourceTab === 'edited');
168
+ $('editedTab').disabled = !item.edited_url;
169
+ $('sourceImage').src = state.sourceTab === 'edited' ? item.edited_url : item.source_url;
170
+ $('sourceImage').alt = `${item.id} 的 ${state.sourceTab} 图片`;
171
+ $('sourceCaption').textContent = `${state.sourceTab === 'source' ? '原始输入' : '中间生成图'} · 点击放大`;
172
+ $('sourceFlag').textContent = item.source_error ? 'err 样例' : '';
173
+ }
174
+
175
+ function show(key, remember = true) {
176
+ if (state.busy) return;
177
+ if (remember && state.current && key !== state.current) state.history.push(state.current);
178
+ state.current = key;
179
+ disposeViewers();
180
+ updateStats();
181
+ updateJump();
182
+ const item = currentItem();
183
+ $('workspace').hidden = !item;
184
+ $('itemHeading').hidden = !item;
185
+ $('empty').hidden = Boolean(item);
186
+ $('skip').disabled = !item;
187
+ $('previous').disabled = !state.history.length;
188
+ if (!item) {
189
+ const ignored = state.items.filter(x => matches(x) && state.skipped.has(x.key)).length;
190
+ $('emptyTitle').textContent = ignored ? '本轮暂时看到这里' : '当前筛选下没有更多条目';
191
+ $('emptyText').textContent = ignored ? `还有 ${ignored} 项暂时忽略。下次打开工具会重新出现,也可以现在继续查看。` : '可以切换筛选查看已标注条目,或刷新目录读取新增图片。';
192
+ return;
193
+ }
194
+ $('folderLabel').textContent = item.folder;
195
+ $('itemId').textContent = item.id;
196
+ $('itemInfo').textContent = `${item.results.length} 个结果版本 · ${item.best ? '已保存最佳结果,可重新选择' : item.invalid_best ? '原标注对应的结果已不存在,请重新选择' : '请选择一个最佳结果,或暂时忽略'}`;
197
+ $('savedBox').hidden = !item.best && !item.invalid_best;
198
+ $('savedName').textContent = item.best || '原选择已失效';
199
+ renderSource();
200
+ const grid = $('results');
201
+ grid.replaceChildren();
202
+ grid.classList.toggle('uv-only', state.uvOnly);
203
+ if (!item.results.length) {
204
+ const empty = document.createElement('div');
205
+ empty.className = 'no-result-card';
206
+ empty.innerHTML = '<strong>这个 source 暂无 result 图片</strong><p>可以先忽略,生成结果后刷新目录再标注。</p>';
207
+ grid.append(empty);
208
+ $('previewHint').hidden = true;
209
+ return;
210
+ }
211
+ $('previewHint').hidden = false;
212
+ item.results.forEach((result, index) => {
213
+ const card = document.createElement('article');
214
+ card.className = 'result-card';
215
+ card.classList.toggle('selected', item.best === result.name);
216
+ card.dataset.result = result.name;
217
+ card.innerHTML = '<div class="result-header"><span class="version-name"></span><span class="version-number"></span></div><div class="skin-stage"><canvas></canvas><span class="preview-status">正在加载 3D…</span></div><div class="uv-area"><button class="uv-button" title="放大 UV 贴图"><img alt=""></button><div class="uv-caption"><strong>UV 贴图</strong><span>点击放大</span></div></div><div class="result-actions"><div class="result-file"></div><button class="choose-button"></button></div>';
218
+ card.querySelector('.version-name').textContent = label(result);
219
+ const badge = card.querySelector('.version-number');
220
+ badge.textContent = index + 1;
221
+ if (item.best === result.name) { badge.className = 'chosen-badge'; badge.textContent = '已选最佳'; }
222
+ const image = card.querySelector('img');
223
+ image.src = result.url;
224
+ image.alt = `${label(result)} 的 UV 贴图`;
225
+ card.querySelector('.uv-button').setAttribute('aria-label', `放大 ${label(result)} UV 贴图`);
226
+ card.querySelector('.uv-button').onclick = () => showImage(result.url, result.name, true);
227
+ const file = card.querySelector('.result-file');
228
+ file.textContent = result.name;
229
+ file.title = result.name;
230
+ const button = card.querySelector('.choose-button');
231
+ button.textContent = item.best === result.name ? '当前最佳' : '选为最佳';
232
+ button.setAttribute('aria-label', `将 ${label(result)} 选为最佳`);
233
+ button.disabled = item.best === result.name;
234
+ button.onclick = () => choose(result);
235
+ grid.append(card);
236
+ createViewer(card.querySelector('.skin-stage'), result, state.generation);
237
+ });
238
+ applyCamera();
239
+ }
240
+
241
+ function next() {
242
+ const list = pool();
243
+ const index = state.items.findIndex(x => x.key === state.current);
244
+ const after = list.find(x => state.items.indexOf(x) > index);
245
+ show((after || list.find(x => x.key !== state.current))?.key || null);
246
+ }
247
+
248
+ async function choose(result) {
249
+ if (state.busy) return;
250
+ const item = currentItem();
251
+ if (!item) return;
252
+ setBusy(true);
253
+ try {
254
+ const data = await api('/api/choose', {key: item.key, result: result.name, revision: item.revision});
255
+ const index = state.items.findIndex(x => x.key === item.key);
256
+ state.items[index] = data.item;
257
+ state.skipped.delete(item.key);
258
+ setBusy(false);
259
+ toast(`已保存 ${label(result)} 为最佳 · ${item.id}`);
260
+ next();
261
+ } catch (error) {
262
+ setBusy(false);
263
+ toast(error.message, true);
264
+ }
265
+ }
266
+
267
+ function skip() {
268
+ if (state.busy || !state.current) return;
269
+ state.skipped.add(state.current);
270
+ next();
271
+ }
272
+
273
+ async function clearBest() {
274
+ const item = currentItem();
275
+ if (!item || state.busy) return;
276
+ setBusy(true);
277
+ try {
278
+ const data = await api('/api/clear', {key: item.key, revision: item.revision});
279
+ state.items[state.items.findIndex(x => x.key === item.key)] = data.item;
280
+ setBusy(false);
281
+ show(item.key, false);
282
+ toast('已撤销选择,恢复为待标注');
283
+ } catch (error) { setBusy(false); toast(error.message, true); }
284
+ }
285
+
286
+ async function load(refresh = false) {
287
+ if (state.busy) return;
288
+ setBusy(true);
289
+ try {
290
+ const data = await api(refresh ? '/api/refresh' : '/api/state', refresh ? {} : undefined);
291
+ state.items = data.items;
292
+ const folder = $('folder').value;
293
+ $('folder').replaceChildren(new Option('所有数据目录', ''));
294
+ for (const value of [...new Set(state.items.map(x => x.folder))]) $('folder').append(new Option(value.split('/').pop(), value));
295
+ if ([...$('folder').options].some(x => x.value === folder)) $('folder').value = folder;
296
+ setBusy(false);
297
+ const item = currentItem();
298
+ show(item && matches(item) ? item.key : pool()[0]?.key || null, false);
299
+ if (refresh) toast(`已刷新 · ${data.stats.total} 个 source`);
300
+ } catch (error) {
301
+ setBusy(false);
302
+ $('itemInfo').textContent = '读取失败,请点击刷新目录重试';
303
+ toast(error.message, true);
304
+ }
305
+ }
306
+
307
+ $('filters').onclick = event => {
308
+ const button = event.target.closest('[data-filter]');
309
+ if (!button || state.busy) return;
310
+ state.filter = button.dataset.filter;
311
+ show(pool()[0]?.key || null);
312
+ };
313
+ $('folder').onchange = () => { if (!state.busy) show(pool()[0]?.key || null); };
314
+ $('search').oninput = () => { if (!state.busy) show(pool()[0]?.key || null); };
315
+ $('jump').onchange = () => {
316
+ if (!state.busy) { state.skipped.delete($('jump').value); show($('jump').value); }
317
+ };
318
+ $('refresh').onclick = () => load(true);
319
+ $('skip').onclick = skip;
320
+ $('previous').onclick = () => {
321
+ if (!state.busy && state.history.length) show(state.history.pop(), false);
322
+ };
323
+ $('clearBest').onclick = clearBest;
324
+ $('sourceTab').onclick = () => { state.sourceTab = 'source'; renderSource(); };
325
+ $('editedTab').onclick = () => { state.sourceTab = 'edited'; renderSource(); };
326
+ $('enlargeSource').onclick = () => {
327
+ const item = currentItem();
328
+ if (item) showImage($('sourceImage').src, `${item.id}_${state.sourceTab}`);
329
+ };
330
+ $('closeDialog').onclick = () => $('imageDialog').close();
331
+ $('imageDialog').onclick = event => { if (event.target === $('imageDialog')) $('imageDialog').close(); };
332
+ $('resume').onclick = () => {
333
+ state.skipped.clear();
334
+ state.filter = 'pending';
335
+ $('folder').value = '';
336
+ $('search').value = '';
337
+ show(pool()[0]?.key || null);
338
+ };
339
+ document.querySelectorAll('[data-camera]').forEach(button => { button.onclick = () => { state.camera = button.dataset.camera; applyCamera(); }; });
340
+ $('outerLayer').onchange = () => state.viewers.forEach(x => x.viewer.playerObject.skin.setOuterLayerVisible($('outerLayer').checked));
341
+ $('uvMode').onclick = () => {
342
+ state.uvOnly = !state.uvOnly;
343
+ $('uvMode').setAttribute('aria-pressed', state.uvOnly);
344
+ $('uvMode').textContent = state.uvOnly ? '显示 3D' : '只看 UV';
345
+ $('results').classList.toggle('uv-only', state.uvOnly);
346
+ state.viewers.forEach(x => { x.viewer.renderPaused = state.uvOnly; });
347
+ };
348
+ document.addEventListener('keydown', event => {
349
+ if (state.busy || $('imageDialog').open || event.ctrlKey || event.metaKey || event.altKey || event.target.closest('input,select,textarea,[contenteditable]')) return;
350
+ if (event.key.toLowerCase() === 's') { event.preventDefault(); skip(); }
351
+ else if (event.key === 'ArrowLeft') { event.preventDefault(); $('previous').click(); }
352
+ else if (event.key === 'ArrowRight') { event.preventDefault(); next(); }
353
+ else if (/^[1-9]$/.test(event.key)) {
354
+ const result = currentItem()?.results[Number(event.key) - 1];
355
+ if (result) { event.preventDefault(); choose(result); }
356
+ }
357
+ });
358
+ window.addEventListener('beforeunload', disposeViewers);
359
+ load();
best_annotator/static/index.html ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
5
+ <title>DDJ · 最佳结果标注</title>
6
+ <link rel="stylesheet" href="/style.css">
7
+ <script src="/vendor/skinview3d-3.4.2.bundle.js" defer></script>
8
+ <script src="/app.js" defer></script>
9
+ </head>
10
+ <body>
11
+ <header class="topbar">
12
+ <div class="brand"><span class="brand-icon">D</span><div><h1>DDJ 最佳结果标注</h1><p>对照原图,选出最好的皮肤</p></div></div>
13
+ <div class="progress"><div><span>标注进度</span><strong id="progressText">读取中…</strong></div><div class="progress-track"><i id="progressFill"></i></div></div>
14
+ <button id="refresh" class="button secondary">刷新目录</button>
15
+ </header>
16
+ <section class="filters" aria-label="筛选条目">
17
+ <div class="segments" id="filters">
18
+ <button data-filter="pending" class="active">待标注 <b id="pendingCount">–</b></button>
19
+ <button data-filter="done">已标注 <b id="doneCount">–</b></button>
20
+ <button data-filter="all">全部 <b id="totalCount">–</b></button>
21
+ <button data-filter="no_results">无结果 <b id="noResultCount">–</b></button>
22
+ </div>
23
+ <select id="folder" aria-label="数据目录"><option value="">所有数据目录</option></select>
24
+ <input id="search" type="search" placeholder="搜索编号…" aria-label="搜索编号" autocomplete="off">
25
+ </section>
26
+ <main>
27
+ <section class="item-heading" id="itemHeading">
28
+ <div><span class="eyebrow" id="folderLabel"></span><h2 id="itemId">正在读取数据集</h2><p id="itemInfo"></p></div>
29
+ <div class="jump"><label for="jump">跳转条目</label><select id="jump" aria-label="跳转条目"></select></div>
30
+ </section>
31
+ <div class="workspace" id="workspace" hidden>
32
+ <aside class="source-panel panel">
33
+ <div class="panel-title"><div class="source-tabs"><button id="sourceTab" class="active">source · 原图</button><button id="editedTab">edited · 中间图</button></div></div>
34
+ <button class="source-image-button" id="enlargeSource" title="点击放大图片"><img id="sourceImage" alt="当前条目的 source 原图"></button>
35
+ <div class="source-caption"><span id="sourceCaption">点击图片放大</span><span id="sourceFlag"></span></div>
36
+ <div class="saved-box" id="savedBox" hidden><span>当前最佳</span><strong id="savedName"></strong><button id="clearBest" class="text-button">撤销此选择</button></div>
37
+ <p class="save-note">选择后自动保存到同目录的 <code>{id}_best.txt</code>,并进入下一项。</p>
38
+ </aside>
39
+ <section class="comparison">
40
+ <div class="comparison-toolbar">
41
+ <div class="camera-buttons"><span>同步视角</span><button data-camera="angle" class="active">斜前</button><button data-camera="front">正面</button><button data-camera="back">背面</button><button data-camera="head">头部</button></div>
42
+ <div class="view-options"><label><input id="outerLayer" type="checkbox" checked>显示外层</label><button id="uvMode" class="button tiny" aria-pressed="false">只看 UV</button></div>
43
+ </div>
44
+ <div class="result-grid" id="results"></div>
45
+ <p class="preview-hint" id="previewHint">拖动任一模型可同步旋转,滚轮缩放;点击 UV 贴图可放大。</p>
46
+ </section>
47
+ </div>
48
+ <section class="empty panel" id="empty" hidden><span class="empty-icon">✓</span><h2 id="emptyTitle"></h2><p id="emptyText"></p><button id="resume" class="button primary">继续查看待标注</button></section>
49
+ </main>
50
+ <footer class="footer">
51
+ <div class="navigation"><button id="previous" class="button secondary">← 上一个</button><button id="skip" class="button secondary">暂时忽略 →</button></div>
52
+ <span class="keyboard-hint"><kbd>1</kbd>–<kbd>9</kbd> 选择版本 <kbd>S</kbd> 忽略 <kbd>←</kbd> 回看</span>
53
+ <div class="session-note" id="sessionNote">忽略不保存,下次打开仍可选择</div>
54
+ </footer>
55
+ <div id="toast" class="toast" role="status" aria-live="polite" hidden></div>
56
+ <dialog id="imageDialog"><div class="dialog-top"><span id="dialogTitle"></span><button id="closeDialog" class="button secondary">关闭 ×</button></div><div class="dialog-image"><img id="dialogImage" alt="放大预览"></div></dialog>
57
+ </body>
58
+ </html>
best_annotator/static/style.css ADDED
@@ -0,0 +1 @@
 
 
1
+ :root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#1f2c3c;background:#f3f5f8;font-size:14px;--accent:#147d72;--border:#dfe5ed;--muted:#758194}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #68b4ac;outline-offset:3px}button{color:inherit}h1,h2,p{margin:0}h1{font-size:19px;letter-spacing:-.4px}h2{font-size:24px;letter-spacing:.3px}button{transition:background .15s,border-color .15s}button:hover:not(:disabled){filter:brightness(.97)}[hidden]{display:none!important}.topbar{display:flex;align-items:center;gap:30px;justify-content:space-between;padding:22px 30px;background:white;border-bottom:1px solid var(--border)}.brand{display:flex;gap:12px;align-items:center}.brand-icon{display:grid;place-items:center;background:#183b39;color:#d5f5ed;border-radius:12px;width:42px;height:42px;font-size:25px;font-weight:750}.brand p{font-size:12px;color:var(--muted);margin-top:5px}.progress{width:235px;margin-left:auto}.progress>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:9px;color:var(--muted)}.progress strong{color:var(--accent);font-weight:650}.progress-track{height:5px;background:#e9eeef;border-radius:10px;overflow:hidden}.progress-track i{height:100%;width:0;display:block;background:var(--accent);transition:width .25s}.button{border:1px solid var(--border);border-radius:8px;background:white;padding:10px 15px;font-weight:550;white-space:nowrap}.button.primary{background:var(--accent);border-color:var(--accent);color:white}.button.tiny{padding:6px 11px;font-size:12px}.button.tiny[aria-pressed=true]{color:var(--accent);background:#e4f2ee;border-color:#94c8be}.filters{display:flex;align-items:center;gap:12px;padding:15px 30px;border-bottom:1px solid var(--border);background:#fff}.segments{display:flex;gap:3px;background:#f0f3f6;padding:4px;border-radius:9px;margin-right:auto}.segments button{border:0;background:transparent;border-radius:6px;padding:7px 12px;color:#677284;font-size:13px}.segments button.active{color:#175d55;background:white;box-shadow:0 1px 4px #20304016}.segments b{margin-left:6px;font-size:11px;font-weight:600;opacity:.8}select,input[type=search]{border:1px solid var(--border);border-radius:8px;background:white;padding:9px 11px;color:#48566a;min-width:0}input[type=search]{width:210px}#folder{max-width:255px}main{padding:24px 30px 115px;max-width:1900px;margin:auto}.item-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.eyebrow{font-size:11px;color:var(--accent);font-weight:650;letter-spacing:.4px;display:block;margin-bottom:7px}.item-heading p{color:var(--muted);font-size:12px;margin-top:7px}.jump{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted)}#jump{max-width:285px}.workspace{display:grid;grid-template-columns:minmax(270px,29%) minmax(0,1fr);gap:24px;align-items:start}.panel{border:1px solid var(--border);border-radius:12px;background:white;overflow:hidden}.panel-title{padding:13px 14px;border-bottom:1px solid var(--border)}.source-tabs{display:flex;gap:4px}.source-tabs button{font-size:12px;border:0;border-radius:6px;background:transparent;color:var(--muted);padding:7px 8px}.source-tabs button.active{background:#eaf4f0;color:#176b5d;font-weight:600}.source-image-button{display:block;width:100%;height:min(33vw,455px);min-height:300px;border:0;padding:16px;background:#fafbfc;cursor:zoom-in}.source-image-button img{height:100%;width:100%;object-fit:contain}.source-caption{display:flex;justify-content:space-between;padding:12px 16px;font-size:11px;color:var(--muted)}#sourceFlag{color:#9a7031}.save-note{padding:15px 16px;border-top:1px solid #edf0f4;color:#8891a1;font-size:11px;line-height:1.8}.save-note code{font-family:monospace;color:#657388}.saved-box{margin:5px 15px 15px;padding:12px;background:#edf7f2;border:1px solid #c6e2d7;border-radius:8px;display:flex;flex-direction:column;gap:7px;font-size:11px;color:#45746a}.saved-box strong{font-size:12px;word-break:break-all;color:#1d6758}.text-button{align-self:start;border:0;background:transparent;padding:0;font-size:11px;text-decoration:underline;color:#6e817b}.comparison-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 13px;min-height:36px;flex-wrap:wrap}.camera-buttons{display:flex;align-items:center;gap:3px}.camera-buttons span{font-size:11px;color:var(--muted);margin-right:7px}.camera-buttons button{font-size:12px;border:1px solid transparent;background:transparent;border-radius:6px;padding:6px 9px;color:#687689}.camera-buttons button.active{background:white;border-color:var(--border);color:#263e49}.view-options{display:flex;align-items:center;gap:12px}.view-options label{display:flex;gap:4px;align-items:center;font-size:11px;color:#687689}input[type=checkbox]{accent-color:var(--accent)}.result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.result-card{background:white;border:1px solid var(--border);border-radius:12px;overflow:hidden;min-width:0;display:flex;flex-direction:column}.result-card.selected{border:2px solid var(--accent);box-shadow:0 0 0 3px #147d7210}.result-header{display:flex;align-items:center;justify-content:space-between;padding:14px 12px 10px}.version-name{font-size:15px;font-weight:680}.version-number{display:inline-grid;place-items:center;border:1px solid #e1e5eb;border-radius:5px;width:21px;height:21px;font-size:11px;color:#929baa}.chosen-badge{font-size:10px;background:#e3f4ec;color:var(--accent);padding:3px 6px;border-radius:4px}.skin-stage{height:300px;background:radial-gradient(ellipse at 50% 45%,#fff,#edf1f5);position:relative;overflow:hidden}.skin-stage canvas{display:block;width:100%;height:100%;touch-action:none}.preview-status{position:absolute;inset:0;display:grid;place-items:center;padding:20px;color:#85909e;font-size:11px;text-align:center;pointer-events:none}.uv-area{padding:13px 10px;display:flex;align-items:center;justify-content:center;gap:12px;border-top:1px solid #edf0f4}.uv-button{padding:0;border:1px solid #e3e7ed;border-radius:4px;display:block;width:88px;height:88px;background-color:#f8f8f8;background-image:linear-gradient(45deg,#e1e4e8 25%,transparent 25%),linear-gradient(-45deg,#e1e4e8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e1e4e8 75%),linear-gradient(-45deg,transparent 75%,#e1e4e8 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;cursor:zoom-in;overflow:hidden}.uv-button img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.uv-caption{display:flex;flex-direction:column;gap:5px;font-size:10px;color:#96a0ad}.uv-caption strong{font-size:11px;color:#738095;font-weight:500}.result-actions{padding:0 12px 13px;margin-top:auto}.result-file{font-size:9px;color:#909aab;margin-bottom:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,monospace}.choose-button{width:100%;border-radius:7px;border:1px solid #bdd7cf;color:var(--accent);background:#edf6f2;padding:10px 4px;font-size:12px;font-weight:600}.selected .choose-button{color:white;background:var(--accent);border-color:var(--accent)}.preview-hint{font-size:11px;color:#8a95a6;text-align:center;margin-top:15px;line-height:1.8}.uv-only .skin-stage{display:none}.uv-only .uv-area{min-height:280px;padding:20px 12px;flex-direction:column;border-top:0}.uv-only .uv-button{width:100%;height:auto;aspect-ratio:1;max-width:300px}.uv-only .uv-caption{flex-direction:row}.no-result-card{padding:65px 30px;color:var(--muted);text-align:center;background:white;border:1px dashed #ccd5df;border-radius:12px;grid-column:1/-1}.no-result-card p{font-size:12px;margin-top:10px}.empty{text-align:center;padding:70px 20px;margin-top:30px}.empty-icon{display:grid;place-items:center;width:52px;height:52px;background:#eaf3ed;color:var(--accent);font-size:25px;border-radius:50%;margin:0 auto 18px}.empty h2{font-size:22px}.empty p{color:var(--muted);margin:12px 0 24px;line-height:1.8}.footer{position:fixed;bottom:0;left:0;right:0;background:#ffffffed;backdrop-filter:blur(12px);border-top:1px solid var(--border);padding:15px 30px;display:flex;align-items:center;justify-content:space-between;gap:20px;z-index:5}.navigation{display:flex;gap:10px}.keyboard-hint,.session-note{font-size:11px;color:#8190a0}kbd{font-family:inherit;font-size:10px;border:1px solid #d8dee6;background:#f8fafc;padding:2px 5px;border-radius:4px}.toast{position:fixed;bottom:89px;left:50%;transform:translateX(-50%);max-width:85vw;padding:13px 22px;background:#1f433c;color:white;border-radius:9px;box-shadow:0 5px 22px #0002;z-index:10;font-size:13px}.toast.error{background:#9d3e3e}dialog{border:1px solid var(--border);border-radius:13px;padding:0;max-width:92vw;width:1000px;max-height:92vh;box-shadow:0 20px 100px #0004}dialog::backdrop{background:#14232bb3;backdrop-filter:blur(3px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;border-bottom:1px solid var(--border);gap:20px;font-size:13px}.dialog-image{display:grid;place-items:center;padding:20px;overflow:auto;max-height:80vh;background:#eef0f2}.dialog-image img{display:block;max-width:100%;max-height:73vh;object-fit:contain}.dialog-image img.pixelated{image-rendering:pixelated;width:700px;height:700px}.busy{cursor:progress}@media(min-width:1700px){.skin-stage{height:370px}}@media(max-width:1100px){.workspace{grid-template-columns:280px minmax(0,1fr)}.result-grid{grid-template-columns:repeat(2,minmax(170px,1fr))}.skin-stage{height:255px}.keyboard-hint{display:none}.filters{flex-wrap:wrap}.segments{margin-right:0}main{padding-left:20px;padding-right:20px}.topbar,.filters{padding-left:20px;padding-right:20px}}@media(max-width:700px){.topbar{gap:10px;padding:15px}.brand p,.progress{display:none}.filters{padding:10px 15px}.segments{width:100%;justify-content:space-between}.segments button{padding:6px 8px}#folder,input[type=search]{width:calc(50% - 6px);max-width:none}main{padding:18px 15px 125px}.workspace{display:block}.source-panel{margin-bottom:20px}.source-image-button{height:280px;min-height:0}.item-heading{align-items:start;flex-direction:column;gap:12px}h2{font-size:19px}.jump{width:100%}#jump{max-width:none;flex:1}.result-grid{gap:9px;grid-template-columns:repeat(2,minmax(0,1fr))}.skin-stage{height:255px}.result-header{padding:12px 9px}.uv-area{gap:5px}.uv-button{width:74px;height:74px}.uv-caption{display:none}.footer{padding:12px 15px;flex-wrap:wrap;gap:9px}.navigation{width:100%}.navigation .button{flex:1}.session-note{font-size:10px}.comparison-toolbar{gap:10px}.view-options{margin-left:auto}.source-tabs button{font-size:12px}}
best_annotator/static/vendor/skinview3d-3.4.2.bundle.js ADDED
The diff for this file is too large to render. See raw diff
 
best_annotator/static/vendor/skinview3d-LICENSE ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2014-2018 Kent Rasmussen
4
+ Copyright (c) 2017-2022 Haowei Wen, Sean Boult and contributors
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
best_annotator/test_app.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ from pathlib import Path
3
+ import tempfile
4
+ import threading
5
+ import unittest
6
+ from urllib.error import HTTPError
7
+ from urllib.request import Request, urlopen
8
+
9
+ from app import Dataset, ReviewError, make_server
10
+
11
+
12
+ class AnnotationTest(unittest.TestCase):
13
+ def setUp(self):
14
+ self.temp = tempfile.TemporaryDirectory()
15
+ self.root = Path(self.temp.name)
16
+ for folder in ['v54', 'v61']:
17
+ parent = self.root / folder
18
+ parent.mkdir()
19
+ for name in ['ABC_source.png', 'ABC_result.png', 'ABC_result_v104.png', 'ABC_result_v9.png']:
20
+ (parent / name).write_bytes(b'fixture image')
21
+ (self.root / 'v54/NORESULT_source_err.jpg').write_bytes(b'fixture')
22
+ (self.root / 'v54/ORPHAN_result_v104.png').write_bytes(b'fixture')
23
+ self.data = Dataset(self.root)
24
+ self.record = next(r for r in self.data.records.values() if r['folder'] == 'v54' and r['id'] == 'ABC')
25
+
26
+ def tearDown(self):
27
+ self.temp.cleanup()
28
+
29
+ def test_source_grouping_versions_and_missing_results(self):
30
+ state = self.data.state()
31
+ self.assertEqual(state['stats'], {'total': 3, 'done': 0, 'pending': 2, 'no_results': 1})
32
+ self.assertEqual([x['version'] for x in self.record['results']], ['original', 'v9', 'v104'])
33
+ self.assertEqual(len({x['key'] for x in state['items']}), 3)
34
+
35
+ def test_selection_survives_restart_and_stays_in_own_directory(self):
36
+ self.data.choose(self.record['key'], 'ABC_result_v104.png', 'missing')
37
+ self.assertEqual((self.root / 'v54/ABC_best.txt').read_text(), 'ABC_result_v104.png\n')
38
+ self.assertFalse((self.root / 'v61/ABC_best.txt').exists())
39
+ self.assertEqual(Dataset(self.root).state()['stats']['done'], 1)
40
+
41
+ def test_missing_source_or_result_is_not_saved(self):
42
+ (self.root / 'v54/ABC_result_v104.png').unlink()
43
+ with self.assertRaises(ReviewError):
44
+ self.data.choose(self.record['key'], 'ABC_result_v104.png', 'missing')
45
+ (self.root / 'v54/ABC_source.png').unlink()
46
+ with self.assertRaises(ReviewError):
47
+ self.data.choose(self.record['key'], 'ABC_result.png', 'missing')
48
+ self.assertFalse((self.root / 'v54/ABC_best.txt').exists())
49
+
50
+ def test_stale_revision_cannot_overwrite_another_selection(self):
51
+ item = self.data.choose(self.record['key'], 'ABC_result.png', 'missing')
52
+ with self.assertRaises(ReviewError) as error:
53
+ self.data.choose(self.record['key'], 'ABC_result_v104.png', 'missing')
54
+ self.assertEqual(error.exception.status, 409)
55
+ self.assertEqual((self.root / 'v54/ABC_best.txt').read_text(), 'ABC_result.png\n')
56
+ self.data.choose(self.record['key'], None, item['revision'], clear=True)
57
+ self.assertFalse((self.root / 'v54/ABC_best.txt').exists())
58
+
59
+ def test_invalid_old_label_is_pending_and_can_be_replaced(self):
60
+ (self.root / 'v54/ABC_best.txt').write_text('ABC_result_deleted.png\n')
61
+ item = self.data.describe(self.record)
62
+ self.assertTrue(item['invalid_best'])
63
+ self.assertIsNone(item['best'])
64
+ self.data.choose(self.record['key'], 'ABC_result_v104.png', item['revision'])
65
+ self.assertEqual(self.data.state()['stats']['done'], 1)
66
+
67
+ def test_foreign_files_and_symlink_labels_are_rejected(self):
68
+ for value in ['../outside.png', '.git/config', '/etc/passwd', 'v54/ABC_best.txt']:
69
+ with self.assertRaises(ReviewError):
70
+ self.data.resolve_media(value)
71
+ target = self.root / 'sentinel.txt'
72
+ target.write_text('keep')
73
+ (self.root / 'v54/ABC_best.txt').symlink_to(target)
74
+ with self.assertRaises(ReviewError):
75
+ self.data.choose(self.record['key'], 'ABC_result.png', 'missing')
76
+ self.assertEqual(target.read_text(), 'keep')
77
+
78
+ def test_http_save_and_cross_site_write_rejection(self):
79
+ server = make_server(self.data, '127.0.0.1', 0)
80
+ thread = threading.Thread(target=server.serve_forever, daemon=True)
81
+ thread.start()
82
+ base = f'http://127.0.0.1:{server.server_port}'
83
+ payload = json.dumps({'key': self.record['key'], 'result': 'ABC_result_v104.png', 'revision': 'missing'}).encode()
84
+ try:
85
+ with urlopen(base + '/api/state') as response:
86
+ self.assertEqual(json.load(response)['stats']['pending'], 2)
87
+ headers = {'Content-Type': 'application/json', 'X-Annotation-Client': 'ddj-review', 'Origin': 'https://unrelated.invalid'}
88
+ with self.assertRaises(HTTPError) as error:
89
+ urlopen(Request(base + '/api/choose', data=payload, headers=headers))
90
+ self.assertEqual(error.exception.code, 403)
91
+ self.assertFalse((self.root / 'v54/ABC_best.txt').exists())
92
+ headers['Origin'] = base
93
+ with urlopen(Request(base + '/api/choose', data=payload, headers=headers)) as response:
94
+ self.assertEqual(json.load(response)['item']['best'], 'ABC_result_v104.png')
95
+ finally:
96
+ server.shutdown()
97
+ server.server_close()
98
+ thread.join()
99
+
100
+
101
+ if __name__ == '__main__':
102
+ unittest.main()
best_annotator/ui_test_server.log ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"url": "http://192.168.0.111:8766", "root": "/tmp/ddj_annotator_ui_test_20260908", "stats": {"total": 3, "done": 0, "pending": 3, "no_results": 0}}
2
+ 192.168.0.20 - - [08/Sep/2026 14:10:54] "GET / HTTP/1.1" 200 -
3
+ 192.168.0.20 - - [08/Sep/2026 14:10:54] "GET /style.css HTTP/1.1" 200 -
4
+ 192.168.0.20 - - [08/Sep/2026 14:10:54] "GET /vendor/skinview3d-3.4.2.bundle.js HTTP/1.1" 200 -
5
+ 192.168.0.20 - - [08/Sep/2026 14:10:54] "GET /app.js HTTP/1.1" 200 -
6
+ 192.168.0.20 - - [08/Sep/2026 14:10:54] "GET /api/state HTTP/1.1" 200 -
7
+ 192.168.0.20 - - [08/Sep/2026 14:10:55] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_source.png&v=1785854202476209224-49884 HTTP/1.1" 200 -
8
+ 192.168.0.20 - - [08/Sep/2026 14:10:55] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result.png&v=1785854216811377153-3741 HTTP/1.1" 200 -
9
+ 192.168.0.20 - - [08/Sep/2026 14:10:55] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result_v101.png&v=1788692805181181025-3781 HTTP/1.1" 200 -
10
+ 192.168.0.20 - - [08/Sep/2026 14:10:55] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result_v103.png&v=1788754100822974529-3916 HTTP/1.1" 200 -
11
+ 192.168.0.20 - - [08/Sep/2026 14:10:55] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result_v104.png&v=1788784291365004698-3928 HTTP/1.1" 200 -
12
+ 192.168.0.20 - - [08/Sep/2026 14:10:55] "GET /favicon.ico HTTP/1.1" 404 -
13
+ 192.168.0.20 - - [08/Sep/2026 14:17:46] "GET /api/state HTTP/1.1" 200 -
14
+ 192.168.0.20 - - [08/Sep/2026 14:20:00] "GET /api/state HTTP/1.1" 200 -
15
+ 192.168.0.111 - - [08/Sep/2026 14:21:17] "GET /api/state HTTP/1.1" 200 -
16
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET / HTTP/1.1" 200 -
17
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /style.css HTTP/1.1" 200 -
18
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /vendor/skinview3d-3.4.2.bundle.js HTTP/1.1" 200 -
19
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /app.js HTTP/1.1" 200 -
20
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /api/state HTTP/1.1" 200 -
21
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_source.png&v=1785854202476209224-49884 HTTP/1.1" 200 -
22
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result.png&v=1785854216811377153-3741 HTTP/1.1" 200 -
23
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result_v101.png&v=1788692805181181025-3781 HTTP/1.1" 200 -
24
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result_v103.png&v=1788754100822974529-3916 HTTP/1.1" 200 -
25
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_result_v104.png&v=1788784291365004698-3928 HTTP/1.1" 200 -
26
+ 192.168.0.111 - - [08/Sep/2026 14:21:18] "GET /favicon.ico HTTP/1.1" 404 -
27
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "GET /media?path=fixture_1%2F1AGTRPP39F8BKQ6E_edited.png&v=1785853906616475203-807286 HTTP/1.1" 200 -
28
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "POST /api/choose HTTP/1.1" 200 -
29
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "GET /media?path=fixture_2%2F1DQW79RUHEPKSQ4N_source.png&v=1785914666946821644-73812 HTTP/1.1" 200 -
30
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "GET /media?path=fixture_2%2F1DQW79RUHEPKSQ4N_result.png&v=1785914680204908405-4149 HTTP/1.1" 200 -
31
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "GET /media?path=fixture_2%2F1DQW79RUHEPKSQ4N_result_v101.png&v=1788692805187181088-4270 HTTP/1.1" 200 -
32
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "GET /media?path=fixture_2%2F1DQW79RUHEPKSQ4N_result_v104.png&v=1788784309394229618-4368 HTTP/1.1" 200 -
33
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "GET /media?path=fixture_2%2F1DQW79RUHEPKSQ4N_result_v103.png&v=1788754106841025140-4486 HTTP/1.1" 200 -
34
+ 192.168.0.111 - - [08/Sep/2026 14:21:21] "GET /api/state HTTP/1.1" 200 -
35
+ 192.168.0.111 - - [08/Sep/2026 14:21:22] "GET /media?path=fixture_3%2F1FPZQAAA9D729PYQ_source.png&v=1785854182160969536-75778 HTTP/1.1" 200 -
36
+ 192.168.0.111 - - [08/Sep/2026 14:21:22] "GET /media?path=fixture_3%2F1FPZQAAA9D729PYQ_result_v101.png&v=1788692805193181151-3192 HTTP/1.1" 200 -
37
+ 192.168.0.111 - - [08/Sep/2026 14:21:22] "GET /media?path=fixture_3%2F1FPZQAAA9D729PYQ_result.png&v=1785854220767423325-3078 HTTP/1.1" 200 -
38
+ 192.168.0.111 - - [08/Sep/2026 14:21:22] "GET /media?path=fixture_3%2F1FPZQAAA9D729PYQ_result_v104.png&v=1788784321421377871-3442 HTTP/1.1" 200 -
39
+ 192.168.0.111 - - [08/Sep/2026 14:21:22] "GET /media?path=fixture_3%2F1FPZQAAA9D729PYQ_result_v103.png&v=1788754118870125464-3496 HTTP/1.1" 200 -
40
+ 192.168.0.111 - - [08/Sep/2026 14:21:22] "GET /api/state HTTP/1.1" 200 -
41
+ 192.168.0.111 - - [08/Sep/2026 14:21:23] "GET / HTTP/1.1" 200 -
42
+ 192.168.0.111 - - [08/Sep/2026 14:21:23] "GET /vendor/skinview3d-3.4.2.bundle.js HTTP/1.1" 200 -
43
+ 192.168.0.111 - - [08/Sep/2026 14:21:23] "GET /style.css HTTP/1.1" 200 -
44
+ 192.168.0.111 - - [08/Sep/2026 14:21:23] "GET /app.js HTTP/1.1" 200 -
45
+ 192.168.0.111 - - [08/Sep/2026 14:21:23] "GET /api/state HTTP/1.1" 200 -
46
+ 192.168.0.111 - - [08/Sep/2026 14:21:25] "POST /api/choose HTTP/1.1" 200 -
47
+ 192.168.0.111 - - [08/Sep/2026 14:21:26] "GET /api/state HTTP/1.1" 200 -
48
+ 192.168.0.111 - - [08/Sep/2026 14:21:27] "POST /api/choose HTTP/1.1" 200 -
49
+ 192.168.0.111 - - [08/Sep/2026 14:21:30] "POST /api/clear HTTP/1.1" 200 -
50
+ 192.168.0.111 - - [08/Sep/2026 14:21:30] "GET /api/state HTTP/1.1" 200 -
51
+ 192.168.0.111 - - [08/Sep/2026 14:21:30] "GET / HTTP/1.1" 200 -
52
+ 192.168.0.111 - - [08/Sep/2026 14:21:30] "GET /style.css HTTP/1.1" 200 -
53
+ 192.168.0.111 - - [08/Sep/2026 14:21:30] "GET /app.js HTTP/1.1" 200 -
54
+ 192.168.0.111 - - [08/Sep/2026 14:21:30] "GET /vendor/skinview3d-3.4.2.bundle.js HTTP/1.1" 200 -
55
+ 192.168.0.111 - - [08/Sep/2026 14:21:30] "GET /api/state HTTP/1.1" 200 -
56
+ 192.168.0.111 - - [08/Sep/2026 14:21:37] "GET /api/state HTTP/1.1" 200 -
entropydrop_website_generations/SKING_DDJ_v54/13PTZMFQWXN3JRL1_result_v101.png ADDED

Git LFS Details

  • SHA256: e711d698712990a4f3a51ddbc0814fe8195cae3b80c61bb54e795bac41d3ba9a
  • Pointer size: 129 Bytes
  • Size of remote file: 4.54 kB
entropydrop_website_generations/SKING_DDJ_v54/13PTZMFQWXN3JRL1_result_v103.png ADDED

Git LFS Details

  • SHA256: 2c869709b5db8e9eae015e8efa761d9e827551f403abab488b3182f789350c2b
  • Pointer size: 129 Bytes
  • Size of remote file: 4.69 kB
entropydrop_website_generations/SKING_DDJ_v54/13PTZMFQWXN3JRL1_result_v104.png ADDED

Git LFS Details

  • SHA256: 41f6267f837c24bf970d20cfdd8b6b3d11d229fbb7242fd24e42e52430847885
  • Pointer size: 129 Bytes
  • Size of remote file: 4.61 kB
entropydrop_website_generations/SKING_DDJ_v54/14CN7VTM7MBVWXV6_result_v101.png ADDED

Git LFS Details

  • SHA256: 472062a3f09e656f76242774c7df5bec18b4d3d1a96ad5551d78946f43341b37
  • Pointer size: 129 Bytes
  • Size of remote file: 3.11 kB
entropydrop_website_generations/SKING_DDJ_v54/14CN7VTM7MBVWXV6_result_v103.png ADDED

Git LFS Details

  • SHA256: a72a0bc0c851666775072dda526c03cebb068c9e4ff66091566dbf7d053dc59c
  • Pointer size: 129 Bytes
  • Size of remote file: 3.26 kB
entropydrop_website_generations/SKING_DDJ_v54/14CN7VTM7MBVWXV6_result_v104.png ADDED

Git LFS Details

  • SHA256: 0f62cb1be1edb604176ffee125fc9d33c96b26948225f1c96b3ddd53c39d7c91
  • Pointer size: 129 Bytes
  • Size of remote file: 3.36 kB
entropydrop_website_generations/SKING_DDJ_v54/15QL2MDQB2AJYZ2B_result_v101.png ADDED

Git LFS Details

  • SHA256: 53684e8b1647d613ee8e6848ea1dcd5087048c9c339a295ea213fae53d8d804a
  • Pointer size: 129 Bytes
  • Size of remote file: 5.24 kB
entropydrop_website_generations/SKING_DDJ_v54/15QL2MDQB2AJYZ2B_result_v103.png ADDED

Git LFS Details

  • SHA256: f4f483b5772b25f776038a18de8e292d8fe434c26e3ba496d58d80d38f58d28f
  • Pointer size: 129 Bytes
  • Size of remote file: 5.31 kB
entropydrop_website_generations/SKING_DDJ_v54/15QL2MDQB2AJYZ2B_result_v104.png ADDED

Git LFS Details

  • SHA256: d6f27730ac42046af5319dfedba987b25963f2103ddcb8523a047b06337dcc4e
  • Pointer size: 129 Bytes
  • Size of remote file: 5.33 kB
entropydrop_website_generations/SKING_DDJ_v54/16LHC1EB4FQV7H2G_result_v101.png ADDED

Git LFS Details

  • SHA256: d06dd0b7e5d16e7498a4d1c6ddd8209e3372f47c9bc6b55c1d66f1ddbb5c17e9
  • Pointer size: 129 Bytes
  • Size of remote file: 5.07 kB
entropydrop_website_generations/SKING_DDJ_v54/16LHC1EB4FQV7H2G_result_v103.png ADDED

Git LFS Details

  • SHA256: 4c7eaec77b8d681a00f8804cdc6976b44766cf735929b575992bd4d1dca9797a
  • Pointer size: 129 Bytes
  • Size of remote file: 5.29 kB
entropydrop_website_generations/SKING_DDJ_v54/16LHC1EB4FQV7H2G_result_v104.png ADDED

Git LFS Details

  • SHA256: b9ee4546a9547773b698bd1f5357fc96519ba5e3b6c9c947adb17f75439e1ff3
  • Pointer size: 129 Bytes
  • Size of remote file: 5.2 kB
entropydrop_website_generations/SKING_DDJ_v54/17L5FNFLSN9BBDGZ_result_v101.png ADDED

Git LFS Details

  • SHA256: 5f21a79a306e51519ca49e67298df5262e3ce70de6f4f0912793a1001ee77e5c
  • Pointer size: 129 Bytes
  • Size of remote file: 4.53 kB
entropydrop_website_generations/SKING_DDJ_v54/17L5FNFLSN9BBDGZ_result_v103.png ADDED

Git LFS Details

  • SHA256: d56d6a90c777284bd3a563897fec9124cdc6d5a9c75f4608ac76b6ce842fa831
  • Pointer size: 129 Bytes
  • Size of remote file: 4.8 kB
entropydrop_website_generations/SKING_DDJ_v54/17L5FNFLSN9BBDGZ_result_v104.png ADDED

Git LFS Details

  • SHA256: 91b7102904b2131ee1525911cdc0fb8f1d328e1edf3c1296283b35999f17fa58
  • Pointer size: 129 Bytes
  • Size of remote file: 4.73 kB
entropydrop_website_generations/SKING_DDJ_v54/17T2H34KK3Z62XF9_result_v101.png ADDED

Git LFS Details

  • SHA256: 087a174b5ef7817a1c00aa8b83ae5a665d7b821f88d87d20da337cc39f107b87
  • Pointer size: 129 Bytes
  • Size of remote file: 4.14 kB
entropydrop_website_generations/SKING_DDJ_v54/17T2H34KK3Z62XF9_result_v103.png ADDED

Git LFS Details

  • SHA256: a05a2cf27688119fa8c5c98d4321e3f116f0f2d8b8b1fecf2c355534bb8d8352
  • Pointer size: 129 Bytes
  • Size of remote file: 4.15 kB
entropydrop_website_generations/SKING_DDJ_v54/17T2H34KK3Z62XF9_result_v104.png ADDED

Git LFS Details

  • SHA256: b92f53dd0b9df97f2f88b6040e2e555b219cbb076accd184cda6e57c3cf102c9
  • Pointer size: 129 Bytes
  • Size of remote file: 4.15 kB
entropydrop_website_generations/SKING_DDJ_v54/17U8ZVRWNETUFZAX_result_v101.png ADDED

Git LFS Details

  • SHA256: 2a16eeab6d17495852481aebb08c8c55275a53813270878785aec1b7819b6b42
  • Pointer size: 129 Bytes
  • Size of remote file: 4.94 kB
entropydrop_website_generations/SKING_DDJ_v54/17U8ZVRWNETUFZAX_result_v103.png ADDED

Git LFS Details

  • SHA256: 82f4dcca8b35b47799dc496000a3f2956d5c571f9020e310d452803a69c090ba
  • Pointer size: 129 Bytes
  • Size of remote file: 5.59 kB
entropydrop_website_generations/SKING_DDJ_v54/17U8ZVRWNETUFZAX_result_v104.png ADDED

Git LFS Details

  • SHA256: 2667521f357ee6a00367c7feba8c6f820435b90fa1e62dc9409440400a8f3b6f
  • Pointer size: 129 Bytes
  • Size of remote file: 5.55 kB
entropydrop_website_generations/SKING_DDJ_v54/1897D1MKQ63RK458_result_v101.png ADDED

Git LFS Details

  • SHA256: 1ec70cf7bf788f03d198467b042f8899599fd48f87f0830e70aa9ae26792cf7e
  • Pointer size: 129 Bytes
  • Size of remote file: 4.75 kB
entropydrop_website_generations/SKING_DDJ_v54/1897D1MKQ63RK458_result_v103.png ADDED

Git LFS Details

  • SHA256: cfa3551ec2092be8cb07edcafa81779033739b1e0c2ec7dee0539317d435dbf7
  • Pointer size: 129 Bytes
  • Size of remote file: 4.79 kB
entropydrop_website_generations/SKING_DDJ_v54/1897D1MKQ63RK458_result_v104.png ADDED

Git LFS Details

  • SHA256: 4707bc83ab366d6aef58b5daaa7e3bea52af557b2539241ca7e7ce5fea84f775
  • Pointer size: 129 Bytes
  • Size of remote file: 4.84 kB
entropydrop_website_generations/SKING_DDJ_v54/18KJ4AZNABLACZJJ_result_v101.png ADDED

Git LFS Details

  • SHA256: a53b94f0d2f7bae94da9aee5272cd6f3ebdaa98f030356efb4f67901f404df75
  • Pointer size: 129 Bytes
  • Size of remote file: 3.97 kB
entropydrop_website_generations/SKING_DDJ_v54/18KJ4AZNABLACZJJ_result_v103.png ADDED

Git LFS Details

  • SHA256: 07541017a87b49098ba21c09ee783fe0ebfe6cb3b2cf990cf88e980e52642282
  • Pointer size: 129 Bytes
  • Size of remote file: 4.24 kB
entropydrop_website_generations/SKING_DDJ_v54/18KJ4AZNABLACZJJ_result_v104.png ADDED

Git LFS Details

  • SHA256: 07afa44bf5146872392f87cf341e34b4ed1b2325f4d29e3c676953ef0d685ae9
  • Pointer size: 129 Bytes
  • Size of remote file: 4.13 kB
entropydrop_website_generations/SKING_DDJ_v54/19CLC1CJLH6CRG7H_result_v101.png ADDED

Git LFS Details

  • SHA256: c0241915357cc359bdc93fe7f30624ef649a21ba0c28aafdda54e83f7373241a
  • Pointer size: 129 Bytes
  • Size of remote file: 4.71 kB
entropydrop_website_generations/SKING_DDJ_v54/19CLC1CJLH6CRG7H_result_v103.png ADDED

Git LFS Details

  • SHA256: 9c79b98ba36b1975190d42273db416d83a612cb76e539d614fe64705e5257893
  • Pointer size: 129 Bytes
  • Size of remote file: 4.68 kB
entropydrop_website_generations/SKING_DDJ_v54/19CLC1CJLH6CRG7H_result_v104.png ADDED

Git LFS Details

  • SHA256: d2df038af23b36c4217d7680867ded226c512c82a90422fc624c8fbb227e27ec
  • Pointer size: 129 Bytes
  • Size of remote file: 4.8 kB
entropydrop_website_generations/SKING_DDJ_v54/19GUSYTDK497T7UV_result_v101.png ADDED

Git LFS Details

  • SHA256: 9bcc4033aed623c723fb3b7f8b299a138cf35295699d82acf33c1e9a47e36324
  • Pointer size: 129 Bytes
  • Size of remote file: 4.22 kB
entropydrop_website_generations/SKING_DDJ_v54/19GUSYTDK497T7UV_result_v103.png ADDED

Git LFS Details

  • SHA256: da0d2a5bdb1bdea61b0307dc69bc43c8a9086e906b6410f097560a70c5c5b5d3
  • Pointer size: 129 Bytes
  • Size of remote file: 4.32 kB
entropydrop_website_generations/SKING_DDJ_v54/19GUSYTDK497T7UV_result_v104.png ADDED

Git LFS Details

  • SHA256: 7151419672bcf7554329cc2a71f937d58a97ea81f4694469840d9a1d0454f9db
  • Pointer size: 129 Bytes
  • Size of remote file: 4.32 kB
entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_best.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 1AGTRPP39F8BKQ6E_result_v104.png
entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_result_v101.png ADDED

Git LFS Details

  • SHA256: 9094878b90b8cdc95b25bee1c4582adc5624db662e4a83e5dcb27f858490bab5
  • Pointer size: 129 Bytes
  • Size of remote file: 3.78 kB
entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_result_v103.png ADDED

Git LFS Details

  • SHA256: 8cd4bdb782c2abf84ef8a3878bc1f98ed6375a48d76832f04a889cf01ae3e238
  • Pointer size: 129 Bytes
  • Size of remote file: 3.92 kB
entropydrop_website_generations/SKING_DDJ_v54/1AGTRPP39F8BKQ6E_result_v104.png ADDED

Git LFS Details

  • SHA256: bea5cd3f5ee6bf322cf71fb950625ee164d927eddf8c80762bd69fffbf7751b1
  • Pointer size: 129 Bytes
  • Size of remote file: 3.93 kB
entropydrop_website_generations/SKING_DDJ_v54/1DQW79RUHEPKSQ4N_result_v101.png ADDED

Git LFS Details

  • SHA256: 0501061602759dce02ef59b8ce659db2fe6fd954716df9b856c01b83f9994b6b
  • Pointer size: 129 Bytes
  • Size of remote file: 4.27 kB
entropydrop_website_generations/SKING_DDJ_v54/1DQW79RUHEPKSQ4N_result_v103.png ADDED

Git LFS Details

  • SHA256: 23ca2bf8edee9c036ff9c2d244a0cfe37b456d2025292b633f338a7ed930a5b9
  • Pointer size: 129 Bytes
  • Size of remote file: 4.49 kB
entropydrop_website_generations/SKING_DDJ_v54/1DQW79RUHEPKSQ4N_result_v104.png ADDED

Git LFS Details

  • SHA256: 6d0f84ebfe5686df248271cdc55c52232369f08de4118b34f328e953afb0562b
  • Pointer size: 129 Bytes
  • Size of remote file: 4.37 kB