deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
23.44k stars 5.42k forks source link

Running the build_eval_pack.py but got following error: Shape of unspecifie arg: pre_fc1_weight changed. This can cause the new executor to not share parameters with the old one. Please check for error in network.If this is intended, set partial_shaping=True to suppress this warning. #731

Closed Talgin closed 1 year ago

Talgin commented 5 years ago

I think pairs.txt was made according to your example pairs_label.txt. Could you tell me what's wrong with it? (in pairs_label.txt we have 500 of positive (name/name_0001.png name/name_0002.png 1, etc.) and 500 negative (name1/name1_0001.png name2/name2_0001.png 0, etc) like labels. Total of 1000 rows of such info.
Error code is here:
File "build_eval_pack.py", line 112, in im1 = get_norm_crop(path1) File "build_eval_pack.py", line 77, in get_norm_crop bbox, landmark = detector.detect(im, threshold=0.5, scales=[im_scale]) File "....\RetinaFace\retinaface.py", line 204, in detect self.model.forward(db, is_train=False) File "C:\Users\TengriLab\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\module\module.py", line 625, in forward self.reshape(new_dshape, new_lshape) File "C:\Users\TengriLab\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\module\module.py", line 472, in reshape self._exec_group.reshape(self._data_shapes, self._label_shapes) File "C:\Users\TengriLab\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\module\executor_group.py", line 396, in reshape self.bind_exec(data_shapes, label_shapes, reshape=True) File "C:\Users\TengriLab\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\module\executor_group.py", line 372, in bind_exec allow_up_sizing=True, **dict(data_shapes_i + label_shapes_i)) File "C:\Users\TengriLab\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\executor.py", line 455, in reshape ctypes.byref(handle))) File "C:\Users\TengriLab\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\base.py", line 252, in check_call raise MXNetError(py_str(_LIB.MXGetLastError())) mxnet.base.MXNetError: [10:18:24] C:\Jenkins\workspace\mxnet-tag\mxnet\src\executor\graph_executor.cc:858: Shape of unspecifie arg: pre_fc1_weight changed. This can cause the new executor to not share parameters with the old one. Please check for error in network.If this is intended, set partial_shaping=True to suppress this warning.

zhengjiawen commented 5 years ago

I meet the same problem, have you slove it?

Talgin commented 5 years ago

Hi @zhengjiawen, Could you explain what are you going to do? I do not remember what I was doing on that time, it was almost 4 months ago :) I think the problem was with setting right value for k-fold. You have to get 10-fold cross validation pairs, if I'm not mistaken. You can read #791, we discussed the problems of using and generating custom dataset in here :)

zhengjiawen commented 5 years ago

@Talgin Thanks a lot. When I set the model path and dataset correct, the problem is solved.