[PYTHON] real-time-Personal-estimation (system introduction)

Introduction

Basically, https://github.com/S-mishina/Personal-estimation I will write a continuation of the program.

About the environment

Undecided </ s> windows10 python v3.8.3 virtualenv yolov5 https://github.com/ultralytics/yolov5 anaconda

About system introduction (About Yolo5 introduction)

python virtual environment I'm planning to use virtualenv for now after a lot of scrutiny. ⓵ Introduction of virtualenv

⓶ Introduction of virtual environment (1) Go to an appropriate directory

(2) Switching with PowerShell

./activate.ps1


Now you can enter the virtual environment. Referenced site https://www.python.jp/install/windows/virtualenv.html ⓷ Introduction of Yolo It seems that PyTorch is required to introduce yolo5. The commands I entered are shown below, but refer to the URL below for your environment. Better to put https://pytorch.org/get-started/locally/#mac-anaconda (1) Introduction of PyTorch

pip install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html


(2) Introduction of yolov5 We will finally introduce yolo.yolo.

pip install -qr requirements.txt


Sites that referred to the introduction https://konchangakita.hatenablog.com/entry/2020/08/17/220000

Confirmation of operation

I confirmed the operation with a webcam. Execution command

python detect.py --source 0


It works if you correct the following by editing the program.

cap = cv2.VideoCapture(1 if s == '0' else s)#After change


              #cap = cv2.VideoCapture(eval(s) if s.isnumeric() else s)#Original code

Referenced site https://qiita.com/SatoshiGachiFujimoto/items/cb586b255eb220fdd8aa

Finally

Next, we will move on to the learning phase. Thank you very much.

Recommended Posts

real-time-Personal-estimation (system introduction)
Introduction
[Introduction to Python3 Day 21] Chapter 10 System (10.1 to 10.5)
real-time-Personal-estimation (learning)
kivy introduction