Comments (7)
Ah good catches. It doesn't make sense to have negative values for x/y values (or does it?) since you would want to clamp that to [0, H/W)
for it to be meaningful for any object detection system.
I can definitely fix the constructor to put in the required checks though. Would you have any thoughts on whether allowing negative x/y values would make sense?
from bbox.
Also, word of caution, currently the way I compute x2 is x2 = x1+w-1
, but after talking to detection experts, they all agree that the 1-offset should be a non-artifact and x2 should be computed as x2 = x1 + w
.
I am going to thus change the API behavior in the near future (hence why this project is still in beta!) and publish a v1 once I see things follow the modern practices regarding bounding boxes.
from bbox.
From my perspective allowing negative coordinates will allow the library to be more flexible as a means for generically describing a region of interest with a bounding box.
I think the need to clip to scene/image bounds is a very common use case with bounding boxes, but it is ultimately application dependent. But other applications might be interested in maintaining state for regions that are fully or partially out of scene, where there is information that you don't want to lose in the fact that something is (partially) out of scene. The application itself would then need to handle any sort of clipping downstream if it needs things to be fully in-bounds for visualization, etc.
from bbox.
Thanks for the head's up. I think the -1 offset is a fairly common point of disagreement when it comes to bounding boxes. FWIW I think the way you have it currently with the -1 is correct, but I have certainly seen it the other way too.
from bbox.
I can't argue against your point for negative values. Thank you for the feedback, since this will definitely make bbox more flexible.
from bbox.
I have updated the package to allow BBox2D
to accept negative values. New version is 0.9.1.
from bbox.
Looks great. Thanks!
from bbox.
Related Issues (13)
- Publish package to PyPI HOT 1
- Error in jaccard_index_3d when using quaternions HOT 6
- Contains point HOT 1
- BBox2DList accepted types HOT 1
- GTSAM中 IMUKittiExampleGPS.m HOT 1
- Write documentation HOT 1
- Publish new release to PyPi HOT 2
- Add license file HOT 1
- Try/except blocks should specify the exception HOT 2
- Use __array__() method interface instead of numpy() method HOT 4
- error in jaccard_index_3d? HOT 2
- Publish updated package on PyPI to eliminate PIL dependency. HOT 3
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 bbox.