[BUG] Bbox coordinate mismatch in hub visualization
See original GitHub issue🐛🐛 Bug Report
⚗️ Current Behavior
In Hub documentation, BBox is defined as tensorflow’s style of normalized coordinate in [ymin, xmin, ymax, xmax]. But when I want to visualize it in app.activeloop.ai, the bbox was very small at the top-left corner.
Input Code
h, w, c = img.shape
box = np.array([y1/h, x1/w, y2/h, x2/w])
Expected behavior/code The bbox should be in the same encoding type as in the dataset and hub visualizer
⚙️ Environment
Python
version(s): 3.6.9- Google Colab
🧰 Possible Solution
After several tests, PASCAL VOC’s style of unnormalized [xmin, ymin, xmax, ymax] is the solution to correctly visualize the bbox.
box = np.array([x1, y1, x2, y2])
🖼 Additional context/Screenshots
A. Using Hub’s style [ymin, xmin, ymax, xmax] small red dot at the top corner
B. Using Pascal’s stye [xmin, ymin, xmax, ymax] with segmentation too
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
Top Results From Across the Web
[BUG] Bbox coordinate mismatch in hub visualization - Python Hub
In Hub documentation, BBox is defined as tensorflow's style of normalized coordinate in [ymin, xmin, ymax, xmax]. But when I want to visualize...
Read more >How to display 3D bounding box in real-time #314 - GitHub
@marcgpuig I think this is a bug, I'll post a new issue for it. ... 3D world coordinates to 2Dimages coordinates of the...
Read more >Coordinate Mismatch Error - Intergraph CADWorx & Analysis
Hello, I am continuously getting a coordinate mismatch error when trying to run an analysis. I've rechecked all data entry, and even deleted ......
Read more >Recently Active 'coordinate-system' Questions
I'm using Python to map match a given trajectory to a real lane of a road. However, the match is done in a...
Read more >PROJ coordinate transformation software library - GitHub
PROJ coordinate transformation software library, Release 9.1.1. 2.3.2 Bug fixes. • Use CMAKE_INSTALL_MANDIR to override default (#3081).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Diveafall can you take a look at this?
Yes I can!
You can use both but you have to choose the datatype in the visualizer app, but the official documentation uses normalized [xmin, ymin, xmax, ymax]
You can use the **unnormalized [xmin, ymin, xmax, ymax] ** and set the bbox datatype with Basic [xmin, ymin, xmax, ymax] (the first option)
You can also use the Tensorflow’s version of **normalized [ymin, xmin, ymax, xmax] ** and set the bbox datatype with the Tensorflow Bounding Box (third option).
The second option is unusual for me. It only works with unnormalized bbox with a format of:
I’m not sure why I have to shift y coordinate. Maybe @Diveafall or @AbhinavTuli can check it out.
I think another good option for a bounding box encoding are:
I’m sorry for closing this issue without testing it because I think that is enough for me. I should have tested it first before closing this issue, Feel free to open the issue again!