Michel-liu / GroupPose

[ICCV 2023] The official PyTorch code for Group Pose: A Simple Baseline for End-to-End Multi-person Pose Estimation
Apache License 2.0
79 stars 1 forks source link

UnboundLocalError: local variable 'cost_keypoints' referenced before assignment #15

Open qwinwin opened 1 month ago

qwinwin commented 1 month ago

crowdpose训练时经常报错:

File "/home/GroupPose/models/grouppose/matcher.py", line 91, in forward
    C = self.cost_class * cost_class + self.cost_keypoints * cost_keypoints + self.cost_oks * cost_oks
UnboundLocalError: local variable 'cost_keypoints' referenced before assignment

请问在if not Z_pred.sum() > 0:的情况下cost_keypoints或者说C应该如何赋值比较好?