Git Product home page Git Product logo

Comments (5)

onuralpszr avatar onuralpszr commented on June 3, 2024 1

Hey, I'd like to take this one.

Task is yours, good luck :)

from supervision.

SkalskiP avatar SkalskiP commented on June 3, 2024 1

Hi @jeslinpjames, I have a simpler idea. Let's just check if frame_resolution_wh is set at the top of the function.

class PolygonZone:
  
    def __init__(
        self,
        polygon: npt.NDArray[np.int64],
        triggering_anchors: Iterable[Position] = (Position.BOTTOM_CENTER,),
        frame_resolution_wh: Optional[Tuple[int, int]] = None,
    ):
        if frame_resolution_wh is not None:
            ...

from supervision.

jeslinpjames avatar jeslinpjames commented on June 3, 2024

Hey, I'd like to take this one.

from supervision.

jeslinpjames avatar jeslinpjames commented on June 3, 2024

Hi @onuralpszr,

I have a doubt regarding handling the deprecation warning for frame_resolution_wh. Should I use the deprecated() function like this:

class PolygonZone:
  
    @deprecated("The `frame_resolution_wh` parameter is deprecated and will be removed in supervision-0.24.0. The mask resolution is now calculated automatically based on the polygon coordinates.")
    def __init__(
        self,
        polygon: npt.NDArray[np.int64],
        triggering_anchors: Iterable[Position] = (Position.BOTTOM_CENTER,),
        frame_resolution_wh: Optional[Tuple[int, int]] = None,
    ):

This will issue warnings whenever frame_resolution_wh is passed or not as a parameter. However, if I have to use the deprecated_parameter() function, it expects new_parameter as a string, so I can't set it to None. Could you advise me on what to do?

from supervision.

SkalskiP avatar SkalskiP commented on June 3, 2024

Feature implemented via #1109

from supervision.

Related Issues (20)

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.