bounding-boxes
하는 일
스킬은 시뮬레이션 장면에서 레이블된 바운딩 박스를 만듭니다. 컴퓨터 비전용 이미지 데이터셋을 만드는 사람을 위한 스킬입니다.
사용하는 경우
- ✓시뮬레이터에서 차량 등 액터의 바운딩 박스가 필요할 때.
- ✓확인하기 위해 시뮬레이션 세계에 박스를 그리고 싶을 때.
- ✓주석이 달린 카메라 이미지와 2D 박스의 JSON 파일이 필요한 경우.
스킬 링크
https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/bounding-boxes/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“앞 카메라에 차량 바운딩 박스를 투영해서, 주석이 달린 PNG와 JSON 파일로 저장해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 각 액터의 3D 박스를 읽고, 확인을 위해 세계에 그릴 수 있으며, 카메라를 거쳐 2D 박스로 투영합니다. 주석이 달린 이미지와 박스가 담긴 JSON 파일을 저장합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Bounding boxes
Paths.
scripts/…andreferences/…below are relative to the directory holding this SKILL.md. Your working directory is the user's project, not that directory, so prefix them with its absolute path or the command is not found.
Three things: read actors' 3D boxes, draw them in the world, or project them
into a camera image as 2D boxes with a JSON sidecar — the standard CARLA
dataset-annotation pipeline (client_bounding_boxes.py).
Instructions
Progress:
- [ ] Step 1: Check prerequisites (bash scripts/check_env.sh), clear FAILs
- [ ] Step 2: For `project`, have a camera on the ego (create-sensor) + actors around
- [ ] Step 3: list / draw / project
Commands need CARLA_HOST/CARLA_PORT from scripts/env.sh.
Step 1: Check prerequisites
bash scripts/check_env.sh
Step 3: Boxes
source scripts/env.sh
# 3D box geometry of every vehicle
python3 scripts/bounding_boxes.py list --filter vehicle.*
# draw 3D boxes around vehicles — they track moving cars, stay 30 s (default)
python3 scripts/bounding_boxes.py draw --filter vehicle.*
python3 scripts/bounding_boxes.py draw --filter vehicle.* --seconds 60
# project vehicle boxes into a camera frame -> annotated PNG + JSON
python3 scripts/bounding_boxes.py project --camera <camera_id> --filter vehicle.* --out boxes.png
How the projection works (brief)
Capture one frame → build the camera intrinsics K from its fov + resolution →
for each actor, take its 3D box's 8 world vertices (get_world_vertices),
transform to camera space with the camera's inverse matrix, keep those in front,
apply K → 2D points → the min/max is the 2D box. Off-frame and too-far
(--max-dist) actors are skipped. Full math in the reference.
Examples
Example 1: annotate the ego camera
User says: "put boxes on the cars in the camera view"
Spawn a camera on the ego (create-sensor), then project --camera <id> --filter vehicle.* → boxes.png with green 2D boxes + boxes.json.
Example 2: how big is that actor
User says: "what are the dimensions of vehicle 137?"
list --filter vehicle.* (find 137) → its LxWxH from the extent.
Example 3: visualise in 3D
User says: "outline all the vehicles in the world"
draw --filter vehicle.* — green 3D boxes on a rendered server.
Troubleshooting
Problem: project finds no boxes
Cause: no actors in front of / within --max-dist of the camera, or wrong filter.
Solution: raise --max-dist, widen --filter, ensure vehicles are in view.
Problem: boxes misaligned Cause: the frame and the actor poses drifted (fast motion, async). Solution: capture in synchronous mode (set-world-settings) so the frame and poses are from the same tick.
Problem: draw shows nothing
Cause: headless -nullrhi server.
Solution: use a rendered server (see debug-draw).
Note: boxes always track moving actors
draw re-stamps each frame for --seconds (default 30), so boxes ride moving
cars automatically — the command blocks for that duration.
Outputs
list: box dimensions per actor.draw: 3D box overlay (rendered view).project:<out>.png(annotated) +<out>.json(2D boxes: id, type, xyxy).
Detail (intrinsics, world→camera transform, level boxes, lidar-to-camera) in references/bounding-boxes.md.
자주 묻는 질문
카메라 없이도 박스를 그릴 수 있나요?
네. 박스의 기하 정보를 나열하거나 세계에 3D 박스를 그릴 수 있습니다. 투영 단계에는 카메라가 필요합니다.
그린 박스는 화면에 얼마나 남나요?
기본은 30초이며, 더 길게 설정할 수 있습니다.
투영에는 무엇이 필요한가요?
센서 스킬로 배치된, 자차에 붙은 카메라와 주변의 액터들입니다.
상세 정보
작성자의 원본 설명
Gets actor and level 3D bounding boxes and projects them into a camera image as 2D boxes — the dataset-annotation workflow. Lists box geometry, draws 3D boxes in the world via debug, or captures one camera frame and writes an annotated PNG plus a JSON of 2D boxes for matching actors. Use when the user asks to "get bounding boxes", "draw boxes around the cars", "project boxes onto the camera", or "generate a detection dataset / annotations".
repo: carla-simulator/carla
인기도
- GitHub 스타
- 15k
- 순위
- #11084
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-leaderboard-route
15k카메라 화면에서 웨이포인트와 시나리오 트리거를 배치하고, 확인하고, 순서를 정해 CARLA 리더보드 경로 파일을 만들도록 에이전트를 돕습니다.
package-leaderboard-agent
15k주행 에이전트를 CARLA Leaderboard 제출용 Docker 이미지로 패키징하고, 폴더 구조를 확인하며 이미지가 에이전트를 로드하는지 테스트하도록 돕습니다.
read-leaderboard-results
15kCARLA Leaderboard 결과 파일을 읽고 경로별 점수와 위반 사항을 설명하며, 다른 규칙 버전에서 실행을 다시 채점하도록 에이전트를 돕습니다.
run-leaderboard-evaluation
15k주행 에이전트로 경로 세트에 대한 CARLA Leaderboard 평가를 실행하도록 돕습니다. 먼저 설정을 확인하고, 재개할 수 있는 체크포인트를 저장합니다.