evaluate.py에서 gt값을 불러오는 부분은 다음과 같다.
load_gt()함수를 자세히 살펴보자.
sample token을 sample.json에서 읽어옴.
sample.json에서 sample_token정보를 읽고 이를 바탕으로 scene.json에서 'name' 값이 splits[eval_split(val로 설정)]안에 있는 경우만 token 저장. 결과적으로 scene-0001부터 scene-1110 중에서 150개의 scene만 저장된다.(validation 150개)
scene.json예시
우리가 하려는 task는 detection이 아닌 Tracking이므로 box_cls = TrackingBox 이다.
sample_annotation.json에서 'instance_token'값을 받아와 tracking_id로 사용
sample_annotation.json 예시
tracking_name을 간단하게 수정함
결과적으로 gt 데이터 구성은 다음과 같다.
sample_token : sample.json에서 읽어온 token 값
translation, size, rotation : sample_annotation.json에서 읽어온 bbox 정보
velocity : translation정보를 사용하여 계산함.(box_velocity()함수에서). 이전 frame과 다음 frame 사이 difference.
num_pts : point 개수
tracking_id : sample_annotation.json에서 'instance_token'값을 받아와 tracking_id로 사용
tracking_name : category 이름(car, pedestrian, truck, ...)
tracking_score : 의미 없는 값? (-1.0) gt sample에서는 사용하지 않는다고...
이 sample_boxes 값이 gt_boxes로 return된다.
이 후, ego 차량과 bboxes 정보 사이의 거리를 추가하기 위해 add_center_dist()함수가 호출된다.
이 때, ego 차량 정보는 ego_pose.json 파일에서 불러와 사용함. 두 정보 모두 global coordinate 기준이기 때문에 바로 계산이 가능하다고 한다.(ego_translation = box - ego_pose)
마지막으로 gt, prediction 정보에서 box정보를 필터링하는 과정을 거친다.(nuscenes evaluation code 조건을 만족하기 위함)
Preprocessing
Before running the evaluation code the following pre-processing is done on the data:
- All boxes (GT and prediction) are removed if they exceed the class-specific tracking range.
- All bikes and motorcycle boxes (GT and prediction) that fall inside a bike-rack are removed. The reason is that we do not annotate bikes inside bike-racks.
- All boxes (GT) without lidar or radar points in them are removed. The reason is that we can not guarantee that they are actually visible in the frame. We do not filter the predicted boxes based on number of points.
- To avoid excessive track fragmentation from lidar/radar point filtering, we linearly interpolate GT and predicted tracks.
최종적으로 split(eval_set)에 해당하는 sample만 남기는 과정을 거치면 evaluate을 수행하기 위한 init 과정이 끝난다.
'Code > 3D tracking' 카테고리의 다른 글
Simtrack_test (0) | 2023.11.06 |
---|---|
simple track data format (0) | 2023.10.08 |
Simple Track Inference (0) | 2023.10.04 |
Simple Track Preprocessing (0) | 2023.10.04 |
nuScenes tracking data (0) | 2023.10.03 |
evaluate.py에서 gt값을 불러오는 부분은 다음과 같다.
load_gt()함수를 자세히 살펴보자.
sample token을 sample.json에서 읽어옴.
sample.json에서 sample_token정보를 읽고 이를 바탕으로 scene.json에서 'name' 값이 splits[eval_split(val로 설정)]안에 있는 경우만 token 저장. 결과적으로 scene-0001부터 scene-1110 중에서 150개의 scene만 저장된다.(validation 150개)
scene.json예시
우리가 하려는 task는 detection이 아닌 Tracking이므로 box_cls = TrackingBox 이다.
sample_annotation.json에서 'instance_token'값을 받아와 tracking_id로 사용
sample_annotation.json 예시
tracking_name을 간단하게 수정함
결과적으로 gt 데이터 구성은 다음과 같다.
sample_token : sample.json에서 읽어온 token 값
translation, size, rotation : sample_annotation.json에서 읽어온 bbox 정보
velocity : translation정보를 사용하여 계산함.(box_velocity()함수에서). 이전 frame과 다음 frame 사이 difference.
num_pts : point 개수
tracking_id : sample_annotation.json에서 'instance_token'값을 받아와 tracking_id로 사용
tracking_name : category 이름(car, pedestrian, truck, ...)
tracking_score : 의미 없는 값? (-1.0) gt sample에서는 사용하지 않는다고...
이 sample_boxes 값이 gt_boxes로 return된다.
이 후, ego 차량과 bboxes 정보 사이의 거리를 추가하기 위해 add_center_dist()함수가 호출된다.
이 때, ego 차량 정보는 ego_pose.json 파일에서 불러와 사용함. 두 정보 모두 global coordinate 기준이기 때문에 바로 계산이 가능하다고 한다.(ego_translation = box - ego_pose)
마지막으로 gt, prediction 정보에서 box정보를 필터링하는 과정을 거친다.(nuscenes evaluation code 조건을 만족하기 위함)
Preprocessing
Before running the evaluation code the following pre-processing is done on the data:
- All boxes (GT and prediction) are removed if they exceed the class-specific tracking range.
- All bikes and motorcycle boxes (GT and prediction) that fall inside a bike-rack are removed. The reason is that we do not annotate bikes inside bike-racks.
- All boxes (GT) without lidar or radar points in them are removed. The reason is that we can not guarantee that they are actually visible in the frame. We do not filter the predicted boxes based on number of points.
- To avoid excessive track fragmentation from lidar/radar point filtering, we linearly interpolate GT and predicted tracks.
최종적으로 split(eval_set)에 해당하는 sample만 남기는 과정을 거치면 evaluate을 수행하기 위한 init 과정이 끝난다.
'Code > 3D tracking' 카테고리의 다른 글
Simtrack_test (0) | 2023.11.06 |
---|---|
simple track data format (0) | 2023.10.08 |
Simple Track Inference (0) | 2023.10.04 |
Simple Track Preprocessing (0) | 2023.10.04 |
nuScenes tracking data (0) | 2023.10.03 |