Akriti Anand
Akriti Anand

Reputation: 186

AttributeError: module 'cv2.dnn' has no attribute 'NMSBoxesRotated'

I have a pretty straightforward code for text detection in python. But it is throwing an error (line 137) on running from command line.

cv.dnn.NMSBoxes works fine but it fails to recognise cv.dnn.NMSBoxesRotated.

Here is the error:

indices = cv.dnn.NMSBoxesRotated(boxes, confidences, onfThreshold, nmsThreshold)
AttributeError: module 'cv2.dnn' has no attribute 'NMSBoxesRotated'

If anyone could point out what I'm missing, I'll be grateful. Thanks.

Upvotes: 2

Views: 9999

Answers (1)

alexander-liu7
alexander-liu7

Reputation: 201

pip install --user  opencv-python --upgrade

This command works for me, Thanks @JustinEzequiel

My OpenCV version is :

>>> cv2.__version__
'4.1.1'

This error is gone when I upgrade my opencv to 4.1.1

Upvotes: 3

Related Questions