supervision
supervision copied to clipboard
FPSMonitor.__call__ warning
Search before asking
- [X] I have searched the Supervision issues and found no similar feature requests.
Question
I keep getting the following warning in my console when I run the code
SupervisionWarnings: __call__ is deprecated: FPSMonitor.callis deprecated and will be removed insupervision-0.22.0. Use FPSMonitor.fps instead
Here is the code
// inside the custom sink class
` def __init__(self, weights_path: str, zone_configuration_path: str, classes: List[int]):
self._model = YOLO(weights_path, task="segment")
self.fps_monitor = sv.FPSMonitor()
def on_prediction(self, result: dict, frame: VideoFrame) -> None:
self.fps_monitor.tick()
fps = self.fps_monitor
I tried this one as well in the on_prediction function fps = self.fps_monitor.fps() but still gettinig the warning.
What can I do to fix this?
My console is filled with this warning and I can't see any other log
supervision version : 0.21.0
Python: 3.11.8
Additional
No response
I'll look into it, thanks for letting us know.
Meanwhile, if it gets annoying, setting the environmental variable SUPERVISON_DEPRECATION_WARNING=0 should suppress those.
Yes setting the environment variable fixed it for me
import os
os.environ['SUPERVISON_DEPRECATION_WARNING'] = '0'
Hi @MubashirWaheed,
By any chance, could you confirm the issue still persists?
It was fixed in inference, and I can't find deprecated usage in supervision.
Closing this as it seems to be fixed.