# Benchmark100 中文加载与交接指南

这份文件用于把当前 100 个评估 mesh 数据集交给另一个 Codex 或研究同学。重点是：数据在哪里、网页怎么打开、OBJ 为什么可能加载不了、以及最小自检怎么做。

## 直接打开的网页

中文交互浏览器：

```text
http://38.94.129.6:8768/report/benchmark100_case_browser_zh.html
```

中文加载与排障页：

```text
http://38.94.129.6:8768/report/codex_benchmark100_loading_guide_zh.html
```

## 最核心路径

主清单：

```text
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/benchmark_manifest_v0.json
```

渲染好的输入视角和 20 个测试视角：

```text
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/rendered_benchmark_v0
```

各方法生成的 mesh：

```text
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/method_eval
```

完整 2/4/6/8 视角聚合指标：

```text
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/method_eval/benchmark100_full_matrix_aggregate.json
```

## 数据结构

主清单字段是 `objects`，不是 `cases`：

```python
import json
from pathlib import Path

manifest_path = Path("/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/benchmark_manifest_v0.json")
manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
objects = manifest["objects"]
print(len(objects))  # 应该是 100
```

每个对象有：

- `input_2`、`input_4`、`input_6`、`input_8`：非正交输入视角。
- `eval_20`：20 个独立保留测试视角。
- GT mesh：GSO 有些原始路径是 `zip://...!...`，普通 OBJ loader 不能直接读。

## 方法输出 mesh 路径模式

```text
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/method_eval/<method_dir>/<benchmark_id>_input<N>/mesh_raw.obj
```

例子：

```text
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/method_eval/trellis2_protocol4_all100/gso_000_input4/mesh_raw.obj
```

常见方法目录：

- `trellis_protocol2_all100`、`trellis_protocol4_all100`、`trellis_protocol6_all100`、`trellis_protocol8_all100`
- `trellis2_protocol2_all100`、`trellis2_protocol4_all100`、`trellis2_protocol6_all100`、`trellis2_protocol8_all100`
- `reconviagen_protocol2_all100`、`reconviagen_protocol4_all100`、`reconviagen_protocol6_all100`、`reconviagen_protocol8_all100`

## 为什么加载不了

1. 服务根目录不对。
   当前网页里的资源路径假设 HTTP 服务根目录是：

   ```text
   /home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs
   ```

   如果从别的目录启动 `python -m http.server 8768`，网页可能能打开，但 OBJ、图片或 JS 会 404。

2. 直接双击本地 HTML。
   浏览器可能因为本地路径、模块 JS 或跨域限制导致 OBJLoader / Three.js 资源加载失败。请使用 `http://38.94.129.6:8768/...` 打开。

3. GT mesh 是 `zip://...!...`。
   这种路径不是普通文件路径。要么用 `rendered_benchmark_v0/render_summary.json` 里的实际 `mesh_path`，要么用 `_extracted_gso` 下的解压版本。

4. TRELLIS.2 raw mesh 太大。
   TRELLIS.2 生成的 raw OBJ 面片数常常很高，浏览器第一次加载可能慢。可以先加载 TRELLIS 或 ReconViaGen 的 OBJ 验证 viewer 正常，再切 TRELLIS.2。

5. 代码把 `objects` 写成了 `cases`。
   主清单里对象列表字段是 `objects`。方法评测聚合 JSON 里才常见 `cases`。

## 最小自检命令

```bash
test -f /home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/benchmark_manifest_v0.json
test -d /home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/rendered_benchmark_v0/gso_000/input_2
test -d /home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/rendered_benchmark_v0/gso_000/eval_20
test -f /home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/method_eval/trellis2_protocol4_all100/gso_000_input4/mesh_raw.obj
```

确认 manifest 有 100 个对象：

```bash
python3 - <<'PY'
import json
from pathlib import Path
p = Path("/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/benchmark_manifest_v0.json")
data = json.loads(p.read_text(encoding="utf-8"))
print("objects =", len(data["objects"]))
PY
```

确认网页和 OBJ URL 可以外部读取：

```bash
python3 - <<'PY'
import urllib.request
urls = [
    "http://38.94.129.6:8768/report/benchmark100_case_browser_zh.html",
    "http://38.94.129.6:8768/data_survey/method_eval/trellis2_protocol4_all100/gso_000_input4/mesh_raw.obj",
]
for url in urls:
    with urllib.request.urlopen(url, timeout=10) as resp:
        print(resp.status, resp.getheader("content-type"), url)
PY
```

## 可以直接发给另一个 Codex 的提示词

```text
请使用本机已有的 Benchmark100 多视角非正交 mesh 评估集。

中文加载与排障说明：
http://38.94.129.6:8768/report/codex_benchmark100_loading_guide_zh.html

主清单：
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/benchmark_manifest_v0.json

注意主清单对象列表字段是 objects，不是 cases。每个对象有 2/4/6/8 四组非正交输入视角，路径是：
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/rendered_benchmark_v0/<benchmark_id>/input_<N>

每个对象有 20 个测试视角：
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/rendered_benchmark_v0/<benchmark_id>/eval_20

各方法 mesh 输出：
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/method_eval/<method_dir>/<benchmark_id>_input<N>/mesh_raw.obj

完整聚合指标：
/home/jiachen/TRELLIS/experiments/nonorthogonal_gpt_orthoview/outputs/data_survey/method_eval/benchmark100_full_matrix_aggregate.json

如果 OBJ 或网页加载失败，先检查 HTTP 服务是否从 outputs 目录启动，再检查目标 OBJ URL 是否 200。
```
