# cv::error: (-215:断言失败) !goturnModel.empty()，函数'init'

- **ID:** `opencv/tracker-goturn-initialization-failed`
- **领域:** opencv
- **类别:** runtime_error
- **错误码:** `-215`
- **验证级别:** ai_generated
- **修复率:** 82%

## 根因

GOTURN跟踪器需要预训练模型文件（prototxt和caffemodel），这些文件缺失或未正确加载。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 4.5.3 | active | — | — |
| 4.6.0 | active | — | — |
| 4.7.0 | active | — | — |

## 解决方案

1. ```
   从https://github.com/opencv/opencv_extra/tree/master/testdata/tracking下载GOTURN模型文件（goturn.prototxt和goturn.caffemodel），放在当前工作目录或设置OPENCV_GOTURN_MODEL_PATH环境变量。
   ```
2. ```
   如果无法下载GOTURN模型，使用其他跟踪器（如CSRT或KCF）。
   ```

## 无效尝试

- **Reinstalling OpenCV without downloading GOTURN model** — GOTURN model is not bundled with OpenCV; must be downloaded separately from opencv_extra or official repository. (90% 失败率)
- **Setting cv2.TrackerGOTURN_create() with no arguments** — The function does not accept model paths; model must be placed in a specific location or set via environment variable. (70% 失败率)
