当前位置:网站首页>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
边栏推荐
- Small end format and big end format (little endian & big endian)
- 我们为什么要推出Getaverse?
- QT keyboard event (I) -- detect key input
- The industrial information security center takes the lead in building a data circulation platform, and ant group and other manufacturers provide technical support
- Want to make sandbox games? Then you must not miss this plug-in (unity3d)
- Buffer overflow vulnerability lab experiment record
- [GNN report] Tencent AI Lab Xu TingYang: graph generation model and its application in molecular generation
- IP第十三天笔记
- 安全的证券公司有哪些?我想在手机上买股票
- With notes: printing order of synchronous, asynchronous, micro task and macro task
猜你喜欢

Cann training camp learns the animation stylization and AOE ATC tuning of the second season of 2022 model series

Envi5.3 open GF-1 WFV data

SS-Paper【1】:Fully Convolutional Networks for Semantic Segmentation

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

Thinkphp3.2.5 cannot jump to external links

PS pull out logo

【GNN报告】腾讯AI lab 徐挺洋:图生成模型及其在分子生成中的应用

查数据库实际数据增长情况

剑指 Offer 48. 最长不含重复字符的子字符串
Shardingsphere database read / write separation
随机推荐
Internet Download Manager配置
QT design simulation robot controller
【GNN报告】腾讯AI lab 徐挺洋:图生成模型及其在分子生成中的应用
SS-Paper【1】:Fully Convolutional Networks for Semantic Segmentation
Method of querying comma separated strings in a field by MySQL
Custom types: Enumeration
会议OA项目进度(一)
1163: 松哥的分数拆分(C语言)
安全的证券公司有哪些?我想在手机上买股票
剑指 Offer 25. 合并两个排序的链表
QML coding specification
我们为什么要推出Getaverse?
[redis] -1. two ways of setting up environment based on docker
什么是模糊理论,基础,流程
快速入门
QT graphical interface beginner project - unmanned aerial vehicle group combat simulation
How to effectively avoid memory leakage when customizing the handler?
Matlab writes excel string and number merging
Buffer overflow vulnerability lab experiment record
[technology] online seat selection demo of uniapp