본문 바로가기
AI/pose with style

YOLO V7 - installation

by wenect 2023. 2. 16.

installation

os : windows 10

anaconda latest version

https://www.anaconda.com/

conda create -n yolov7 python=3.8

conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia

git clone https://github.com/WongKinYiu/yolov7.git

pip install -r requirements.txt

환경 구축과 기본 설치가 끝나면 확인을 한다

(yolov7) E:\AI\yolov7>conda --version
conda 22.11.1
(yolov7) E:\AI\yolov7>python --version
Python 3.8.16
(yolov7) E:\AI\yolov7>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:59:34_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0

(yolov7) E:\AI\yolov7>nvidia-smi

github에서 테스트를 위한이미지를 준비하고 적용모델을 받는다.

https://github.com/WongKinYiu/yolov7

 

GitHub - WongKinYiu/yolov7: Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors - GitHub - WongKinYiu/yolov7: Implementation of paper - YOLOv7: Trainable bag-of...

github.com

신경망의 가중치(weights) 파일을 다운로드 해야 합니다. 

weight가 적용된 소스들중에 하나를 선택하여 테스트 해본다

python detect.py --weights yolov7.pt --source ./man_cafe.jpg

이미지

https://raw.githubusercontent.com/tkeldenich/How_to_use_YOLOv7_Tutorial/main/man_cafe.jpg

 

결과

 

github에서 테스트를 위한 MS COCO를 받는다

python test.py --data data/coco.yaml --img 640 --batch 32 --conf 0.001 --iou 0.65 --device 0 --weights yolov7.pt --name yolov7_640_val

 

 

 

 

 

 

 

 

 

 

 

 

 

환경설정에서 최신을 사용하였으나 오류가 나는경우 테스트환경을 다른 것으로 해보기 바랍니다.

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

https://developer.nvidia.com/rdp/cudnn-download

 

(YOLOv7 논문) https://arxiv.org/pdf/2207.02696.pdf
(YOLOv7 코드) https://github.com/WongKinYiu/yolov7
(아나콘다) https://www.anaconda.com/

(CUDA Tookit) https://developer.nvidia.com/cuda-dow...
(MS VS 2022) https://visualstudio.microsoft.com/ko...

 

'AI > pose with style' 카테고리의 다른 글

Pose with style - dataset  (0) 2023.02.19
Pose with Style - installation  (4) 2023.02.17
Detection Human and garments  (0) 2023.02.15
Pose with Style - Test  (0) 2023.02.14
CIHP-PGN Multi-Person  (0) 2023.02.14

댓글