Comments (3)
Thank you for more detailed information.
- Yolo_mark works correctly
x
andy
aren't top-left corner.x
andy
are center of bounded box in the Yolo:Lines 306 to 309 in d0f23d8
- If you use
cv::Rect(x_yolo * width_frame, y_yolo * height_frame, w_yolo * width_frame, h_yolo * height_frame);
then OpenCV draws rectangle with top-left corner atx_yolo * width_image
,y_yolo * height_frame
that isn't correct.
You should use cv::Rect((x_yolo - w_yolo/2) * width_frame, (y_yolo - h_yolo/2) * height_frame, w_yolo * width_frame, h_yolo * height_frame);
- this is correct.
See how it is calculated: https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects
Where:
<object-class>
- integer number of object from0
to(classes-1)
<x> <y> <width> <height>
- float values relative to width and height of image, it can be equal from 0.0 to 1.0- for example:
<x> = <absolute_x> / <image_width>
or<height> = <absolute_height> / <image_height>
- atention:
<x> <y>
- are center of rectangle (are not top-left corner)
from yolo_mark.
Can you provide some more information, what kind of error did you get?
Show example with image and label, that has biased relative coords.
from yolo_mark.
this is what i get when draw the rect
x = x_yolo * width
y = y_yolo * height
width_obj = w_yolo * width_frame
height_obj = h_yolo * height_frame
seems to me that yolo_mark add some value to original width and height and then calculates relative coordinates, but it is strange for sure that i am first who found this out.
also one can see this difference with naked eyes comparing txt file coordinates and truth without even drawing any rectangles.
0 0.475781 0.663194 0.064062 0.345833
If you will not answer I am going to view code tomorrow.
thanks a lot for your open code and all efforts, its hard to overappreciate how much Redmon's darknet and your repo helps me in my learning progress and work.
from yolo_mark.
Related Issues (20)
- Not an issue: EXCELLENT WORK ALEXEY!
- AlexeyAB I need help Can't start training Can anyone help me??? HOT 1
- getting Nan Value while training yolov4 on custom data HOT 1
- polygon labels
- The classifier model be trained in darknet can be called in API?
- Can we review annotations (annotated images using Yolo-mark) using other tools? HOT 1
- German Traffic Sign Detection Benchmark - Annotations
- German Traffic Sign Detection Benchmark - Annotations Issue
- Which files does make edit?
- YOLOv4 annotations bounding box HOT 1
- CUDA out of memory error yolov4 for coco 2017 dataset HOT 1
- no txt files for corresponding image after labeling
- HELP! How to customize my own new button Settings? HOT 2
- Help... cmake error
- How to increase the FPS in real-time streaming?
- Correct Label format
- any macosx version? HOT 1
- What value should yolo4 be set to?
- libtiff update broken the package HOT 1
- Installation on windows 10, visual studio 2015
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolo_mark.