YonghaoHe / LFD-A-Light-and-Fast-Detector

LFD is a big update upon LFFD. Generally, LFD is a multi-class object detector characterized by lightweight, low inference latency and superior precision. It is for real-world appilcations.
418 stars 82 forks source link

Warning messages that appear when I use the model to make predictions #42

Open XiaomuWang opened 2 years ago

XiaomuWang commented 2 years ago

Hello, when I use the model for prediction, I find that this warning always appears, but it does not affect the final result. May I ask how should I deal with this warning, or do I not need to deal with it: [WARNING: ResNet pretrained weights load] unexpected keys: _neck.neck0.0.weight _neck.neck0.1.weight _neck.neck0.1.bias _neck.neck0.1.running_mean _neck.neck0.1.running_var _neck.neck0.1.num_batches_tracked _neck.neck1.0.weight _neck.neck1.1.weight _neck.neck1.1.bias _neck.neck1.1.running_mean _neck.neck1.1.running_var _neck.neck1.1.num_batches_tracked _neck.neck2.0.weight _neck.neck2.1.weight _neck.neck2.1.bias _neck.neck2.1.running_mean _neck.neck2.1.running_var _neck.neck2.1.num_batches_tracked _neck.neck3.0.weight _neck.neck3.1.weight _neck.neck3.1.bias _neck.neck3.1.running_mean _neck.neck3.1.running_var _neck.neck3.1.num_batches_tracked _neck.neck4.0.weight _neck.neck4.1.weight _neck.neck4.1.bias _neck.neck4.1.running_mean _neck.neck4.1.running_var _neck.neck4.1.num_batches_tracked _head._scales.0._scale _head._scales.1._scale _head._scales.2._scale _head._scales.3._scale _head._scales.4._scale _head.head0_classification_path.0.weight _head.head0_classification_path.0.bias _head.head0_regression_path.0.weight _head.head0_regression_path.0.bias _head.head0_merge_path.0.weight _head.head0_merge_path.1.weight _head.head0_merge_path.1.bias _head.head0_merge_path.3.weight _head.head0_merge_path.4.weight _head.head0_merge_path.4.bias _head.head1_classification_path.0.weight _head.head1_classification_path.0.bias _head.head1_regression_path.0.weight _head.head1_regression_path.0.bias _head.head1_merge_path.0.weight _head.head1_merge_path.1.weight _head.head1_merge_path.1.bias _head.head1_merge_path.3.weight _head.head1_merge_path.4.weight _head.head1_merge_path.4.bias _head.head2_classification_path.0.weight _head.head2_classification_path.0.bias _head.head2_regression_path.0.weight _head.head2_regression_path.0.bias _head.head2_merge_path.0.weight _head.head2_merge_path.1.weight _head.head2_merge_path.1.bias _head.head2_merge_path.3.weight _head.head2_merge_path.4.weight _head.head2_merge_path.4.bias _head.head3_classification_path.0.weight _head.head3_classification_path.0.bias _head.head3_regression_path.0.weight _head.head3_regression_path.0.bias _head.head3_merge_path.0.weight _head.head3_merge_path.1.weight _head.head3_merge_path.1.bias _head.head3_merge_path.3.weight _head.head3_merge_path.4.weight _head.head3_merge_path.4.bias _head.head4_classification_path.0.weight _head.head4_classification_path.0.bias _head.head4_regression_path.0.weight _head.head4_regression_path.0.bias _head.head4_merge_path.0.weight _head.head4_merge_path.1.weight _head.head4_merge_path.1.bias _head.head4_merge_path.3.weight _head.head4_merge_path.4.weight _head.head4_merge_path.4.bias

XiaomuWang commented 2 years ago

@YonghaoHe

YonghaoHe commented 2 years ago

@XiaomuWang you should not init the backbone using the entire model params. You don't have to init backbone individually. config_dict['backbone_init_param_file_path'] = None # if no pretrained weights, set to None

XiaomuWang commented 2 years ago

Thanks!That's right to pth model. But when I run the engine model, it shows up [TensorRT] ERROR: ../rtSafe/cuda/reformat.cu (740) - Cuda Error in NCHWToNCQHW4: 400 (invalid resource handle) This is because it has been modified as config_dict['backbone_init_param_file_path'] = None # if no pretrained weights, set to None