기타
[파이썬]NotImplementedError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend
Krapboss
2023. 11. 30. 00:30
문제의 원인은 Yolo v5의 패키지를 통째로 다운 받아 사용하던 와중에 문제로 발생한 것,
내가 해결한 방법
아래에서 나온 해결 방안을 토대로 Torchvision의 버전이 맞지 않아 발생한 것이라고 판단
Getting "NotImplementedError: Could not run 'torchvision::nms' with arguments from CUDA backend" despite having all necessary li
The full error: NotImplementedError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted durin...
stackoverflow.com
기존 torchvision 삭제
pip uninstall -r torch torchvision
torch도 삭제 가능
pip uninstall torch torch
yolo v5에 붙어있는 필수요소 설치
pip install -r requirements.txt
테스트[성공 함]
python detect.py --weights yolov5s.pt --source 0