# 进入site-packages目录 cd /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages # 建立软链接 sudoln -s /usr/local/Cellar/opencv/4.2.0_1/lib/python3.7/site-packages/cv2/python-3.7/cv2.cpython-37m-darwin.so cv2.so
依赖包
我们这时测试一下OpenCV是否可用
1 2 3 4 5
>>> import cv2 ModuleNotFoundError: No module named 'numpy' Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: numpy.core.multiarray failed to import
缺少numpy
1 2
# 安装numpy pip3 install --upgrade numpy
成功
1 2 3 4 5 6
$ python3 Python 3.7.4 (v3.7.4:e09359112e, Jul 8 2019, 14:54:52) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license"for more information. >>> import cv2 >>>
真不该手贱接下这个项目,完全没有头绪!
准确率
目前检测 VisDrone 数据集的正确率已经比较高了
mAP
-------The end of this article Thank you for your reading-------