openpifpaf的web浏览器演示。
openpifpafwebdemo的Python项目详细描述
openpifpafwebdemo
Demo of "PifPaf: Composite Fields for Human Pose Estimation".
链接:main repository,paper on arXiv。
@article{kreiss2019pifpaf,
title = {PifPaf: Composite Fields for Human Pose Estimation},
author = {Kreiss, Sven and Bertoni, Lorenzo and Alahi, Alexandre},
journal = {CVPR},
year = {2019}
}
使用
确保您使用的是python3,并且有最新的pip和setuptools和pip install --upgrade pip setuptools
。不要克隆此存储库。确保当前目录中没有名为openpifpafwebdemo
的文件夹。
pip3 install openpifpafwebdemo python3 -m openpifpafwebdemo.server
打开位于http://localhost:5000
的Web浏览器以查看Web界面。
示例
从源安装并设置为供开发使用
pip install --editable ".[test]"
,安装前端依赖项
npm install
,然后使用npm run build
创建前端javascript代码。
API
使用curl的示例:
curl -X POST -H "Content-Type: application/json" --data @test_image.json http://localhost:5000/process
产生:
[{"coordinates":[[0.588631883263588,0.41628291457891464,3.5567557387194797],[0.621234196703881,0.36160339042544365,3.524825929280572],[0.546875,0.375,3.744302039019678],[0.6724068783223629,0.44710323959589005,3.459401266884038],[0.494683139026165,0.4611567258834839,3.5954212359489217],[0.78733691573143,0.8311769068241119,2.1321910543190827],[0.3859005756676197,0.8252473473548889,2.158424186304439],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0],[0.0,0.0,0.0]],"score":0.26909651332876167}]
保持连接测试:
curl -v -X POST -H "Content-Type: application/json" --data @test_image.json http://localhost:5000/process --next -X POST -H "Content-Type: application/json" --data @test_image.json http://localhost:5000/process 2>&1| grep '#0' * Connected to localhost (127.0.0.1) port 5000(#0) * Connection #0 to host localhost left intact * Re-using existing connection! (#0) with host localhost * Connected to localhost (127.0.0.1) port 5000(#0) * Connection #0 to host localhost left intact