bev-project/analysis_results/analysis_20251030_163131/model_complexity.txt

23 lines
4.2 KiB
Plaintext

================================================================================
BEVFusion模型复杂度分析
================================================================================
配置文件: configs/nuscenes/det/transfusion/secfpn/camera+lidar/swint_v0p075/multitask_enhanced_phase1_HIGHRES.yaml
Checkpoint: runs/enhanced_from_epoch19/epoch_23.pth
加载配置...
构建模型...
Traceback (most recent call last):
File "tools/analysis/model_complexity_simple.py", line 168, in <module>
main(config_file, checkpoint_file)
File "tools/analysis/model_complexity_simple.py", line 51, in main
model = build_model(cfg.model)
File "/workspace/bevfusion/mmdet3d/models/builder.py", line 41, in build_model
return build_fusion_model(cfg, train_cfg=train_cfg, test_cfg=test_cfg)
File "/workspace/bevfusion/mmdet3d/models/builder.py", line 35, in build_fusion_model
return FUSIONMODELS.build(
File "/opt/conda/lib/python3.8/site-packages/mmcv/utils/registry.py", line 212, in build
return self.build_func(*args, **kwargs, registry=self)
File "/opt/conda/lib/python3.8/site-packages/mmcv/utils/registry.py", line 24, in build_from_cfg
raise KeyError(
KeyError: '`cfg` or `default_args` must contain the key "type", but got {\'fuser\': {\'type\': \'ConvFuser\', \'in_channels\': [80, 256], \'out_channels\': 256}, \'encoders\': {\'camera\': {\'backbone\': {\'type\': \'SwinTransformer\', \'embed_dims\': 96, \'depths\': [2, 2, 6, 2], \'num_heads\': [3, 6, 12, 24], \'window_size\': 7, \'mlp_ratio\': 4, \'qkv_bias\': True, \'qk_scale\': None, \'drop_rate\': 0.0, \'attn_drop_rate\': 0.0, \'drop_path_rate\': 0.2, \'patch_norm\': True, \'out_indices\': [1, 2, 3], \'with_cp\': False, \'convert_weights\': True, \'init_cfg\': {\'type\': \'Pretrained\', \'checkpoint\': \'pretrained/swint-nuimages-pretrained.pth\'}}, \'neck\': {\'type\': \'GeneralizedLSSFPN\', \'in_channels\': [192, 384, 768], \'out_channels\': 256, \'start_level\': 0, \'num_outs\': 3, \'norm_cfg\': {\'type\': \'BN2d\', \'requires_grad\': True}, \'act_cfg\': {\'type\': \'ReLU\', \'inplace\': True}, \'upsample_cfg\': {\'mode\': \'bilinear\', \'align_corners\': False}}, \'vtransform\': {\'type\': \'DepthLSSTransform\', \'in_channels\': 256, \'out_channels\': 80, \'image_size\': \'${image_size}\', \'feature_size\': \'${[image_size[0] // 8, image_size[1] // 8]}\', \'xbound\': [-54.0, 54.0, 0.3], \'ybound\': [-54.0, 54.0, 0.3], \'zbound\': [-10.0, 10.0, 20.0], \'dbound\': [1.0, 60.0, 0.5], \'downsample\': 2}}, \'lidar\': {\'voxelize\': {\'max_num_points\': 10, \'point_cloud_range\': \'${point_cloud_range}\', \'voxel_size\': \'${voxel_size}\', \'max_voxels\': [120000, 160000]}, \'backbone\': {\'type\': \'SparseEncoder\', \'in_channels\': 5, \'sparse_shape\': [1440, 1440, 41], \'output_channels\': 128, \'order\': [\'conv\', \'norm\', \'act\'], \'encoder_channels\': [[16, 16, 32], [32, 32, 64], [64, 64, 128], [128, 128]], \'encoder_paddings\': [[0, 0, 1], [0, 0, 1], [0, 0, [1, 1, 0]], [0, 0]], \'block_type\': \'basicblock\'}}}, \'decoder\': {\'backbone\': {\'type\': \'SECOND\', \'in_channels\': 256, \'out_channels\': [128, 256], \'layer_nums\': [5, 5], \'layer_strides\': [1, 2], \'norm_cfg\': {\'type\': \'BN\', \'eps\': 0.001, \'momentum\': 0.01}, \'conv_cfg\': {\'type\': \'Conv2d\', \'bias\': False}}, \'neck\': {\'type\': \'SECONDFPN\', \'in_channels\': [128, 256], \'out_channels\': [256, 256], \'upsample_strides\': [1, 2], \'norm_cfg\': {\'type\': \'BN\', \'eps\': 0.001, \'momentum\': 0.01}, \'upsample_cfg\': {\'type\': \'deconv\', \'bias\': False}, \'use_conv_for_no_stride\': True}}, \'heads\': {\'object\': {\'in_channels\': 512, \'train_cfg\': {\'grid_size\': [1440, 1440, 41]}, \'test_cfg\': {\'grid_size\': [1440, 1440, 41]}}, \'map\': {\'type\': \'EnhancedBEVSegmentationHead\', \'in_channels\': 512, \'classes\': \'${map_classes}\', \'loss\': \'focal\', \'deep_supervision\': False, \'use_dice_loss\': False, \'dice_weight\': 0.5, \'focal_alpha\': 0.25, \'focal_gamma\': 2.0, \'decoder_channels\': [256, 128], \'grid_transform\': {\'input_scope\': [[-54.0, 54.0, 0.75], [-54.0, 54.0, 0.75]], \'output_scope\': [[-50, 50, 0.25], [-50, 50, 0.25]]}}}, \'loss_scale\': {\'object\': 1.0, \'map\': 1.0}}\n{\'train_cfg\': None, \'test_cfg\': None}'