Skip to content

the error of Create detector model #21

Description

@ljl199711129

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions