MVIG-SJTU / AlphaPose

Real-Time and Accurate Full-Body Multi-Person Pose Estimation&Tracking System
http://mvig.org/research/alphapose.html
Other
8.06k stars 1.98k forks source link

Train Halpe26 error #1192

Open yicong1 opened 11 months ago

yicong1 commented 11 months ago

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.

dyf111 commented 3 months ago

hello,brother,did  you resolved this problem?tell me please!!!!thankk  you!!