如何在暗网中预测多图像txt?

问题描述 投票:0回答:1

在 Yolov7 中,我使用此代码来测试整个文件夹图像:

python test.py --save-txt --data data/coco.yaml --save-conf --conf 0.1 --weights yolov7_20240316best.pt --task test --name 0316conf01

现在我需要在yolov4中预测test.txt(包括所有图像路径)。

我尝试了这个命令但没有用:

darknet detector test data/obj.data cfg/yolo-obj.cfg backup/yolo-obj_best.weights -thresh 0.9 -dont_show data/test.txt result.txt
python machine-learning deep-learning yolo darknet
1个回答
1
投票
  1. 确保您使用的是最新的暗网存储库。 新的仓库是这个:https://github.com/hank-ai/darknet#table-of-contents

  2. 您提出的问题已在常见问题解答中解决。 请参阅此处的问题“如何针对多个图像运行”:https://www.ccoderun.ca/programming/yolo_faq/#json_output 过去推荐的命令是:

要处理图像列表 data/train.txt 并将检测结果保存到 result.json 文件中,请使用:

darknet detector test coco.data yolov4.cfg yolov4.weights -ext_output -dont_show -out result.json < test.txt

  1. 但就我个人而言,我更喜欢使用 DarkHelp CLI。 它也是开源的,提供了许多暗网中不存在的功能,并且更加强大。 例如,这就是您在 DarkHelp 中执行等效操作的方法:

DarkHelp --json --threshold 0.9 yolo-obj.cfg yolo-obj_best.weights yolo-obj.names --list test.txt

  1. 请确保阅读完整的常见问题解答:https://www.ccoderun.ca/programming/yolo_faq/

  2. 如果您有更多问题,请加入 Darknet/YOLO Discord 服务器:https://discord.gg/zSq8rtW

© www.soinside.com 2019 - 2024. All rights reserved.