简体   繁体   English

如何在 YOLO 中获取边界框的坐标?

[英]How to get the coordinates of a bounding box in YOLO?

I am trying to get the coordinates of a bounding box in YOLOv4.我正在尝试获取 YOLOv4 中边界框的坐标。 I followed the accepted answer provided here .我遵循了此处提供的公认答案。 But, even after editing the image.c file I can not see the BBox coordinates.但是,即使在编辑 image.c 文件后,我也看不到 BBox 坐标。 What am I doing wrong?我究竟做错了什么?

I am running YOLO on NVIDIA Jetson Nano on Ubuntu and using the terminal to run the following command:我在 Ubuntu 上的 NVIDIA Jetson Nano 上运行 YOLO,并使用终端运行以下命令:

$ ./darknet detector demo cfg/coco.data \
                      cfg/yolov4-416.cfg \
                      yolov4.weights \
                      -c 0

i had the same problem.我有同样的问题。 the problem is that answer works for dar.net pjreddie model. but i think you are using AlexeyAB model. if it is, you should edit image_opencv.cpp file in order to save your bounding box coordinates which is available in src folder.问题是答案适用于 dar.net pjreddie model。但我认为您使用的是AlexeyAB model。如果是,您应该编辑image_opencv.cpp文件以保存 src 文件夹中可用的边界框坐标。 dont forget to re- make dar.net after change.更改后不要忘记重新make dar.net。

Try to add -ext_output in the end.尝试在最后添加-ext_output

Just add -ext_output at the end command.只需在结束命令中添加-ext_output 即可 See below:见下文:

/darknet detector test data/folder_name/image_data.data cfg/yolov4_test.cfg backup/yolov4_train_last.weights data/test_data/test_image.jpg -thresh 0.25 -ext_output

Using this command you will get the coordinates in the log along with detected object.使用此命令,您将获得日志中的坐标以及检测到的 object。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在YOLO物体检测中获取边界框的坐标? - How to get the coordinates of the bounding box in YOLO object detection? 如何使用yolo3 keras显示边界框的坐标? - How to display the coordinates of the bounding box using yolo3 keras? 如何将 Yolo 格式的边界框坐标转换为 OpenCV 格式 - How to convert Yolo format bounding box coordinates into OpenCV format 如何将 2D 边界框像素坐标 (x, y, w, h) 转换为相对坐标(Yolo 格式)? - How to convert 2D bounding box pixel coordinates (x, y, w, h) into relative coordinates (Yolo format)? 如何获取dlib中dets的边界框坐标? - How to get the coordinates of bounding box for dets in dlib? 从 YOLO 边界框坐标中提取单独的图像 - Extracting separate images from YOLO bounding box coordinates 如何计算边界框坐标? - How to calculate bounding box coordinates? 如何获取特定边界框的像素坐标 - How do I get the pixel coordinates for a specific bounding box 如何获取整个文本周围的边界框坐标? - How to get bounding box coordinates around entire text? 如何从 YOLOv5 预测中得到 class 和边界框坐标? - How to get class and bounding box coordinates from YOLOv5 predictions?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM