본문으로 건너뛰기
Skillpedia
머신러닝15k · #11084

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/carla-simulator/carla/blob/ue58-dev/Skills/python-api/bounding-boxes/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“앞 카메라에 차량 바운딩 박스를 투영해서, 주석이 달린 PNG와 JSON 파일로 저장해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 각 액터의 3D 박스를 읽고, 확인을 위해 세계에 그릴 수 있으며, 카메라를 거쳐 2D 박스로 투영합니다. 주석이 달린 이미지와 박스가 담긴 JSON 파일을 저장합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Bounding boxes

Paths. scripts/… and references/… 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬