Giter Site home page Giter Site logo

Comments (7)

varunagrawal avatar varunagrawal commented on August 18, 2024

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.

varunagrawal avatar varunagrawal commented on August 18, 2024

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.

gmyers18 avatar gmyers18 commented on August 18, 2024

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.

gmyers18 avatar gmyers18 commented on August 18, 2024

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.

varunagrawal avatar varunagrawal commented on August 18, 2024

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.

varunagrawal avatar varunagrawal commented on August 18, 2024

I have updated the package to allow BBox2D to accept negative values. New version is 0.9.1.

from bbox.

gmyers18 avatar gmyers18 commented on August 18, 2024

Looks great. Thanks!

from bbox.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.