Open Blankeos opened 1 year ago
Apparently, the solution on the article was right. But for some reason, when I edit on Colab and save, it doesn't actually get saved. So I had to already have changed coco_eval.py
before I even cloned it on my Colab runtime.
I basically did the same thing, but this time I downloaded the training scripts from PyTorch and created my own repository to clone:
coco_eval.py
__init__
for iou_type in iou_types:
- self.coco_eval[iou_type] = COCOeval(coco_gt, iouType=iou_type)
+ coco_eval = COCOeval(coco_gt, iouType=iou_type)
+ coco_eval.params.kpt_oks_sigmas = np.array([.5, .5, .5, .5]) / 10.0 # 4 keypoints
+ self.coco_eval[iou_type] = coco_eval
!git clone https://github.com/<username>/<repo-name>.git
%cd <repo-name>
Thanks, man. I've been struggling with this error. Apparently, making direct changes to the file in Colab doesn't update it. weird.
First off, thanks for the tutorial! You're a real lifesaver. I'm trying to get
evaluate
to work at the moment. I havenum_keypoints=4
. The model trains smoothly when I just comment outevaluate
during training, but I need to evaluate the performance now so I'm trying to get that to work. I did what you instructed in your tutorial:But I'm still getting the same error:![image](https://user-images.githubusercontent.com/38070918/201962412-d054fe21-83a9-4df1-ab7b-a722e4909aec.png)
ValueError: operands could not be broadcast together with shapes (4,) (17,)
Hoping you can help me with this! 🤞