다시 이 시점이 왔다.
이게 어려워 보여서 다른 라이브러리 찾다가 easy pointpillars 깃허브를 찾아서 해봤던건데
그냥 어려워도 삽질 해가면서 잘 만들어진 패키지 가지고 계속 시도해볼걸 그랬다.
참고 : Waymo Dataset을 가지고 Kitti Dataset으로 변환하는 방법
https://mmdetection3d.readthedocs.io/en/latest/2_new_data_model.html
MMDetection3D 사용 Steps
- Data Set을 준비합니다.
- Config 파일을 세팅 합니다.
- Train, Test, Inference 를 진행 합니다.
Prepare Customized DATA
Customized Data를 가지고 MMDetection3D를 활용하는 방법으로는 크게 세가지가 있다.
- 기존에 존재하는 데이터셋에 형식을 맞춘다. ( 가령 Kitti )
- Middle Format에서 형식을 맞추는 방법도 있다.
- 아예 새로운 데이터 셋 형식을 만들어 모델에다가 넣는다.
1번과 2번은 reorganize 이후, config 파일만 수정하면 되지만
3번 같은 경우 코드 전체를 수정해야하기 때문에 난이도가 수직 상승한다.
KITTI dataset format
참고로 내가 만들고자 하는 Kitti format은 다음과 같이 생겼다.
필요한 것만 가져왔기 때문에 실제 Kitti data 전부의 format은 아니다.
mmdetection3d
├── mmdet3d
├── tools
├── configs
├── data
│ ├── kitti
│ │ ├── ImageSets
│ │ ├── testing
│ │ │ ├── calib
│ │ │ ├── image_2
│ │ │ ├── velodyne
│ │ ├── training
│ │ │ ├── calib
│ │ │ ├── image_2
│ │ │ ├── label_2
│ │ │ ├── velodyne
- annotation에 대한 설명
#Values Name Description
----------------------------------------------------------------------------
1 type Describes the type of object: 'Car', 'Van', 'Truck',
'Pedestrian', 'Person_sitting', 'Cyclist', 'Tram',
'Misc' or 'DontCare'
1 truncated Float from 0 (non-truncated) to 1 (truncated), where
truncated refers to the object leaving image boundaries
1 occluded Integer (0,1,2,3) indicating occlusion state:
0 = fully visible, 1 = partly occluded
2 = largely occluded, 3 = unknown
1 alpha Observation angle of object, ranging [-pi..pi]
4 bbox 2D bounding box of object in the image (0-based index):
contains left, top, right, bottom pixel coordinates
3 dimensions 3D object dimensions: height, width, length (in meters)
3 location 3D object location x,y,z in camera coordinates (in meters)
1 rotation_y Rotation ry around Y-axis in camera coordinates [-pi..pi]
1 score Only for results: Float, indicating confidence in
detection, needed for p/r curves, higher is better.
Data Convert
- Input Data와 annotation format을 KITTI Style로 바꾸어야 합니다.
- waymo2kitti converter :
https://github.com/open-mmlab/mmdetection3d/blob/master/tools/data_converter/waymo_converter.py
- waymo2kitti converter :
- 이후 KittiDataset를 상속받아 나만의 데이터 클래스를 구현할 수 있어야 합니다.
- 주의해야할 점은, 평가 프로토콜을 염두해두어야 한다는 것입니다.
waymo dataset class 안에 이를 구현해두었다고 하니 살펴보고 코드를 짜야할 것 같습니다.
이제.. 하나하나 필요한 데이터를 채워 봅시다.
'Project' 카테고리의 다른 글
[MMDetection3D] PCD, Cuboid, yaw 만을 가지고 데이터 세팅 (0) | 2023.02.10 |
---|---|
[MMDetion3D] Customized Data _ ply파일을 bin으로 변환 (0) | 2023.02.10 |
[MMDetection3D] KITTI Data Prepare (0) | 2023.02.09 |
[MMDetection3D] ply to bin, obj to ply (0) | 2023.02.09 |
[Pointpillars] MMDetection3D 세팅 및 데모 확인 (0) | 2023.02.09 |