-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bounding box #219
Comments
I just want to confirm the need for the bounding box info in the observations.csv table. I guess the format is rather secondary, as long as it is defined, because you can easily transform the coordinates. |
Discussed with @kbubnicki
|
I recommend the YOLO format to be used. |
@kbubnicki for Agouti, we would like if the bounding box field could also support the [x,y] position of animals. I guess that should be possible in yolo format ( |
@danstowell in reply to #314 (comment), if you want to classify a media file containing 3 sparrows with bounding boxes, you would have the following 3 observations:
|
Alternatively, we could store a bounding box data in 4 separate columns, thus enforcing exactly one bounding box per observation row:
@danstowell I remember your comment about storing structured data within a CSV cell. What do you think? |
The format would be: [
{
"name": "bboxX",
"description": "The relative X coordinate of a bounding box center, normalized to the image width.",
"type": "number",
"constraints": {
"required": false,
"minimum": 0,
"maximum": 1
},
"example": 0.5
},
{
"name": "bboxY",
"description": "The relative Y coordinate of a bounding box center, normalized to the image height.",
"type": "number",
"constraints": {
"required": false,
"minimum": 0,
"maximum": 1
},
"example": 0.5
},
{
"name": "bboxWidth",
"description": "The relative width of a bounding box, normalized to the image width.",
"type": "number",
"constraints": {
"required": false,
"minimum": 0,
"maximum": 1
},
"example": 0.5
},
{
"name": "bboxHeight",
"description": "The relative height of a bounding box, normalized to the image height.",
"type": "number",
"constraints": {
"required": false,
"minimum": 0,
"maximum": 1
},
"example": 0.5
}
] It is YOLO format (also suggested by @ddachs ). The advantage of this format (i.e. coordinates of the center instead of e.g. upper-left corner) is that |
I like that approach. |
Yes, this is indeed a bit clearer. I wasn't planning to comment on that aspect though, because I don't know which of those two options (i.e. single compound column, or separated into columns) will be easier for your target users to produce/consume. If it matches YOLO format then that's an argument in support of it. Within AudioVisual Core we specified something similar except it was a top-left corner. I rather wish the centrepoint had been an option we considered, since it has some handy properties. (I note also that in AC, zero-sized rectangles are explicitly disallowed, though zero-sized circles are to be used instead! So that's compatible.) |
Thanks @danstowell! Given that AudioVisual Core adopted top-left corner we might consider that too ... so we can reference the terms?
@danstowell @kbubnicki Or would you advise against that? Note: the advantage to split into columns is that we can write easier validation (e.g. x should be between 0 and 1). |
@danstowell @baskaufs I'd like to know how we should reference the AC terms and how important the AC For example, our
But we might allow 0 widths, which contracts with the notes of http://rs.tdwg.org/ac/terms/widthFrac:
Is our |
Update based on #323
|
@peterdesmet Cool. Prior to adopting the AC terms, we looked at a number of systems for defining bounding boxes. Most (nearly all?) had 0,0 as the upper left corner. So following that convention simplifies the conversion to other systems. |
See discussion in #203. Best solution was to add bounding box as a property of the observation. What isn't defined is the expected format.
The text was updated successfully, but these errors were encountered: