Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Train Halpe26 error #1192

Open
yicong1 opened this issue Dec 19, 2023 · 0 comments
Open

Train Halpe26 error #1192

yicong1 opened this issue Dec 19, 2023 · 0 comments

Comments

@yicong1
Copy link

yicong1 commented Dec 19, 2023


Traceback (most recent call last):
  File "./scripts/train.py", line 345, in <module>
    main()
  File "./scripts/train.py", line 302, in main
    gt_AP = validate_gt(m.module, opt, cfg, heatmap_to_coord)
  File "./scripts/train.py", line 243, in validate_gt
    res = evaluate_mAP(os.path.join(opt.work_dir, 'test_gt_kpt.json'), ann_type='keypoints', ann_file=os.path.join(cfg.DATASET.VAL.ROOT, cfg.DATASET.VAL.ANN), halpe=halpe)
  File "/home/research/AlphaPose/alphapose/utils/metrics.py", line 102, in evaluate_mAP
    cocoEval.evaluate()
  File "/home/research/miniconda3/envs/alphapose/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 149, in evaluate
    for imgId in p.imgIds
  File "/home/research/miniconda3/envs/alphapose/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 150, in <dictcomp>
    for catId in catIds}
  File "/home/research/miniconda3/envs/alphapose/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 222, in computeOks
    dx = xd - xg
ValueError: operands could not be broadcast together with shapes (26,) (136,) 
Exception ignored in: <alphapose.utils.metrics.evaluate_mAP.<locals>.NullWriter object at 0x7f67bb7e05d0>
AttributeError: 'NullWriter' object has no attribute 'flush'

I suppose I used the right config, but size (26,) (136,) can not match here, previous issue is (X)(17) can be solved by change the pycocotools file, I tried but it not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant