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 层级显示图片数、标注数和类别分布。
|
||||
|
||||
Reference in New Issue
Block a user