10kinds-light-face-detector-align-recognition icon indicating copy to clipboard operation
10kinds-light-face-detector-align-recognition copied to clipboard

libfacedetect_align_module有问题,输出的向量尺寸错误

Open GrayKeee opened this issue 2 years ago • 4 comments

Traceback (most recent call last): File "10kinds-light-face-detector-align-recognition/libfacedetect_align_module.py", line 275, in drawimg, face_rois = libface_detect.detect(srcimg) File "10kinds-light-face-detector-align-recognition/libfacedetect_align_module.py", line 40, in detect dets = pb.decode(np.squeeze(loc, axis=0), np.squeeze(conf, axis=0)) File "10kinds-light-face-detector-align-recognition/libfacedetection/priorbox.py", line 72, in decode self.priors[:, 2:4]*np.exp(loc[:, 2:4]*self.variance).reshape((2,1)) ValueError: operands could not be broadcast together with shapes (4385,0) (2,)

GrayKeee avatar Oct 17 '22 11:10 GrayKeee

具体来说就是,loc向量是一个n,2维的,而非如注释里所说,是一个n,4维的向量

GrayKeee avatar Oct 17 '22 11:10 GrayKeee

而这也已经是这几个脚本里面报错最不邪乎,最有可能跑起来的一个了

GrayKeee avatar Oct 17 '22 11:10 GrayKeee

而这也已经是这几个脚本里面报错最不邪乎,最有可能跑起来的一个了

请问这个如何修改

MachineLearning11 avatar Nov 29 '22 08:11 MachineLearning11

我做了如下修改,此处不报错,可视化效果正常 修改如下行数:

loc, conf = self.net.forward(self.net.getUnconnectedOutLayersNames())

conf,loc = self.net.forward(self.net.getUnconnectedOutLayersNames()) 输出反了

guofenggitlearning avatar Sep 21 '23 02:09 guofenggitlearning