xiaochus / Vehicle_Tracking

OpenCV 3 & Keras implementation of vehicle tracking with video data.
MIT License
117 stars 41 forks source link

运行问题Attribute Error #2

Closed TPP000 closed 6 years ago

TPP000 commented 6 years ago

您好,谢谢您的代码分享。 我运行的时候出现了些问题想询问一下。 我用的设置是 Python 3.6 ,opencv 3.4+contrib(网上实在没找到3.2配套py3.6的版本),Keras (1.2.2),tensorflow (1.4.0),tensorflow-gpu (1.4.0),CUDA 8.0,cudnn 6。 运行python track.py --file "car.flv"的时候出现 AttributeError: module 'cv2' has no attribute 'Tracker_create'。想请教一下可能是什么原因。

xiaochus commented 6 years ago

@TPP000 opencv 3.4 contrib的API进行了改动,你可以尝试使用下面的修改:

import cv2 as cv

tracker = cv.TrackerKCF_create()
TPP000 commented 6 years ago

非常谢谢,改了以后可以运行了