카테고리 없음

산란계 달걀 tracking 코드 cpu로 실행방법

dohyeon2 2022. 9. 22. 21:52

detect_track_trails.py 코드 동작환경
python: 3.7.13
torch: 1.8.1+cpu
torchvision: 0.9.1+cpu

 

0. 가상환경 생성

conda create -n egg python=3.7.13

 

1. torch, torchvision 설치

# CPU only
pip install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

 

2. detect_track_trails.py 코드 수정

- 149 line의 use_cuda=True 에서 False로 변경 

- 159 line의 model = Darknet(cfg, imgsz).cuda 에서 model = Darknet(cfg,imgsz) 로 변경! 

.cuda를 지우면 된다!

 

3. CapVideo.py 코드 실행