songwsx / person_search_demo

利用YOLOv3结合行人重识别模型,实现行人的检测识别,查找特定行人
MIT License
531 stars 135 forks source link

运行search.py报错,显示'Tensor' object has no attribute 'append' #27

Closed xiaolong73 closed 2 years ago

xiaolong73 commented 2 years ago

root@container-a69811b03c-c012400e:~/FindPeople# python3 search.py Namespace(cfg='/root/FindPeople/Yolov3SPP/cfg/my_yolov3.cfg', conf_thres=0.1, data='/root/FindPeople/Yolov3SPP/data/my_data.data', dist_thres=1.0, fourcc='mp4v', half=False, images='/root/FindPeople/data/samples', img_size=416, nms_thres=0.4, output='output', query='/root/FindPeople/query', webcam=False, weights='/root/FindPeople/weights/yolov3spp-voc-512.pt') => Market1501 loaded Dataset statistics:

subset | # ids | # images | # cameras

train | 751 | 12936 | 6 query | 750 | 3368 | 6 gallery | 751 | 15913 | 6

Loading pretrained ImageNet model...... torch.Size([128, 2048]) The query feature is normalized torch.Size([128, 2048]) Traceback (most recent call last): File "search.py", line 259, in detect(opt.cfg, File "search.py", line 87, in detect query_feats.append(feat) AttributeError: 'Tensor' object has no attribute 'append'