"""CC-3DT Visualizaion for NuScenes Example."""from__future__importannotationsfromvis4d.configimportclass_configfromvis4d.config.typingimportExperimentConfigfromvis4d.data.datasets.nuscenesimportNuScenes,nuscenes_class_mapfromvis4d.engine.callbacksimportVisualizerCallbackfromvis4d.engine.connectorsimportMultiSensorCallbackConnectorfromvis4d.vis.image.bbox3d_visualizerimportMultiCameraBBox3DVisualizerfromvis4d.vis.image.bev_visualizerimportBEVBBox3DVisualizerfromvis4d.zoo.baseimportget_default_callbacks_cfgfromvis4d.zoo.cc_3dt.cc_3dt_frcnn_r50_fpn_kf3d_12e_nuscimport(get_configasget_cc_3dt_config,)fromvis4d.zoo.cc_3dt.dataimport(CONN_NUSC_BBOX_3D_VIS,CONN_NUSC_BEV_BBOX_3D_VIS,)
[docs]defget_config()->ExperimentConfig:"""Returns the config dict for cc-3dt on nuScenes. Returns: ExperimentConfig: The configuration """######################################################## General Config ########################################################config=get_cc_3dt_config().ref_mode()config.experiment_name="cc_3dt_nusc_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=NuScenes.CAMERAS,vis_freq=1,),save_prefix=config.output_dir,test_connector=class_config(MultiSensorCallbackConnector,key_mapping=CONN_NUSC_BBOX_3D_VIS,),))callbacks.append(class_config(VisualizerCallback,visualizer=class_config(BEVBBox3DVisualizer,width=2,vis_freq=1),save_prefix=config.output_dir,test_connector=class_config(MultiSensorCallbackConnector,key_mapping=CONN_NUSC_BEV_BBOX_3D_VIS,),))config.callbacks=callbacksreturnconfig.value_mode()