Boostcamp AI tech 3기

cannot import name '_registerMatType' from 'cv2.cv2'

mcdn 2022. 5. 27. 14:39
반응형

pytorchvision, pytorch 버전 맞추기 

https://stackoverflow.com/questions/70537488/cannot-import-name-registermattype-from-cv2-cv2

 

cannot import name '_registerMatType' from 'cv2.cv2'

I got below error message when I run model_main_tf2.py on Object Detection API: Traceback (most recent call last): File "/content/models/research/object_detection/model_main_tf2.py", li...

stackoverflow.com

 

만약 두 라이브러리 opencv-python이랑 opencv-python-headless가 버전이 다르면 생길 수도 있다. 

 opencv-python(4.1.2.30) does not match opencv-python-headless(4.5.5.62)

 

내 경우에는 4.4.0.46 opencv-python이어서 

pip uninstall opencv-python-headless

pip install opencv-python-headless==4.4.0.46

을 진행하니까 해결됨

반응형