当前位置:网站首页>Yolopose practice: one-stage human posture estimation with hands + code interpretation
Yolopose practice: one-stage human posture estimation with hands + code interpretation
2022-07-24 17:03:00 【Shaoji Bay】

Open source address : https://github.com/TexasInstruments/edgeai-yolov5/tree/yolo-pose
Reading guide :
I saw a piece of news not long ago ,YOLO The father of Joseph Redmon Leave CV world , The reason is that I can't stand moral condemnation , This technology has been used in military and privacy issues . lately ,YOLO Fire again ,YOLOv7 It has reached the best level in the balance of speed and accuracy . And based on YOLOv5 Of YOLOPose It has also achieved end-to-end leading performance in the field of human posture estimation . This record is reproduced YOLOPose The process of , And code interpretation .
Catalog
One 、 Set up
1.1 Cloning of warehouse , Install dependency library , Check Pytorch and GPU.
!git clone https://github.com/ultralytics/yolov5 # clone repo
#YOLO-Pose Branches cannot be cloned , Direct download zip Bag can ;
%cd edge-yolov5-yolo-pose/
%pip install -r requirements.txt # install dependencies
import torch
from IPython.display import Image, clear_output # to display images
clear_output()
print(f"Setup complete. Using torch {
torch.__version__} ({
torch.cuda.get_device_properties(0).name if torch.cuda.is_available() else 'CPU'})")
Setup complete. Using torch 1.9.1+cu101 (Tesla V100-SXM2-16GB)
If pytorch Wrong version , The following problems occur :
AttributeError: ‘Upsample‘ object has no attribute ‘recompute_scale_factor‘
#https://blog.csdn.net/qq_40280673/article/details/125095353
# The right version
pip install torch==1.9.1
pip install torchvision==0.10.1
Local conda Operation in environment ,(pytorch-cifar) [email protected]:edgeai-yolov5-yolo-pose$ pip install torch==1.9.1
Two 、 Reasoning
2. 1 Download the trained YOLO and YOLOPose Model ;
(pytorch-cifar) [email protected]:edgeai-yolov5-yolo-pose$ ./weights/download_weights.sh
Because directly open the link to download , There will be format errors , It is recommended to download from the command line :
wget http://software-dl.ti.com/jacinto7/esd/modelzoo/gplv3/08_02_00_11/edgeai-yolov5/pretrained_models/checkpoints/keypoint/coco/edgeai-yolov5/other/best_models/yolov5s6_640_57p5_84p3_kpts_head_6x_dwconv_3x3_lr_0p01/weights/last.pt
# Download here Yolov5s6_pose_960
2.2 Prepare the data
Data sets need to be prepared as YOLO Format , Because data loading requires reading the information of key points and location boxes at the same time . There is a special code base that can produce the required format , see https://github.com/ultralytics/JSON2YOLO . Because the author has put coco keypoints Convert to the desired format , Download the attachment package directly . And soft connect the data set to the required folder , The folder directory is as follows :
edgeai-yolov5
│ README.md
│ ...
│
coco_kpts
│ images
│ annotations
| labels
│ └─────train2017
│ │ └───
| | └───
| | '
| | .
│ └─val2017
| └───
| └───
| .
| .
| train2017.txt
| val2017.txt
Refer to the following for soft connection :
(base) [email protected]:NewProjects$ ln -s ~/Datasets/coco/* coco_kpts
(base) [email protected]:coco_kpts$ rm coco
You can delete the soft connection
2.3 function
The true annotation is shown below :

YOLOPose Measured results , As shown in the figure below :

Enlarged detail contrast :


It's not hard to find out ,YOLOPose There are highlights in small-scale human detection ( As shown on the far right of the left figure , The leftmost picture on the right )!
bug debugging
ImportError: cannot import name 'amp' from 'torch.cuda' (/home/wqt/anaconda3/envs/pytorch-cifar/lib/python3.7/site-packages/torch/cuda/__init__.py)
original conda In the environment torch The version is relatively low , according to install requirement.txt It is easy to have the highest version installed in , The best choice is to see the version recommended by the author , Or from issue In search of the answer .
AttributeError: Cant get attribute SPPF on module models.common
This is due to the download yolov5 Branches are relatively early , Or download the latest git, Or paste this class directly . May refer to https://blog.csdn.net/Steven_Cary/article/details/120886696
summary :
Want to improve YOLO To improve performance , The main troubles that may be faced are : First , Too many changes are involved ; secondly , The data format also needs to be changed to YOLO Format , If you want to run on other databases , First, we need to pass the data , A wave of worry surged into my heart
边栏推荐
- 709. Convert to lowercase letters
- ZCMU--5083: ly的数对(C语言)
- 1184. Distance between bus stops
- 一个实际使用SwiftUI 4.0中ViewThatFits自适应视图的例子
- JSP custom tag library --foreach
- Xxx.pro learning in QT
- Bring 120W goods in 15 seconds. You can also shoot such a popular video
- MySQL addition, deletion, modification, retrieval and constraint (detailed teaching)
- 期盼已久全平台支持-开源IM项目OpenIM之uniapp更新
- JSP custom tag library -- select tag
猜你喜欢

What is fuzzy theory, foundation and process

Summary of experience in using.Net test framework xUnit, mstest, specflow

Live review | wonderful playback of Apache pulsar meetup (including PPT download)

Still developing games with unity? Then you're out. Try unity to build an answer system

Notebook computer purchase guide (specific brand and model are not recommended)

Sword finger offer 22. the penultimate node in the linked list

MySQL addition, deletion, modification, retrieval and constraint (detailed teaching)

Kernel development

Rare earth Developer Conference | Apache pulsar committee Liu Dezhi shares the way of cloud native technology transformation

一个实际使用SwiftUI 4.0中ViewThatFits自适应视图的例子
随机推荐
QT QML virtual keyboard
What should we pay attention to in the resume of software testing?
QT keyboard event (I) -- detect key input
Getting started with arcpy
Jing Wei PS tutorial: basic part a
剑指 Offer 25. 合并两个排序的链表
Delay and jitter in network
At & T pseudo instruction and interpretation of CFI CFA
Envi grid resampling
EF miscellaneous
[数组]NC143 矩阵乘法-简单
Axi protocol (2): five channels and two transactions of Axi architecture
期盼已久全平台支持-开源IM项目OpenIM之uniapp更新
Interview question 01.02. determine whether it is character rearrangement
What is fuzzy theory, foundation and process
【零基础】充分理解WebGL(八)
What does Baidu promote "delete and recall" mean?
Cann training camp learns the animation stylization and AOE ATC tuning of the second season of 2022 model series
AI opportunities for operators: expand new tracks with large models
JVM class loading subsystem