Code/Review

SimTrack code Review

Shy_un 2023. 11. 30. 20:32


Config

config 파일은 examples/point_pillars/configs 안에 있는 nusc_all_pp_centernet_tracking.py

SimTrack은 따로 Pipeline을 두지 않고, config 파일로 코드를 관리한다.

 

class name

  1.  car
  2. truck, construction_vehicle
  3. bus, trailer
  4. barrier
  5. motorcycle, bicycle
  6. pedestrian, traffic_cone

voxel size

0.2, 0.2, 8

point cloud range

(-51.2, -51.2, -5.0, 51.2, 51.2, 3.0)

model

  1. reader : PillarFeatureNet
  2. backbone : PointPillarsScatter
  3. neck : RPN
  4. bbox_head : CenterHeadV2

train_cfg

get_downsample

max_object

min_radius

...

test_cfg

NMS

score threshold

voxel_size

max_per_img

...

Dataset

NuScenesDataset

n_sweeps = 10

data_root

data_sampler

train_preprocessor

mode

rotation_noise

scale_noise

transition_noise

data_sampler

class_name

...

val_prerprocessor

mode

...

voxel_generator

range

voxel_size

max_points_in_voxel

max_voxel_num

train_pipeline

LoadPointCloudFromFile

LoadPointCloudAnnotations

Preprocess

Voxelization

AssignTracking

Reformat

test_pipeline

LoadPointCloudFromFile

LoadPointCloudAnnotations

Preprocess

Voxelization

Reformat

 

data

samples_per_gpu

workers_per_gpu

train

val

test

optimizer

epoch


train

build_detector

build_dataset

build_dataloader

build_optimizer

build_scheduler

 

trainer(model, optimizer, scheduler)

trainer.run(data_loader)


inference

build_dataset

build_detector(test)

load_checkpoint

build_dataloader(batch_size=1)

model.eval()

 

grids = mehgrid(w, h) : w x h 크기의 2차원 배열을 생성.

 

1. for문으로 data batch 받아옴

2. nusc.get으로 현재 데이터 이전의 토큰을 받아와 첫 프레임인지 아닌지 판단함.

3. 만약 첫 프레임이 아니라면,

 

 

이전 프레임의 detection 정보를 불러와 현재 차량 기준 좌표계로 변환.