Closed WangzcBruce closed 9 months ago
Sure. It is very similar to the yaml config file for OPV2V. Here is an example:
name: dair_lss_coalign_fusion
data_dir: "dataset/my_dair_v2x/v2x_c/cooperative-vehicle-infrastructure"
root_dir: "dataset/my_dair_v2x/v2x_c/cooperative-vehicle-infrastructure/train.json"
validate_dir: "dataset/my_dair_v2x/v2x_c/cooperative-vehicle-infrastructure/val.json"
test_dir: "dataset/my_dair_v2x/v2x_c/cooperative-vehicle-infrastructure/val.json"
yaml_parser: "load_lift_splat_shoot_params"
train_params:
batch_size: &batch_size 2
epoches: 50
eval_freq: 2
save_freq: 2
max_cav: 5
input_source: ['camera']
label_type: 'camera'
comm_range: 100
fusion:
core_method: 'intermediate'
dataset: 'dairv2x'
args:
proj_first: false # useless
grid_conf: &grid_conf
xbound: [-102.4, 102.4, 0.4] # Limit the range of the x direction and divide the grids
ybound: [-51.2, 51.2, 0.4] # Limit the range of the y direction and divide the grids
zbound: [-10, 10, 20.0] # Limit the range of the z direction and divide the grids
ddiscr: [2, 100, 98]
mode: 'LID' # or 'UD'
data_aug_conf: &data_aug_conf
resize_lim: [0.27, 0.28]
final_dim: [288, 512]
rot_lim: [0, 0]
H: 1080
W: 1920
rand_flip: False
bot_pct_lim: [0.0, 0.05]
cams: ['camera0', 'camera1', 'camera2', 'camera3'] # placeholder. no use
Ncams: 4 # placeholder. no use
# preprocess-related
preprocess:
# options: BasePreprocessor, VoxelPreprocessor, BevPreprocessor
core_method: 'SpVoxelPreprocessor'
args:
voxel_size: &voxel_size [0.4, 0.4, 5] # useful
max_points_per_voxel: 32 # useless
max_voxel_train: 32000 # useless
max_voxel_test: 70000 # useless
# detection range for each individual cav.
cav_lidar_range: &cav_lidar [-102.4, -51.2, -3.5, 102.4, 51.2, 1.5]
data_augment: # useless
- NAME: random_world_flip
ALONG_AXIS_LIST: [ 'x' ]
- NAME: random_world_rotation
WORLD_ROT_ANGLE: [ -0.78539816, 0.78539816 ]
- NAME: random_world_scaling
WORLD_SCALE_RANGE: [ 0.95, 1.05 ]
# anchor box related
postprocess:
core_method: 'VoxelPostprocessor' # VoxelPostprocessor, BevPostprocessor supported
gt_range: *cav_lidar
anchor_args:
cav_lidar_range: *cav_lidar
l: 4.5
w: 2
h: 1.56
feature_stride: 2
r: &anchor_yaw [0, 90]
num: &achor_num 2
target_args:
pos_threshold: 0.6
neg_threshold: 0.45
score_threshold: 0.20
order: 'hwl' # hwl or lwh
max_num: 100 # maximum number of objects in a single frame. use this number to make sure different frames has the same dimension in the same batch
nms_thresh: 0.15
dir_args: &dir_args
dir_offset: 0.7853
num_bins: 2
anchor_yaw: *anchor_yaw
# model related
model:
core_method: lift_splat_shoot_intermediate
args:
anchor_number: *achor_num
grid_conf: *grid_conf
data_aug_conf: *data_aug_conf
dir_args: *dir_args
img_downsample: 8
img_features: &img_feature 128
use_depth_gt: false
depth_supervision: false
supervise_single: true
bevout_feature: 128
camera_encoder: EfficientNet
fusion_args:
core_method: att_ms # support att_ms and max_ms
args:
voxel_size: *voxel_size
in_channels: *img_feature
loss:
core_method: point_pillar_loss
args:
pos_cls_weight: 2.0
cls:
type: 'SigmoidFocalLoss'
alpha: 0.25
gamma: 2.0
weight: 1.0
reg:
type: 'WeightedSmoothL1Loss'
sigma: 3.0
codewise: true
weight: 2.0
optimizer:
core_method: Adam
lr: 0.0015
args:
eps: 1e-10
weight_decay: 1e-4
lr_scheduler:
core_method: multistep #step, multistep and Exponential support
gamma: 0.1
step_size: [25, 40]
Notice that the range I set is very large [- + 102.4, - + 51.2], you can modify it as you like. I've been busy lately and haven't tested this yaml yet. Please let me know if there is something wrong with it. It is very close to the version of opv2v, and only needs to modify the interface related to the data.
Hello, I've been going through your project and am looking for the camera yaml file in hypes_yaml/dairv2x. Would you be able to provide this file? It would be greatly helpful for my research. Thank you very much! 您好,打扰了。请问能够提供hypes_yaml/dairv2x中的camera yaml吗?非常感谢!