kinredon / Harmonious-Teacher

Official implementation of the CVPR 2023 paper "Harmonious Teacher for Cross-domain Object Detection"
Apache License 2.0
26 stars 3 forks source link

How to test the best checkpoint again? #3

Closed EdwardDo69 closed 1 year ago

EdwardDo69 commented 1 year ago

Thank you for your attribution. I run code completely and get the same accuracy with your paper. But I want to test the best checkpoint again by “pods_test” but it gets “0, 0 ,0” for “AP, AP50, AP75’’. I think I run the code not exactly. Could you tell me how to test the checkpoint again?

I run : “pods_test --num-gpus 4 --dir . --dist-url "tcp://127.0.0.1:29007" MODEL.WEIGHTS /mnt/work2/phat/CODE/Harmonious-Teacher/ht_c2f/log/ht_c2f/best.pth”

I got:

2023-07-28 14:22:18 | INFO | cvpods.evaluation.evaluator:142 - Inference done 11/125. 0.0598 s / sample. ETA=0:00:07 2023-07-28 14:22:23 | INFO | cvpods.evaluation.evaluator:142 - Inference done 79/125. 0.0524 s / sample. ETA=0:00:03 2023-07-28 14:22:28 | INFO | cvpods.evaluation.evaluator:154 - Total inference time: 0:00:09.710854 (0.080924 s / sample per device, on 4 devices) 2023-07-28 14:22:28 | INFO | cvpods.evaluation.evaluator:160 - Total inference pure compute time: 0:00:06 (0.052108 s / sample per device, on 4 devices) 2023-07-28 14:22:28 | INFO | cvpods.evaluation.pascal_voc_evaluation:86 - Evaluating foggy_val using 2007 metric. Note that results do not use the official Matlab API. 2023-07-28 14:22:33 | INFO | cvpods.evaluation.pascal_voc_evaluation:122 - Evaluation results for bbox:

AP AP50 AP75
0.000 0.000 0.000

2023-07-28 14:22:33 | INFO | cvpods.evaluation.pascal_voc_evaluation:124 - Evaluation results for bbox (per-category):

person rider car truck bus train motorcycle bicycle
0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

2023-07-28 14:22:33 | INFO | cvpods.engine.runner:398 - Evaluation results for foggy_val in csv format: 2023-07-28 14:22:33 | INFO | cvpods.evaluation.testing:26 - copypaste: Task: bbox 2023-07-28 14:22:33 | INFO | cvpods.evaluation.testing:27 - copypaste: AP,AP50,AP75 2023-07-28 14:22:33 | INFO | cvpods.evaluation.testing:28 - copypaste: 0.0000,0.0000,0.0000

Thank you.!

kinredon commented 1 year ago

It seems that the model does not be initialized correctly. Can you provide all the logs of testing? Or you can try to evaluate the model using one GPU, i.e., set the --num-gpus 1

EdwardDo69 commented 1 year ago

Thank you. it is working.