C/C++教程

2021/7/23 运行 eval_voc.py 问题解决

本文主要是介绍2021/7/23 运行 eval_voc.py 问题解决,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

根据之前的问题  若是仅仅在 pycharm 运行 eval_voc.py,只能得到     Start Evaluation  的结果,如下图

 

 然后,程序中还有  Start Detection  部分。

经过 在线求解,多次尝试解决后。大佬给出建议。

Hello,

  1. Create a directory detection_result inside your project directory
  2. add --mode eval to your command for getting results. So, the command will look like this CUDA_VISIBLE_DEVICES=0 python3 eval_voc.py --weight_path weights/best.pt --gpu_id 0 --visiual data/ValImages --mode eval change --visiual to your image directory for test

 

conda 环境:YOLOv4-pytorch    

根据大佬在 C:\GitHub\test1 下建立 detection_result 文件

原作者命令:    python eval_voc.py --weight_path weight/best.pt --gpu_id 0 --visiual $DATA_TEST --eval --mode det       (无效)

修改后的命令:python eval_voc.py --weight_path weight/best.pt --gpu_id 0 --visiual data/test-date --mode eval

运行成功,得到预测的图像 文件detection_result,如下图

 

 PS:有的效果还是不太好,需改良(之后)。

 

接下来,得到 图。

 

这篇关于2021/7/23 运行 eval_voc.py 问题解决的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!