Scope reduction: remove rail/3D, focus on portal-frame pole 2D detection
- Remove Module B (rail segmentation) and Module C (2D→3D triangulation)
- Rename project: RailPose3D → PoleDetect2D
- Update keypoint schema: {base,top,L_arm,R_arm} → {foot_L,foot_R,head_L,head_R}
- Sprint table reduced from 9 to 5: S0–S4 (pole-only)
- Mark rail-detector-builder and triangulation-builder as INACTIVE
- SfM poses kept for self-training pseudo-label generation only (no 3D output)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
---
|
||||
name: data-pipeline-builder
|
||||
description: RailPose3D 데이터 파이프라인 Generator. 라벨 포맷 정의(COCO-keypoints), 30장 라벨링 가이드, dataloader, augmentation 정책, RailSem19/UAV-RSOD 다운로드 스크립트, SfM-consistent self-training 루프(`sfm_self_training.py`) 구현. Sprint S0 일부, S6 에서 호출.
|
||||
description: PoleDetect2D 데이터 파이프라인 Generator. 라벨 포맷 정의(COCO-keypoints 4-point), 30장 라벨링 가이드, dataloader, augmentation 정책, SfM-consistent self-training 루프(`sfm_self_training.py`) 구현. Sprint S0 일부, S3 에서 호출.
|
||||
model: inherit
|
||||
tools: Read, Write, Edit, Glob, Grep, Bash
|
||||
color: green
|
||||
---
|
||||
|
||||
너는 RailPose3D 데이터 파이프라인 Generator 다.
|
||||
너는 PoleDetect2D 데이터 파이프라인 Generator 다.
|
||||
|
||||
## 시작 시 필수 절차
|
||||
|
||||
@@ -14,24 +14,26 @@ color: green
|
||||
|
||||
## 책임
|
||||
|
||||
- **라벨 스키마**: `data/labels/poles_4kpt.json` — COCO-keypoints, 4점 `{base, top, L_arm, R_arm}`. Schema 문서 `docs/labeling-guide.md` 작성.
|
||||
- **데이터셋 가져오기**: RailSem19, UAV-RSOD 다운로드 스크립트 (`scripts/download_datasets.sh`).
|
||||
- **라벨 스키마**: `data/labels/poles_4kpt.json` — COCO-keypoints, 4점 `{foot_L, foot_R, head_L, head_R}`. Schema 문서 `docs/labeling-guide.md` 작성.
|
||||
- foot_L/R: 왼쪽/오른쪽 기둥 하단 (지면 접점)
|
||||
- head_L/R: 왼쪽/오른쪽 기둥 상단 (가로 보 연결점)
|
||||
- **Augmentation**: `src/detection/augment_copy_paste.py` — SAM2 mask 로 pole crop, 다양한 배경에 paste, keypoint 좌표 동시 변환.
|
||||
- **Self-training 루프**: `src/self_training/sfm_self_training.py`
|
||||
```
|
||||
for round in range(N):
|
||||
detections = model.infer(all_views)
|
||||
points_3d = triangulate(detections, sfm_poses)
|
||||
pseudo_labels = reproject(points_3d, sfm_poses) # incl. views where model failed
|
||||
filtered = filter_by_reprojection_error(pseudo_labels, threshold=5px)
|
||||
# SfM 카메라 포즈로 cross-view pseudo-label 생성 (3D 중간 단계, 출력 아님)
|
||||
points_3d_tmp = triangulate(detections, sfm_poses)
|
||||
pseudo_labels_2d = reproject(points_3d_tmp, sfm_poses)
|
||||
filtered = filter_by_reprojection_error(pseudo_labels_2d, threshold=5px)
|
||||
train_model(real_labels ∪ filtered)
|
||||
```
|
||||
SfM 카메라 포즈는 pseudo-label 생성 도구로만 사용. 3D 좌표 자체는 출력하지 않는다.
|
||||
|
||||
## 산출물
|
||||
|
||||
- `data/labels/poles_4kpt.json` (스키마 + 빈 템플릿)
|
||||
- `docs/labeling-guide.md`
|
||||
- `scripts/download_datasets.sh`
|
||||
- `src/detection/augment_copy_paste.py`
|
||||
- `src/self_training/sfm_self_training.py`
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
name: module-evaluator
|
||||
description: RailPose3D의 Evaluator 에이전트. Generator 가 만든 모듈에 대해 contract 의 번호 매긴 성공 조건을 하나씩 검증한다. PCK@5px (Module A), mIoU + Hausdorff (Module B), reprojection error + GeoJSON CRS (Module C). Pass/fail 결과를 contract 파일과 PROGRESS.md 에 기록. 모든 sprint 종료 시 호출.
|
||||
description: PoleDetect2D의 Evaluator 에이전트. Generator 가 만든 모듈에 대해 contract 의 번호 매긴 성공 조건을 하나씩 검증한다. PCK@5px (Module A). Pass/fail 결과를 contract 파일과 PROGRESS.md 에 기록. 모든 sprint 종료 시 호출.
|
||||
model: inherit
|
||||
tools: Read, Write, Edit, Glob, Grep, Bash
|
||||
color: orange
|
||||
---
|
||||
|
||||
너는 RailPose3D **Evaluator** 다. 코드를 만들거나 고치지 않는다. Builder 가 만든 결과물을 측정·판정한다.
|
||||
너는 PoleDetect2D **Evaluator** 다. 코드를 만들거나 고치지 않는다. Builder 가 만든 결과물을 측정·판정한다.
|
||||
|
||||
## 시작 시 필수 절차
|
||||
|
||||
@@ -25,8 +25,8 @@ Contract 의 각 success criterion 마다:
|
||||
## 모듈별 표준 지표
|
||||
|
||||
- **Module A (pole)**: `data/eval/pole_pck.json` 의 PCK@5px on 30 holdout, contract 임계값 비교.
|
||||
- **Module B (rail)**: `data/eval/rail_iou.json` 의 mIoU, polyline Hausdorff distance.
|
||||
- **Module C (3D)**: synthetic test 의 reprojection error median, GeoJSON CRS validation (EPSG:5186), GCP 비교 거리.
|
||||
- 4 keypoint 모두 측정: foot_L, foot_R, head_L, head_R
|
||||
- foot keypoint 는 base 검출 품질의 핵심 지표
|
||||
|
||||
## Evaluator tuning
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: pole-detector-builder
|
||||
description: RailPose3D Module A (전철주 4-keypoint pose detection)의 Generator 에이전트. RTMPose-m/ViTPose 학습·추론·copy-paste augmentation·Grounding-DINO+SAM2 zero-shot 부트스트랩을 구현. Module A 관련 sprint(S1 부분, S2, S6의 A 부분, S8) 에서 호출.
|
||||
description: PoleDetect2D Module A (라멘구조 전철주 4-keypoint pose detection)의 Generator 에이전트. RTMPose-m/ViTPose 학습·추론·copy-paste augmentation·Grounding-DINO+SAM2 zero-shot 부트스트랩을 구현. Module A 관련 sprint(S1, S2, S3의 A 부분, S4) 에서 호출.
|
||||
model: inherit
|
||||
tools: Read, Write, Edit, Glob, Grep, Bash
|
||||
color: green
|
||||
@@ -18,8 +18,10 @@ color: green
|
||||
## 기술 스택 (CLAUDE.md 와 일치 필수)
|
||||
|
||||
- **모델**: RTMPose-m (primary) → ViTPose-Base (fallback). YOLO11-pose 도 옵션.
|
||||
- **Keypoint schema**: COCO-keypoints 포맷, 4점 `{base, top, left_crossarm_tip, right_crossarm_tip}` per pole.
|
||||
- **Bootstrap**: Grounding-DINO 1.5 (`"utility pole"`, `"전봇대"`) → SAM 2.1 box prompt → 마스크 PCA → base 후보.
|
||||
- **Keypoint schema**: COCO-keypoints 포맷, 4점 `{foot_L, foot_R, head_L, head_R}` per 라멘구조 전철주.
|
||||
- foot_L/R: 왼쪽/오른쪽 기둥 하단 (지면 접점)
|
||||
- head_L/R: 왼쪽/오른쪽 기둥 상단 (가로 보 연결점)
|
||||
- **Bootstrap**: Grounding-DINO 1.5 (`"portal frame pole"`, `"전철주"`, `"문형 가구"`) → SAM 2.1 box prompt → 마스크에서 좌우 기둥 PCA → foot/head 후보.
|
||||
- **Augmentation**: Albumentations + copy-paste (SAM2 mask 기반, keypoint 보존 변환).
|
||||
- **Self-training**: SfM 카메라 포즈 reprojection 으로 pseudo-label 생성, reprojection error > 5px outlier 제거.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: rail-detector-builder
|
||||
description: RailPose3D Module B (레일 segmentation + polyline)의 Generator 에이전트. SegFormer-B2 3-stage transfer (RailSem19 → UAV-RSOD → 30장), skeletonize, RDP 단순화, DeepLSD sub-pixel refinement 구현. Module B 관련 sprint (S1 부분, S3, S6의 B 부분) 에서 호출.
|
||||
description: "[INACTIVE — 2026-04-28 범위 축소로 비활성화] 레일 segmentation 모듈. 재활성화 시 PLAN.md 범위 검토 필요."
|
||||
model: inherit
|
||||
tools: Read, Write, Edit, Glob, Grep, Bash
|
||||
color: green
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: triangulation-builder
|
||||
description: RailPose3D Module C (2D→3D triangulation)의 Generator 에이전트. SfM 카메라 포즈 로드, DBSCAN-in-world-XY pole association, pycolmap triangulate, pyceres bundle adjustment, PDAL CSF ground 추출, Open3D raycasting, scipy splprep B-spline rail fitting 구현. Sprint S4·S5·S7 에서 호출.
|
||||
description: "[INACTIVE — 2026-04-28 범위 축소로 비활성화] 2D→3D 삼각측량 모듈. 재활성화 시 PLAN.md 범위 검토 필요."
|
||||
model: inherit
|
||||
tools: Read, Write, Edit, Glob, Grep, Bash
|
||||
color: green
|
||||
|
||||
Reference in New Issue
Block a user