issues
search
ignacio-rocco
/
detectorch
Detectorch - detectron for PyTorch
Other
558
stars
72
forks
source link
the error of Create detector model
#21
Open
ljl199711129
opened
2 years ago
ljl199711129
commented
2 years ago
KeyError Traceback (most recent call last)
in
2 detector_pkl_file=pretrained_model_file, 3 use_rpn_head = use_rpn_head, ----> 4 use_mask_head = use_mask_head) 5 model = model.cuda() /mnt/wifiperson-master/dataprocessing/detectorch/lib/model/detector.py in __init__(self, train, arch, conv_body_layers, conv_head_layers, fpn_layers, fpn_extra_lvl, use_rpn_head, use_mask_head, mask_head_type, roi_feature_channels, N_classes, detector_pkl_file, base_cnn_pkl_file, output_prob, roi_height, roi_width, roi_spatial_scale, roi_sampling_ratio) 224 # load pretrained weights 225 if detector_pkl_file is not None: --> 226 self.load_pretrained_weights(detector_pkl_file, model='detector') 227 elif base_cnn_pkl_file is not None: 228 self.load_pretrained_weights(base_cnn_pkl_file, model='base_cnn') /mnt/wifiperson-master/dataprocessing/detectorch/lib/model/detector.py in load_pretrained_weights(self, caffe_pkl_file, model) 306 model_dict[k]=torch.FloatTensor(caffe_data[k_caffe][:,(2, 1, 0),:,:]) 307 else: --> 308 model_dict[k]=torch.FloatTensor(caffe_data[k_caffe]) 309 # update model 310 self.model.load_state_dict(model_dict) KeyError: 'res_conv1'
KeyError Traceback (most recent call last)