-215
opencv
runtime_error
ai_generated
true
cv::error: (-215:断言失败) !goturnModel.empty(),函数'init'
cv::error: (-215:Assertion failed) !goturnModel.empty() in function 'init'
ID: opencv/tracker-goturn-initialization-failed
82%修复率
88%置信度
1证据数
2023-09-20首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 4.5.3 | active | — | — | — |
| 4.6.0 | active | — | — | — |
| 4.7.0 | active | — | — | — |
根因分析
GOTURN跟踪器需要预训练模型文件(prototxt和caffemodel),这些文件缺失或未正确加载。
English
GOTURN tracker requires a pre-trained model file (prototxt and caffemodel) that is either missing or not loaded correctly.
官方文档
https://docs.opencv.org/4.x/d2/d0a/tutorial_introduction_to_tracker.html解决方案
-
从https://github.com/opencv/opencv_extra/tree/master/testdata/tracking下载GOTURN模型文件(goturn.prototxt和goturn.caffemodel),放在当前工作目录或设置OPENCV_GOTURN_MODEL_PATH环境变量。
-
如果无法下载GOTURN模型,使用其他跟踪器(如CSRT或KCF)。
无效尝试
常见但无效的做法:
-
Reinstalling OpenCV without downloading GOTURN model
90% 失败
GOTURN model is not bundled with OpenCV; must be downloaded separately from opencv_extra or official repository.
-
Setting cv2.TrackerGOTURN_create() with no arguments
70% 失败
The function does not accept model paths; model must be placed in a specific location or set via environment variable.