当前位置:网站首页>Open mmlab / mmpose installation and use tutorial
Open mmlab / mmpose installation and use tutorial
2022-04-21 13:36:00 【Charms@】
mmpose install 、 Use the tutorial
mmpose
mmpose It's another easy-to-use tool box under Shangtang , It is mainly developed for attitude recognition task , Including human posture recognition and animal posture recognition . It inherits many ready-made networks for everyone to use , And provides trained weights . Users can train their data with their own needs , Or directly apply their results , Anyway, it's very comprehensive !!!!
github Connect :https://github.com/open-mmlab/mmpose
Use connections :https://mmpose.readthedocs.io/en/latest/demo.html

Installation tutorial
1. install mmcv-full
Suppose your computer has installed anaconda Environmental Science , And you've installed pytorch, first-class pytorch The version is 1.5 above , If not , It is best to create a new virtual environment using the following code , I personally like the latest version , Because the compatibility of current installation packages is relatively good , If you don't understand, don't worry about new compatibility problems , The new version can basically run the old version of the code , You can rest assured , I don't say much nonsense , Let's start .
pytorch Version less than 1.5 Use the following code :
Pay attention to your cuda Version ha , I came according to my own , see cuda edition , Available on the command line nvcc -V
conda create -n open-mmlab python=3.8 pytorch=1.9 cudatoolkit=11.3 torchvision -c pytorch -y
conda activate open-mmlab
Now it has been satisfied pytorch The version is greater than 1.5 了 , Let's start installing openmim
Pay attention to your version number , Change to the corresponding , If you don't want to change , Use directly pip install mmcv-full Save trouble
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.9.0/index.html
2. install MMPose
Here's the advice win Students of the system , because win No, linux Command line, you're so comfortable , I suggest you install one git cmd, This is very cool to use , Can let you again linux The feeling of . Okay , Start installation mmpose 了
clone mmpose library
git clone https://github.com/open-mmlab/mmpose.git
cd mmpose
Install required packages
pip install -r requirements.txt
pip install -v -e . # or "python setup.py develop"
Note here that during installation , Some packages may not be installed , At this time, you need to install it manually , I had a problem during the installation poseval This library , It can't be installed , I searched Baidu for the following , Here is the installation method for you .
It can't be installed poseval, Use the following manual method to install
1. The first way :
pip install https://github.com/svenkreiss/poseval.git
2. The second way :
git clone https://github.com/svenkreiss/poseval.git
cd poseval
pip install -e . # install the local package ('.') in editable mode ('-e')
Note that after a problem occurs halfway , Some packages in the back are not installed properly , You also need to use pip install -r requirements.txt continue installation
2. install mmdet
This can be installed or not , I suggest you install the following , Because the steps are simple , If you don't install it , Later, the library of attitude estimation is used top-down The idea needs to mark the position of the box , Do it yourself json file , trouble , It's easy to install here .
pip install mmdet
Use the tutorial
1. Forecast picture
After all the above are installed , Now let's start using it
If we don't install mmdet word , Only test the pictures they provide
Now let's coco Data sets, for example , Test and play this library , They provide marked json
python demo/top_down_img_demo.py configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_256x192-b9e0b3ab_20200708.pth --img-root tests/data/coco/ --json-file tests/data/coco/test_coco.json --out-img-root vis_results


Here are the predicted results

If you install it mmdet word , Any picture can predict
Use the following code directly ,mmdet You can detect people by yourself , There is no need to mark manually
python demo/top_down_img_demo_with_mmdet.py demo/mmdetection_cfg/faster_rcnn_r50_fpn_coco.py https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_256x192-b9e0b3ab_20200708.pth --img-root tests/data/coco/ --img 1.jpeg --out-img-root vis_results
Let's take a look at the effect

2. Prediction video
The code for predicting video is as follows :
python demo/top_down_video_demo_with_mmdet.py demo/mmdetection_cfg/faster_rcnn_r50_fpn_coco.py https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_256x192-b9e0b3ab_20200708.pth --video-path demo/resources/1.mp4 --out-video-root vis_results

Let's take a look at the effect

vis_1
Last , If you need to recognize animals, you can see the following tutorial
https://mmpose.readthedocs.io/en/latest/demo.html
版权声明
本文为[Charms@]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211217518361.html
边栏推荐
- sql数据库入门-what&MySQL&按照MySQL
- 《物联网开发实战》06 物模型:如何定义智能电灯?(学习笔记)
- 北京大学ACM Problems 1009:Edge Detection
- STM32 drives st7789v2 TFT screen
- Navlinkmatch of blazor's navlink What does prefix do
- Skills of layout design
- Accounting practice exercises and answers for the 2022 primary accounting title examination
- Do self media and short videos. You don't have to shoot videos yourself. Dazhou teaches you a quick way to start
- CV technical guide free knowledge planet
- AI video cloud vs narrowband HD, who is the darling of the video era
猜你喜欢

Wechat hidden function series: wechat regular reminder, 2 steps, to relax yourself when you are busy
![BUUCTF [第三章 web进阶]逻辑漏洞](/img/fb/99a5c60979970a9d6cd0fe0e0fb7a4.png)
BUUCTF [第三章 web进阶]逻辑漏洞

BOM development of access (3) BOM expansion

程序员爆出自己的薪资税前月薪15000

AI video cloud vs narrowband HD, who is the darling of the video era

International logistics centralized transportation system source code, overseas warehousing cross-border transshipment system source code

海口等保测评公司有几家?具体在哪里?哪里可以查到?

Chris LATTNER, father of llvm: the golden age of compilers

国际物流集运系统源码,海外仓储跨境转运系统源码
![[csnote] DB exception (redundant data, modification exception, deletion exception, insertion exception)](/img/28/adf0221ed9b25e5f0c3229441f30a2.png)
[csnote] DB exception (redundant data, modification exception, deletion exception, insertion exception)
随机推荐
20210818 diary
PostgreSQL 15即将支持SQL标准中的MERGE语句
Wanzi dry goods! Help you master the knowledge of "light and shadow" in design
一级等保怎么做?要收费吗?等保要求是什么?
BUUCTF [第三章 web进阶]逻辑漏洞
53W words! Ali's first system performance optimization guide is so fragrant that it can be called the optimal solution of performance optimization
PostgreSQL 15 will soon support merge statements in the SQL standard
【数字信号处理】相关系数 ( 相关系数概念解析 | 信号能量常数 | 共轭序列 | 序列在相同时刻的相关性 )
[C] give the earth some light
百度地图开发自定义信息窗口openInfoWindow样式
制造业中小企业转型能力建设分享
北京大学ACM Problems 1008:Maya Calendar
twenty million two hundred and ten thousand eight hundred and twelve
Last online class can be "distracted" by AI analysis. Intel's emotional detection AI is on fire
Dynamic implementation of address book
暴力匹配阈值的基准细胞检测方案
S: Unit gain compensation
[traitement du signal numérique] coefficient de corrélation (analyse conceptuelle du coefficient de corrélation | constante d'énergie du signal | séquence conjuguée | corrélation de la séquence au mêm
STM32驱动ST7789V2 tft屏幕
如何在Centos下卸载OpenJDK,安装Oracle JDK