feat: Add support for ADAS project in labeling and export processes
- Implemented class name loading for ADAS campaigns in `_class_names_for_campaign`. - Enhanced annotation parsing to support cuboid and 2D rectangle labels in `_parse_ls_annotations`. - Updated catalog building to include ADAS packs and batches in `build_catalog_signature`. - Added ADAS cuboid promotion logic in `adas_cuboid.py`, supporting both quaternion_json and YOLO HBB formats. - Introduced validation for ADAS batches to check for YOLO HBB labels in `adas_cuboid.py`. - Modified delivery scanning to include ADAS project deliveries in `scan.py`. - Extended job execution to handle ADAS exports for YOLO format in `runner.py`. - Updated labeling export logic to accommodate ADAS project in `export_cuboid_batch.py`. - Enhanced format conversion to support rectangle labels in `format_converter.py`. - Improved CVAT task handling in `service.py` to ensure task ID updates on each labeling job. - Updated web API endpoints to reflect ADAS project changes in `hsap-api.ts`. - Added ADAS catalog types and UI components for displaying ADAS packs and batches in `dmsCatalog.ts`, `CatalogPage.tsx`, and `ExportPage.tsx`. - Adjusted workflow registry to align with new ADAS project structure.
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
# ADAS MOON-3D 训练包 `adas_moon3d_v1`
|
||||
# ADAS 前向训练包 `adas_v1`
|
||||
|
||||
> **2026-07 更新**:pack 已从 `adas_moon3d_v1` 重命名为 `adas_v1`(见 `workflow.registry.yaml`)。
|
||||
> 新增 YOLO HBB 导出路径和 2D 矩形标注支持。
|
||||
|
||||
## 目录结构
|
||||
|
||||
```text
|
||||
datasets/adas/packs/adas_moon3d_v1/
|
||||
datasets/adas/packs/adas_v1/
|
||||
├── sources/{batch}/
|
||||
│ ├── images/
|
||||
│ ├── calib/
|
||||
│ └── labels/quaternion_json/
|
||||
│ └── labels/
|
||||
│ ├── quaternion_json/ # 3D cuboid 导出(有 calib 时优先)
|
||||
│ └── yolo-hbb/ # 2D YOLO HBB 导出(无 calib 回退)
|
||||
├── lists/
|
||||
│ ├── train_stems.txt
|
||||
│ └── val_stems.txt
|
||||
@@ -32,20 +37,34 @@ datasets/adas/packs/adas_moon3d_v1/
|
||||
## 管线
|
||||
|
||||
1. **labeling_export** — CVAT ls_annotations → `labels/quaternion_json/*.json`
|
||||
- 支持 **cuboid**(3D 框)和 **rectanglelabels**(2D 矩形)两种标注类型
|
||||
- 2D 矩形自动转为 quaternion_json detection(`fit_ok=false`, `source="2d_rect"`)
|
||||
2. **cuboid_fit_3d**(有 calib 时自动触发)— 补全 3D 字段
|
||||
3. **build_adas**(审核)— `promote_batch` 复制到 pack + 刷新 stem 列表
|
||||
- 优先使用 quaternion_json,无 cuboid 标注时回退到 YOLO HBB
|
||||
|
||||
### 导出路径说明
|
||||
|
||||
| 标注类型 | 导出产物 | 条件 |
|
||||
|---------|---------|------|
|
||||
| cuboid (3D) | `labels/quaternion_json/*.json` | CVAT cuboid 标注 |
|
||||
| rectanglelabels (2D) | `labels/quaternion_json/*.json` | 2D 矩形自动桥接 |
|
||||
| YOLO HBB | `labels/yolo-hbb/*.txt` | 无 cuboid 时使用 `export_adas_yolo` |
|
||||
|
||||
## CLI
|
||||
|
||||
```bash
|
||||
# 导出(平台 Job 或脚本)
|
||||
# cuboid 导出(平台 Job)
|
||||
PYTHONPATH=platform python3 -c "from as_platform.labeling.export_cuboid_batch import export_batch; ..."
|
||||
|
||||
# YOLO HBB 导出(平台 Job,无 cuboid 时自动选择)
|
||||
# 由 jobs/runner.py 调用 datasets/adas/scripts/export_ls_to_yolo.py
|
||||
|
||||
# 3D 拟合
|
||||
PYTHONPATH=platform python3 -c "from as_platform.labeling.fit_cuboid_batch import fit_batch; ..."
|
||||
|
||||
# 入包
|
||||
python as.py build adas cuboid_7cls --batch val_front6mm_pilot --pack adas_moon3d_v1
|
||||
python as.py build adas cuboid_7cls --batch val_front6mm_pilot --pack adas_v1
|
||||
```
|
||||
|
||||
## Smoke
|
||||
@@ -54,7 +73,6 @@ python as.py build adas cuboid_7cls --batch val_front6mm_pilot --pack adas_moon3
|
||||
bash scripts/smoke_adas_promote.sh
|
||||
```
|
||||
|
||||
## 与 dms/packs/adas_v1 的区别
|
||||
## 数据目录
|
||||
|
||||
- `dms/packs/adas_v1`:2D YOLO 历史包([`scripts/organize_adas.py`](../scripts/organize_adas.py))
|
||||
- `datasets/adas/packs/adas_moon3d_v1`:MOON-3D quaternion_json 3D GT
|
||||
ADAS 前向数据在 **数据目录** → **前向** 视图中展示,按 pack → batch 层级显示图片数、标注数和类别分布。
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
- 数据候选:`platform/as_platform/db/models.py` → `DatasetCandidate`
|
||||
- 上传 API:`server.py` → `upload/file`、`inspect-upload`
|
||||
- 审核:`audit/queue.py`、`/api/v1/approvals/*`
|
||||
- 审核:`audit/queue.py`、`/api/v1/system/audit/*`
|
||||
- 入湖 CLI:`as.py build` / `add` + `ingest_incremental.py`
|
||||
|
||||
## 建议下一里程碑(未在本汇总 plan 全量实现)
|
||||
|
||||
@@ -119,7 +119,7 @@ bash scripts/smoke_dms_e2e_2img.sh setup
|
||||
### Commit `0b8ade0` — Unified Ingest SDK
|
||||
|
||||
- `platform/as_platform/data/promote/` — DMS/ADAS promote_batch
|
||||
- ADAS cuboid export / fit / `adas_moon3d_v1`
|
||||
- ADAS cuboid export / fit / `adas_v1`
|
||||
- `platform/as_platform/tests/test_unified_ingest_sdk.py`(7 项单元测试)
|
||||
- `scripts/smoke_adas_promote.sh`
|
||||
- `scripts/smoke_labeling_api.sh` 已接入上述测试
|
||||
|
||||
@@ -350,7 +350,7 @@ python as.py train dms dam --track platform # 平台训练(需审核)
|
||||
| `/api/v1/system` | `system_routes.py` | 审核队列、任务监控、执行日志 |
|
||||
| `/api/v1/delivery` | `delivery_routes.py` | 批次交付、Bitable 集成 |
|
||||
| `/api/v1/feishu` | `feishu_routes.py` | Bitable Webhook 回调 |
|
||||
| `/api/v1/` (根) | `server.py` | health, dashboard, catalog, approvals, simulate, agents |
|
||||
| `/api/v1/` (根) | `server.py` | health, dashboard, catalog, simulate, agents |
|
||||
|
||||
### 6.2 核心端点速查
|
||||
|
||||
@@ -366,10 +366,10 @@ GET /api/v1/catalog
|
||||
POST /api/v1/catalog
|
||||
|
||||
# 审核流程
|
||||
GET /api/v1/approvals
|
||||
POST /api/v1/approvals/{id}/approve
|
||||
POST /api/v1/approvals/{id}/reject
|
||||
GET /api/v1/approvals/{id}/preview
|
||||
GET /api/v1/system/audit
|
||||
POST /api/v1/system/audit/{id}/approve
|
||||
POST /api/v1/system/audit/{id}/reject
|
||||
GET /api/v1/system/audit/{id}/preview
|
||||
|
||||
# 任务队列
|
||||
GET /api/v1/jobs
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
**协调员 QA 门禁路径(推荐):** 标完 → **提交质检** (`in_review`) → 质检通过 (`labeling_submitted`) → **执行导出** → `returned` → **提交 build**(审核)→ `ingested`。
|
||||
|
||||
ADAS cuboid 详见 [ADAS_MOON3D_PACK.md](./ADAS_MOON3D_PACK.md):导出 → 可选 `cuboid_fit_3d` → `build_adas` 进 `adas_moon3d_v1`。
|
||||
ADAS cuboid 详见 [ADAS_MOON3D_PACK.md](./ADAS_MOON3D_PACK.md):导出(支持 cuboid 3D / 2D 矩形 / YOLO HBB 回退)→ 可选 `cuboid_fit_3d` → `build_adas` 进 `adas_v1`。
|
||||
|
||||
**登记 meta**(`更多操作` 内)只写入 `batch.meta.yaml`,**不等于**已送标。
|
||||
|
||||
@@ -191,6 +191,7 @@ datasets/dms/inbox/dam/batch_0516/
|
||||
|------|--------|--------|------|
|
||||
| **训练包**(默认) | `dms_v1` 等 | `dam` / `addw_face` / `前向·粗检测` / `前向·细分类` … | 该包下各任务的 train/val 快照;前向在 registry 为单任务双 mode,目录按 mode 拆开显示 |
|
||||
| **采集批次** | 任务(如 `dam`) | `0516 批次` 等 mode | 单波送标质量 |
|
||||
| **前向** | `adas_v1` 等 pack | 批次列表 | ADAS 3D/2D 标注批次,含图片数、标注数、类别分布;支持 quaternion_json 和 YOLO HBB |
|
||||
| **车道线** | lane pack | — | Lane 列表统计 |
|
||||
|
||||
增量条(合并前)仍在磁盘 `packs/<pack>/<task>/sources/<批次名>/`;合并用 `python HSAP/as.py build dms dam --pack dms_v1 --all-sources`。
|
||||
|
||||
Reference in New Issue
Block a user