Raspberry pi에서 YOLO model detection 사용하기

이한별·2022년 12월 9일
0

Raspberry pi 4b+에 yolov7을 사용하여 realtime object detection을 하려고 하였다.

그러나

yolov7 github를 clone하고
requirements.txt에 있는 관련 패키지들을 다 설치하였으나

illegal instruction (core dumped)

라는 에러가 떴다.


찾아보니
CPU랑 pytorch, torchvision의 버전이 맞지 않았던 것이다.
CPU 성능이 떨어지는 것...

그래서 pytorch와 torchvision의 버전을 downgrade해주었다.

requirements.txt의 버전 최소 조건보다는 크게 해야한다 적당히 버전 선택..ㅎ

pytorch version 아는 법

$ python3
>>import torch
>>print(torch.__version__)
>>import torchvision
>>print(torchvision.__version__)
$ pip install pytorch==1.8.0 torchvision==0.9.1

했더니 되었다..!



혹시 아래와 같은 에러가 뜬다면

openblas warning : detect openmp loop and this application may hang. please rebuild the library with use_openmp=1 option.

https://seonhooh-tumblr-com.translate.goog/post/139410807510/torch-openblas-warning?_x_tr_sl=ko&_x_tr_tl=en&_x_tr_hl=sr&_x_tr_pto=nui

참고하세요

profile
life is an egg

0개의 댓글