opencv-python icon indicating copy to clipboard operation
opencv-python copied to clipboard

module 'cv2.cv2' has no attribute 'TrackerDaSiamRPN_Params' with opencv-python 4.5.2.54

Open tshh opened this issue 5 years ago • 1 comments

Expected behaviour

python tracker.py --input ~/f3a/f3a-part1.mp4 --tracker_algo dasiamrpn --dasiamrpn_net ~/dasiamrpn --dasiamrpn_kernel_r1 ~/dasiamrpn --dasiamrpn_kernel_cls1 ~/dasiamrpn

dasiamrpn network, kernel_r1,kernel_cls1 downloaded as instructed.

Actual behaviour

Traceback (most recent call last): File "tracker.py", line 132, in App(args).run() File "tracker.py", line 85, in run tracker = self.initializeTracker(image, trackerAlgorithm) File "tracker.py", line 50, in initializeTracker params = cv.TrackerDaSiamRPN_Params() AttributeError: module 'cv2.cv2' has no attribute 'TrackerDaSiamRPN_Params'

Steps to reproduce

  • example code
  • operating system
  • ubuntu 18.04
  • architecture (e.g. x86)
  • amd64
  • opencv-python version
  • Package Version

certifi 2021.5.30 numpy 1.20.3 opencv-python 4.5.2.54 pip 21.1.2 setuptools 52.0.0.post20210125 wheel 0.36.2

Issue submission checklist
  • [ ] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)

    • [ ] I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
    • [ ] The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • [ ] I'm using the latest version of opencv-python

tshh avatar Jun 23 '21 03:06 tshh

Because TrackerDaSiamRPN (https://github.com/opencv/opencv/pull/20036) is targeted to 4.5.3 release (not released yet):

opencv-python 4.5.2.54

You need to build package from the latest source code.

alalek avatar Jun 23 '21 09:06 alalek