배치 사이즈 2 기준
{'meta':
[
{
'header': '/home/song/Desktop/workshop/K-Radar_data',
'seq': '1',
'label_v1_0': '/home/song/Desktop/workshop/K-Radar_data/1/info_label/00340_00308.txt',
'label_v1_1': './tools/revise_label/kradar_revised_label_v1_1/1_info_label_revised/00340_00308.txt',
'label_v2_0': './tools/revise_label/kradar_revised_label_v2_0/KRadar_refined_label_by_UWIPL/1/00340_00308.txt',
'label_v2_1': './tools/revise_label/kradar_revised_label_v2_1/KRadar_revised_visibility/1/00340_00308.txt',
'split': 'train',
'calib': [-2.54, 0.3, 0.7],
'path': {'calib': '/home/song/Desktop/workshop/K-Radar_data/1/info_calib/calib_radar_lidar.txt',
'ldr64': '/home/song/Desktop/workshop/K-Radar_data/1/os2-64/os2-64_00308.pcd',
'desc': '/home/song/Desktop/workshop/K-Radar_data/1/description.txt'}, 'idx': {'rdr': '00340', 'ldr64': '00308', 'camf': '00923', 'ldr128': '00308', 'camr': '00925', 'tstamp': '1643292977.406004709'},
'label': [('Sedan', (55.29178892464954, 5.466838361968888, 0.14934949974048928, 0.020238838006126247, 3.2818552181144063, 1.613238582395025, 1.4197772388134822), 1, 'R')],
'num_obj': 1,
'desc': {'capture_time': 'night', 'road_type': 'urban', 'climate': 'normal'}
},
{
'header': '/home/song/Desktop/workshop/K-Radar_data',
'seq': '1',
'label_v1_0': '/home/song/Desktop/workshop/K-Radar_data/1/info_label/00044_00012.txt',
'label_v1_1': './tools/revise_label/kradar_revised_label_v1_1/1_info_label_revised/00044_00012.txt',
'label_v2_0': './tools/revise_label/kradar_revised_label_v2_0/KRadar_refined_label_by_UWIPL/1/00044_00012.txt',
'label_v2_1': './tools/revise_label/kradar_revised_label_v2_1/KRadar_revised_visibility/1/00044_00012.txt',
'split': 'train',
'calib': [-2.54, 0.3, 0.7],
'path': {'calib': '/home/song/Desktop/workshop/K-Radar_data/1/info_calib/calib_radar_lidar.txt',
'ldr64': '/home/song/Desktop/workshop/K-Radar_data/1/os2-64/os2-64_00012.pcd',
'desc': '/home/song/Desktop/workshop/K-Radar_data/1/description.txt'},
'idx': {'rdr': '00044', 'ldr64': '00012', 'camf': '00035', 'ldr128': '00012', 'camr': '00037', 'tstamp': '1643292947.807167848'},
'label': [('Sedan', (32.31327203214702, -4.033501317213333, 0.8474450492038579, -0.00292866248484648, 3.4579122180458848, 1.7079880922772295, 1.3824741692813867), 0, 'R')],
'num_obj': 1,
'desc': {'capture_time': 'night', 'road_type': 'urban', 'climate': 'normal'}
}
],
'rdr_sparse': tensor([[ 11.8000, -15.8000, -1.8000, 0.0898],
[ 17.8000, -15.8000, -1.8000, 0.1239],
[ 18.2000, -15.8000, -1.8000, 0.1670],
...,
[ 62.2000, 15.8000, 7.4000, 2.2028],
[ 62.6000, 15.8000, 7.4000, 0.2527],
[ 63.0000, 15.8000, 7.4000, 0.0948]]),
'label': [[('Sedan', 1, (55.29178892464954, 5.466838361968888, 0.14934949974048928, 0.020238838006126247, 3.2818552181144063, 1.613238582395025, 1.4197772388134822), 1)],
[('Sedan', 1, (32.31327203214702, -4.033501317213333, 0.8474450492038579, -0.00292866248484648, 3.4579122180458848, 1.7079880922772295, 1.3824741692813867), 0)]],
'num_objs': [1, 1],
'gt_boxes': tensor([[[ 5.5292e+01, 5.4668e+00, 1.4935e-01, 3.2819e+00, 1.6132e+00,
1.4198e+00, 2.0239e-02, 1.0000e+00]],
[[ 3.2313e+01, -4.0335e+00, 8.4745e-01, 3.4579e+00, 1.7080e+00,
1.3825e+00, -2.9287e-03, 1.0000e+00]]]),
'batch_size': 2,
'batch_indices_rdr_sparse': tensor([0, 0, 0, ..., 1, 1, 1])
}
Train
cfg.RTNH_wide.yml로 학습하였다.
데이터는 용량 이슈로 seq 1만 사용하였다.
MODEL
name: RTNH
skeleton: RadarBase
preprocessor: RadarSparseProcessor
Backbone: 3D, RadarSparseBackbone
Head: AnchorHeadSingle
pre_processr -> backbone -> head -> roi_head
결과
Conf thr: 0.3 , Condition: all
==================================================
Cls: sed
IoU: [0.7, 0.5, 0.3]
BEV: [9.090909090909092, 13.602693602693602, 20.040605389442597]
3D: [0.3134796238244514, 10.489510489510488, 18.10023615848859]
--------------------------------------------------
==================================================
Cls: bus
IoU: [0.7, 0.5, 0.3]
BEV: [0.0, 0.0, 0.0]
3D: [0.0, 0.0, 0.0]
--------------------------------------------------
왜인지 bus에 대한 것을 학습하지 못 함.
Test
차 한대만 감지한 것을 볼 수 있다.
아마 데이터가 적어서 그런 듯 싶다.
Visualize
cfg_RTNH_wide 파일의 업데이트가 아직 모두 안 된 상태인 듯 하다.
DATA.CLASS_INFO, DATA.CLASS_BGR 등 여러 파라미터가 지정되어 있지 않다.
다른 cfg파일(ex. cfg_RTNH)에는 존재함.
오류
- File "/home/song/Desktop/workshop/K-Radar/pipelines/pipeline_detection_v1_0.py", line 135, in set_vis
self.dict_cls_name_to_id = self.cfg.DATASET.CLASS_INFO.CLASS_ID
AttributeError: 'EasyDict' object has no attribute 'CLASS_INFO'
cfg.DATASET
{'NAME': 'KRadarDetection_v2_0',
'NUM': 299,
'path_data': {'list_dir_kradar': ['/home/song/Desktop/workshop/K-Radar_data'], 'split': ['./resources/split/train.txt', './resources/split/test.txt'], 'revised_label_v1_1': './tools/revise_label/kradar_revised_label_v1_1', 'revised_label_v2_0': './tools/revise_label/kradar_revised_label_v2_0/KRadar_refined_label_by_UWIPL', 'revised_label_v2_1': './tools/revise_label/kradar_revised_label_v2_1/KRadar_revised_visibility'},
'label_version': 'v2_0',
'item': {'calib': True, 'ldr64': False, 'ldr128': False, 'rdr': False, 'rdr_sparse': True, 'cam': False},
'calib': {'z_offset': 0.7},
'ldr64': {'processed': False, 'skip_line': 13, 'n_attr': 9, 'inside_ldr64': True, 'calib': True},
'rdr': {'cube': False},
'rdr_sparse': {'processed': True, 'dir': '/home/song/Desktop/workshop/K-Radar_data/1/rtnh_wider_1p_1'},
'roi': {'filter': True, 'xyz': [0.0, -16.0, -2.0, 72.0, 16.0, 7.6], 'keys': ['rdr_sparse'], 'check_azimuth_for_rdr': True, 'azimuth_deg': [-53, 53], 'grid_size': 0.4, 'voxel_size': [0.4, 0.4, 0.4]},
'label': {'calib': True, 'onlyR': False, 'consider_cls': True, 'consider_roi': True, 'remove_0_obj': True, 'Sedan': [True, 1, [0, 1, 0], [0, 255, 0]], 'Bus or Truck': [True, 2, [1, 0.2, 0], [0, 50, 255]], 'Motorcycle': [False, -1, [1, 0, 0], [0, 0, 255]], 'Bicycle': [False, -1, [1, 1, 0], [0, 255, 255]], 'Bicycle Group': [False, -1, [0, 0.5, 1], [0, 128, 255]], 'Pedestrian': [False, -1, [0, 0, 1], [255, 0, 0]], 'Pedestrian Group': [False, -1, [0.4, 0, 1], [255, 0, 100]], 'Label': [False, -1, [0.5, 0.5, 0.5], [128, 128, 128]]},
'collate_fn': 'v2_0',
'load_from_pickle': './pkl'}
kradar_detection_v2_0.py로 바뀌면서 DATASET안에 CLASS_INFO라는 부분이 없어짐.
일단 이 부분 주석처리하고 진행함.
- RuntimeError: TensorStorage /tmp/pip-build-env-g7ks_t5y/overlay/lib/python3.8/site-packages/cumm/include/tensorview/tensor.h:172
cuda failed with error 2 out of memory. use CUDA_LAUNCH_BLOCKING=1 to get correct traceback.
GPU 메모리 이슈로 원래 배치 = 8 이었지만, 배치 = 2로 진행함.
- File "/home/song/Desktop/workshop/K-Radar/pipelines/pipeline_detection_v1_0.py", line 465, in validate_kitti
dict_out = self.network.list_modules[-1].get_nms_pred_boxes_for_single_sample(dict_out, conf_thr, is_nms=True)
File "/home/song/anaconda3/envs/kradar/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in __getattr__
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'AnchorHeadSingle' object has no attribute 'get_nms_pred_boxes_for_single_sample'
models의 head 안에 있는 ldr_pillars_head.py, rdr_spcube_head.py안에 존재하는 함수.
하지만 현재 학습하려는 모델은 위의 head를 사용하지 않고, anchor_head.py를 사용함. 이 안에는 get_nms_pred_boxes_for_single_sample()함수가 정의되어 있지 않다.
validation code 아직 수정 안한 이슈로 발생했다.
train 시, validation을 하지 않도록 설정하여 해결.
'Dataset > K-Radar' 카테고리의 다른 글
make kradar json file(nuscenes ver.) (2) | 2023.10.17 |
---|---|
kradar_token information (0) | 2023.10.16 |
Data for evaluate.py (0) | 2023.10.12 |
nuscenes v1.0trainval (1) | 2023.10.11 |