tensorboy / centerpose

Push the Extreme of the pose estimation
MIT License
237 stars 45 forks source link

error when run val_dataset.run_eval(preds, cfg.OUTPUT_DIR) #18

Closed murdockhou closed 4 years ago

murdockhou commented 4 years ago

I have test the train process using first 100 samples of MSCOCO. The cmd of training is

 python3 train.py --cfg ../experiments/mobilenetv3_512x512.yaml

and when run mAP calculate in line 121 of train.py, I got an error like this: Selection_207 but when I run

python3 evaluate.py --cfg ../experiments/mobilenetv3_512x512.yaml --NMS false --TESTMODEL ../models/model_zoo/mobilenetV3_1x.pth

It's ok and can output result. image

Update: Maybe change code like this will be work in here

dets_out = np.concatenate(
    [detection[1] for detection in dets_out], axis=0).astype(np.float32)           
if self.cfg.TEST.NMS or len(self.cfg.TEST.TEST_SCALES) > 1:
    soft_nms_39(dets_out, Nt=0.5, method=2)
dets_out = dets_out.tolist()
# results[batch['meta']['img_id'].cpu().numpy()[0]] = dets_out[0]
results[batch['meta']['img_id'].cpu().numpy()[0]] = dets_out
tensorboy commented 4 years ago

Hi @murdockhou

The bug fixed and it should be work now.

Thanks for the comments and suggestions. :)

murdockhou commented 4 years ago

@tensorboy I pull the lateset repo and get the same error too. Please check this, I only change .yaml file and change images = self.coco.getImgIds() code in coco_hp.py into images = self.coco.getImgIds()[:100] for only test. And get the same error as before mentioned.

tensorboy commented 4 years ago

Sure, will double check tmr!

On Mon, Jan 6, 2020 at 6:19 PM Shiwei Hou notifications@github.com wrote:

@tensorboy https://github.com/tensorboy I pull the lateset repo and get the same error too. Please check this, I only change .yaml file and change images = self.coco.getImgIds() code in coco_hp.py into images = self.coco.getImgIds()[:100] for only test. And get the same error as before mentioned.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/tensorboy/centerpose/issues/18?email_source=notifications&email_token=AEDERP3KK3VJTMUGYU54UDTQ4PREBA5CNFSM4KB6LJBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIHORWA#issuecomment-571402456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDERPZLQHBFWOZ7EMILFRLQ4PREBANCNFSM4KB6LJBA .

murdockhou commented 4 years ago

@tensorboy Hi, I find you have changed results[batch['meta']['img_id'].cpu().numpy()[0]] = dets_out[0] to results[batch['meta']['img_id'].cpu().numpy()[0]] = {1:dets_out[0]} in lib/trains/multi_pose.py. Which difference is if I write like this

dets_out = np.concatenate( 
    [detection[1] for detection in dets_out], axis=0).astype(np.float32) 

results[batch['meta']['img_id'].cpu().numpy()[0]] = dets_out

And by the way, can I get your trian log.txt file about mobilenetv3 backbone network, I start to train this using mobilenetv3 but the mAP of the first 10 epochs is too small.