PaddleDetection icon indicating copy to clipboard operation
PaddleDetection copied to clipboard

使用higherHRNet的config编写问题

Open ChenjieXu opened this issue 3 years ago • 3 comments

问题确认 Search before asking

  • [X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

sigma都修改过了。我的数据集没有旋转对应关系,我config里面是这么设置的flip_perm: &flip_perm [] 但是eval的时候会报错 ValueError: (InvalidArgument) The flip Op's Input Variable X contains uninitialized Tensor. [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] (at /paddle/paddle/fluid/framework/operator.cc:2004) [operator < flip > error]

我看下来应该是旋转这边的问题。试过设置KeyPointFlip: flip_prob: 0,也没有用,请问应该如何设置?

ChenjieXu avatar Sep 08 '22 03:09 ChenjieXu

这个flip是paddle的算子,你看下哪一个算子使用了flip但是输入有问题的

wangxinxin08 avatar Sep 08 '22 04:09 wangxinxin08

[09/08 11:33:06] ppdet.utils.checkpoint INFO: Finish loading model weights: output/higherhrnet_hrnet_w32_512_2/model_final.pdparams Traceback (most recent call last): File "tools/eval.py", line 152, in main() File "tools/eval.py", line 148, in main run(FLAGS, cfg) File "tools/eval.py", line 106, in run trainer.evaluate() File "/ssd/xuchenjie/projects/xai_images/AIKeypoint/PaddleDetection/ppdet/engine/trainer.py", line 549, in evaluate self._eval_with_loader(self.loader) File "/ssd/xuchenjie/projects/xai_images/AIKeypoint/PaddleDetection/ppdet/engine/trainer.py", line 523, in _eval_with_loader outs = self.model(data) File "/ssd/xuchenjie/data/conda/envs/pp112/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 930, in call return self._dygraph_call_func(*inputs, **kwargs) File "/ssd/xuchenjie/data/conda/envs/pp112/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 915, in _dygraph_call_func outputs = self.forward(*inputs, **kwargs) File "/ssd/xuchenjie/projects/xai_images/AIKeypoint/PaddleDetection/ppdet/modeling/architectures/meta_arch.py", line 75, in forward outs.append(self.get_pred()) File "/ssd/xuchenjie/projects/xai_images/AIKeypoint/PaddleDetection/ppdet/modeling/architectures/keypoint_hrhrnet.py", line 116, in get_pred res_lst = self._forward() File "/ssd/xuchenjie/projects/xai_images/AIKeypoint/PaddleDetection/ppdet/modeling/architectures/keypoint_hrhrnet.py", line 93, in _forward for o in outputs File "/ssd/xuchenjie/projects/xai_images/AIKeypoint/PaddleDetection/ppdet/modeling/architectures/keypoint_hrhrnet.py", line 93, in for o in outputs File "/ssd/xuchenjie/data/conda/envs/pp112/lib/python3.7/site-packages/paddle/tensor/manipulation.py", line 466, in flip return _C_ops.flip(x, "axis", axis) ValueError: (InvalidArgument) The flip Op's Input Variable X contains uninitialized Tensor. [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] (at /paddle/paddle/fluid/framework/operator.cc:2004) [operator < flip > error] 这是我的输出,请问怎么看?

ChenjieXu avatar Sep 08 '22 05:09 ChenjieXu

把配置文件里higherHRNet 的eval_flip改成False

zhiboniu avatar Sep 08 '22 06:09 zhiboniu