alphacep / alphacep/vosk-api

Segmentation Fault Using Vosk with YOLOv7 on CUDA

Offen
#1,943 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
15.1k
Forks
1.8k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When working on a project using the Vosk and YOLOv7 vision model, I encountered a segmentation fault when attempting to load the YOLOv7 on a CUDA device.

I found that the segmentation fault only occurs when the `vosk` module is imported before the YOLOv7 model is loaded on CUDA. Loading YOLO on CPU prevents the error. Commenting out the Vosk import or putting it after model instantiation also avoids the issue.

---
### To reproduce:

1. Clone the YOLOv7 repository:
```bash
git clone https://github.com/WongKinYiu/yolov7.git
2. Download `yolov7.pt` using the link in the repo
3. Run the following python script:

```python
from vosk import Model, KaldiRecognizer
import sys
sys.path.append('./yolov7')
from models.experimental import attempt_load
model = attempt_load("path/to/yolov7.pt", "cuda")
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.