我用PascalVOC训练的权重 失败了 boxes = outputs[:,0:4]
I can run only in your own .pth while trained myself's (pascalVOC) it failed
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Traceback (most recent call last):
File "/home/55/yolox-deepsort-main/000.py", line 50, in
main()
File "/home/55/yolox-deepsort-main/000.py", line 24, in main
result = det.feedCap(im) #BGR #this wrong
File "/home/55/yolox-deepsort-main/BaseDetector.py", line 35, in feedCap
im, faces, face_bboxes = update_tracker(self, im)
File "/home/55/yolox-deepsort-main/tracker.py", line 41, in update_tracker
_, bboxes = target_detector.detect(image) #wrong take place in here
File "/home/55/yolox-deepsort-main/AIDetector_pytorch.py", line 121, in detect
boxes = outputs[:, 0:4] #every channel get 4 value
TypeError: 'NoneType' object is not subscriptable
我训练自己的voc权重也不行QAQ 但报错跟你不一样
Traceback (most recent call last):
File "D:/pythonProject3/yolox-deepsort-main2/demo.py", line 62, in
main()
File "D:/pythonProject3/yolox-deepsort-main2/demo.py", line 12, in main
det = Detector()
File "D:\pythonProject3\yolox-deepsort-main2\AIDetector_pytorch.py", line 45, in init
self.init_model()
File "D:\pythonProject3\yolox-deepsort-main2\AIDetector_pytorch.py", line 74, in init_model
model.load_state_dict(ckpt["model"])
File "D:\Develop\python\Anaconda3\envs\Pychramproject2\lib\site-packages\torch\nn\modules\module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for YOLOX:
size mismatch for head.cls_preds.0.weight: copying a param with shape torch.Size([1, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 128, 1, 1]).
size mismatch for head.cls_preds.0.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.1.weight: copying a param with shape torch.Size([1, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 128, 1, 1]).
size mismatch for head.cls_preds.1.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.2.weight: copying a param with shape torch.Size([1, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 128, 1, 1]).
size mismatch for head.cls_preds.2.bias: copying a param with shape torch.Size([1]) from checkpoint, the shape in current model is torch.Size([80]).