opencv / opencv-python

Automated CI toolchain to produce precompiled opencv-python, opencv-python-headless, opencv-contrib-python and opencv-contrib-python-headless packages.
https://pypi.org/project/opencv-python/
MIT License
4.51k stars 844 forks source link

cv2.TrackerGOTURN_create() Can't open "goturn.prototxt" in function 'ReadProtoFromTextFile' #403

Closed 0fine0 closed 4 years ago

0fine0 commented 4 years ago

I used opencv-python and opencv-contrib-python 4.2.0.34 which are installed by pip in an anaconda environment. When I used the tracker cv2.TrackerGOTURN_create(), goturn.prototxt can not be found. I download the required documents from https://github.com/opencv/opencv_extra/blob/c4219d5eb3105ed8e634278fad312a1a8d2c182d/testdata/tracking/ But I don't know where to put them. I try to put them in the folder /home/fine/anaconda3/lib/python3.6/site-packages/cv2/data.

skvark commented 4 years ago

Please read the installation guide: https://github.com/skvark/opencv-python#installation-and-usage

Select the correct package for your environment:

There are four different packages (see options 1, 2, 3 and 4 below) and you should SELECT ONLY ONE OF THEM.

You have installed both opencv-python and opencv-contrib-python. Do not do that, it will not work.

About the file issue: cv2/data is not the correct place for those files. This is a issue tracker, not a generic QA forum. Please ask your question elsewhere as stated in the issue template.