"""BEVFormer Visualizaion for NuScenes Example."""from__future__importannotationsfromvis4d.configimportclass_configfromvis4d.config.typingimportExperimentConfigfromvis4d.engine.callbacksimportVisualizerCallbackfromvis4d.engine.connectorsimportMultiSensorCallbackConnectorfromvis4d.vis.image.bbox3d_visualizerimportMultiCameraBBox3DVisualizerfromvis4d.zoo.baseimportget_default_callbacks_cfgfromvis4d.zoo.bevformer.bevformer_baseimport(get_configasget_bevformer_config,)fromvis4d.zoo.bevformer.dataimport(CONN_NUSC_BBOX_3D_VIS,NUSC_CAMERAS,nuscenes_class_map,)
[docs]defget_config()->ExperimentConfig:"""Returns the config dict for BEVFormer on nuScenes. Returns: ExperimentConfig: The configuration """######################################################## General Config ########################################################config=get_bevformer_config().ref_mode()config.experiment_name="bevformer_vis"######################################################## CALLBACKS ######################################################### Logger and Checkpointcallbacks=get_default_callbacks_cfg(config.output_dir)# Visualizercallbacks.append(class_config(VisualizerCallback,visualizer=class_config(MultiCameraBBox3DVisualizer,cat_mapping=nuscenes_class_map,width=2,camera_near_clip=0.15,cameras=NUSC_CAMERAS,vis_freq=1,plot_trajectory=False,),save_prefix=config.output_dir,test_connector=class_config(MultiSensorCallbackConnector,key_mapping=CONN_NUSC_BBOX_3D_VIS,),))config.callbacks=callbacksreturnconfig.value_mode()