You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered issues with using the detection_box argument in the Video.analyze() function. With a little digging, I've found that self._crop(frame, detection_box) results in the following error:
This problem stems from the combination of a @staticmethod decorator and "self" as an input argument to the _crop() function, and can be resolved by removing the "self" input argument from the _crop function definition.
For the time being I've gotten around this with a monkey patch:
from fer import Video
Video._crop = lambda self, frame, _detection_box: frame[
_detection_box.get("y_min"): _detection_box.get("y_max"),
_detection_box.get("x_min"): _detection_box.get("x_max")]
The text was updated successfully, but these errors were encountered:
I've encountered issues with using the detection_box argument in the Video.analyze() function. With a little digging, I've found that self._crop(frame, detection_box) results in the following error:
{TypeError}_crop() missing 1 required positional argument: 'detection_box'
This problem stems from the combination of a @staticmethod decorator and "self" as an input argument to the _crop() function, and can be resolved by removing the "self" input argument from the _crop function definition.
For the time being I've gotten around this with a monkey patch:
The text was updated successfully, but these errors were encountered: