poseviz 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- poseviz-0.0.0/.github/workflows/python-publish.yml +35 -0
- poseviz-0.0.0/.gitignore +162 -0
- poseviz-0.0.0/LICENSE +21 -0
- poseviz-0.0.0/PKG-INFO +95 -0
- poseviz-0.0.0/README.md +55 -0
- poseviz-0.0.0/demo.py +79 -0
- poseviz-0.0.0/docs/Makefile +20 -0
- poseviz-0.0.0/docs/_static/styles/my_theme.css +64 -0
- poseviz-0.0.0/docs/_templates/autoapi/index.rst +9 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/attribute.rst +1 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/class.rst +121 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/data.rst +40 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/exception.rst +1 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/function.rst +23 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/method.rst +23 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/module.rst +158 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/package.rst +1 -0
- poseviz-0.0.0/docs/_templates/autoapi/python/property.rst +23 -0
- poseviz-0.0.0/docs/abbrev_long.bib +204 -0
- poseviz-0.0.0/docs/conf.py +111 -0
- poseviz-0.0.0/docs/conf_overrides.py +1 -0
- poseviz-0.0.0/docs/conf_spec.py +3 -0
- poseviz-0.0.0/docs/index.rst +16 -0
- poseviz-0.0.0/docs/make.bat +35 -0
- poseviz-0.0.0/docs/references.bib +0 -0
- poseviz-0.0.0/docs_old/API.md +150 -0
- poseviz-0.0.0/docs_old/index.md +46 -0
- poseviz-0.0.0/docs_old/poseviz.md +4 -0
- poseviz-0.0.0/docs_old/stylesheets/extra.css +6 -0
- poseviz-0.0.0/pyproject.toml +39 -0
- poseviz-0.0.0/screenshot.jpg +0 -0
- poseviz-0.0.0/screenshot2.jpg +0 -0
- poseviz-0.0.0/screenshot_multicam.jpg +0 -0
- poseviz-0.0.0/setup.cfg +4 -0
- poseviz-0.0.0/src/poseviz/__init__.py +4 -0
- poseviz-0.0.0/src/poseviz/colors.py +31 -0
- poseviz-0.0.0/src/poseviz/components/__init__.py +0 -0
- poseviz-0.0.0/src/poseviz/components/camera_viz.py +164 -0
- poseviz-0.0.0/src/poseviz/components/connected_points_viz.py +99 -0
- poseviz-0.0.0/src/poseviz/components/ground_plane_viz.py +29 -0
- poseviz-0.0.0/src/poseviz/components/main_viz.py +131 -0
- poseviz-0.0.0/src/poseviz/components/skeletons_viz.py +93 -0
- poseviz-0.0.0/src/poseviz/components/smpl_viz.py +117 -0
- poseviz-0.0.0/src/poseviz/draw2d.py +53 -0
- poseviz-0.0.0/src/poseviz/init.py +23 -0
- poseviz-0.0.0/src/poseviz/mayavi_util.py +101 -0
- poseviz-0.0.0/src/poseviz/messages.py +51 -0
- poseviz-0.0.0/src/poseviz/poseviz.py +879 -0
- poseviz-0.0.0/src/poseviz/video_writing.py +67 -0
- poseviz-0.0.0/src/poseviz/view_info.py +66 -0
- poseviz-0.0.0/src/poseviz.egg-info/PKG-INFO +95 -0
- poseviz-0.0.0/src/poseviz.egg-info/SOURCES.txt +53 -0
- poseviz-0.0.0/src/poseviz.egg-info/dependency_links.txt +1 -0
- poseviz-0.0.0/src/poseviz.egg-info/requires.txt +8 -0
- poseviz-0.0.0/src/poseviz.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
pypi-publish:
|
|
12
|
+
name: Upload release to PyPI
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
environment: pypi
|
|
15
|
+
permissions:
|
|
16
|
+
id-token: write
|
|
17
|
+
steps:
|
|
18
|
+
- name: Check out repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
|
|
23
|
+
- name: Set up Python
|
|
24
|
+
uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.x"
|
|
27
|
+
|
|
28
|
+
- name: Install build dependencies
|
|
29
|
+
run: python -m pip install --upgrade build
|
|
30
|
+
|
|
31
|
+
- name: Build package distribution
|
|
32
|
+
run: python -m build --sdist
|
|
33
|
+
|
|
34
|
+
- name: Publish package distributions to PyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
poseviz-0.0.0/.gitignore
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
*_cython.c
|
|
156
|
+
|
|
157
|
+
# PyCharm
|
|
158
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
159
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
161
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
162
|
+
#.idea/
|
poseviz-0.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 István Sárándi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
poseviz-0.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: poseviz
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: 3D human pose visualizer with multi-person, multi-view support, built on Mayavi.
|
|
5
|
+
Author-email: István Sárándi <istvan.sarandi@uni-tuebingen.de>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2023 István Sárándi
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Requires-Python: >=3.8
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Requires-Dist: more-itertools
|
|
32
|
+
Requires-Dist: opencv-python
|
|
33
|
+
Requires-Dist: numpy
|
|
34
|
+
Requires-Dist: mayavi
|
|
35
|
+
Requires-Dist: imageio
|
|
36
|
+
Requires-Dist: cameravision
|
|
37
|
+
Requires-Dist: boxlib
|
|
38
|
+
Requires-Dist: framepump
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
|
|
41
|
+
# PoseViz – 3D Human Pose Visualizer
|
|
42
|
+
|
|
43
|
+
<p align="center">
|
|
44
|
+
<img src=screenshot.jpg width="30%">
|
|
45
|
+
<img src=screenshot2.jpg width="30%">
|
|
46
|
+
<img src=screenshot_multicam.jpg width="30%">
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
Multi-person, multi-camera 3D human pose visualization tool built using
|
|
50
|
+
[Mayavi](https://docs.enthought.com/mayavi/mayavi/). As used
|
|
51
|
+
in [MeTRAbs](https://github.com/isarandi/metrabs) visualizations.
|
|
52
|
+
|
|
53
|
+
**This repo does not contain pose estimation code, only the visualization part.**
|
|
54
|
+
|
|
55
|
+
## Gist of Usage
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import poseviz
|
|
59
|
+
import cameravision
|
|
60
|
+
|
|
61
|
+
camera = cameravision.Camera(...)
|
|
62
|
+
|
|
63
|
+
with poseviz.PoseViz(...) as viz:
|
|
64
|
+
for frame in frames:
|
|
65
|
+
bounding_boxes, poses3d = run_pose_estimation_model(frame)
|
|
66
|
+
viz.update(frame=frame, boxes=bounding_boxes, poses=poses3d, camera=camera)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
See also [```demo.py```](demo.py).
|
|
70
|
+
|
|
71
|
+
The main feature of this tool is that the graphical event loop is hidden from the library user. We
|
|
72
|
+
want to write code in terms of the *prediction loop* of the human pose estimator, not from the point
|
|
73
|
+
of view of the visualizer tool.
|
|
74
|
+
|
|
75
|
+
Behind the scenes, this is achieved through forking a dedicated visualization process and passing
|
|
76
|
+
new scene information via multiprocessing queues.
|
|
77
|
+
|
|
78
|
+
## Installation
|
|
79
|
+
|
|
80
|
+
PoseViz is released as a conda package (experimental, tested only on Linux):
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
conda install poseviz -c isarandi
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Alternatively, in case the above doesn't work, install Mayavi via conda (the Mayavi pip package has
|
|
87
|
+
compilation problems), clone this repo and install PoseViz via pip:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
conda install mayavi -c conda-forge
|
|
91
|
+
pip install git+https://github.com/isarandi/poseviz.git
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Then run [demo.py](demo.py) to test if installation was successful.
|
|
95
|
+
|
poseviz-0.0.0/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# PoseViz – 3D Human Pose Visualizer
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src=screenshot.jpg width="30%">
|
|
5
|
+
<img src=screenshot2.jpg width="30%">
|
|
6
|
+
<img src=screenshot_multicam.jpg width="30%">
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
Multi-person, multi-camera 3D human pose visualization tool built using
|
|
10
|
+
[Mayavi](https://docs.enthought.com/mayavi/mayavi/). As used
|
|
11
|
+
in [MeTRAbs](https://github.com/isarandi/metrabs) visualizations.
|
|
12
|
+
|
|
13
|
+
**This repo does not contain pose estimation code, only the visualization part.**
|
|
14
|
+
|
|
15
|
+
## Gist of Usage
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
import poseviz
|
|
19
|
+
import cameravision
|
|
20
|
+
|
|
21
|
+
camera = cameravision.Camera(...)
|
|
22
|
+
|
|
23
|
+
with poseviz.PoseViz(...) as viz:
|
|
24
|
+
for frame in frames:
|
|
25
|
+
bounding_boxes, poses3d = run_pose_estimation_model(frame)
|
|
26
|
+
viz.update(frame=frame, boxes=bounding_boxes, poses=poses3d, camera=camera)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
See also [```demo.py```](demo.py).
|
|
30
|
+
|
|
31
|
+
The main feature of this tool is that the graphical event loop is hidden from the library user. We
|
|
32
|
+
want to write code in terms of the *prediction loop* of the human pose estimator, not from the point
|
|
33
|
+
of view of the visualizer tool.
|
|
34
|
+
|
|
35
|
+
Behind the scenes, this is achieved through forking a dedicated visualization process and passing
|
|
36
|
+
new scene information via multiprocessing queues.
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
PoseViz is released as a conda package (experimental, tested only on Linux):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
conda install poseviz -c isarandi
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Alternatively, in case the above doesn't work, install Mayavi via conda (the Mayavi pip package has
|
|
47
|
+
compilation problems), clone this repo and install PoseViz via pip:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
conda install mayavi -c conda-forge
|
|
51
|
+
pip install git+https://github.com/isarandi/poseviz.git
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then run [demo.py](demo.py) to test if installation was successful.
|
|
55
|
+
|
poseviz-0.0.0/demo.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import time
|
|
2
|
+
|
|
3
|
+
import smpl.numpy
|
|
4
|
+
|
|
5
|
+
import poseviz
|
|
6
|
+
|
|
7
|
+
import numpy as np
|
|
8
|
+
import cameravision
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def main():
|
|
12
|
+
# Names of the body joints. Left joint names must start with 'l', right with 'r'.
|
|
13
|
+
joint_names = ["l_wrist", "l_elbow"]
|
|
14
|
+
|
|
15
|
+
# Joint index pairs specifying which ones should be connected with a line (i.e., the bones of
|
|
16
|
+
# the body, e.g. wrist-elbow, elbow-shoulder)
|
|
17
|
+
joint_edges = [[0, 1]]
|
|
18
|
+
viz = poseviz.PoseViz(joint_names, joint_edges)
|
|
19
|
+
|
|
20
|
+
# Iterate over the frames of e.g. a video
|
|
21
|
+
for i in range(1):
|
|
22
|
+
# Get the current frame
|
|
23
|
+
frame = np.zeros([720, 1280, 3], np.uint8)
|
|
24
|
+
|
|
25
|
+
# Make predictions here
|
|
26
|
+
# ...
|
|
27
|
+
|
|
28
|
+
# Update the visualization
|
|
29
|
+
viz.update(
|
|
30
|
+
frame=frame,
|
|
31
|
+
boxes=np.array([[10, 20, 100, 100]], np.float32),
|
|
32
|
+
poses=np.array([[[100, 100, 2000], [-100, 100, 2000]]], np.float32),
|
|
33
|
+
camera=cameravision.Camera.from_fov(55, frame.shape[:2]),
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def main_smpl():
|
|
38
|
+
smpl_canonical = np.load(
|
|
39
|
+
"/work/sarandi/projects/localizerfields/canonical_vertices_smpl.npy"
|
|
40
|
+
) * [1,-1,-1] * 1000 + [0, 0, 3000]
|
|
41
|
+
|
|
42
|
+
# Names of the body joints. Left joint names must start with 'l', right with 'r'.
|
|
43
|
+
joint_names = ["l_wrist", "l_elbow"]
|
|
44
|
+
|
|
45
|
+
# Joint index pairs specifying which ones should be connected with a line (i.e., the bones of
|
|
46
|
+
# the body, e.g. wrist-elbow, elbow-shoulder)
|
|
47
|
+
joint_edges = [[0, 1]]
|
|
48
|
+
faces = smpl.numpy.get_cached_body_model("smpl", "neutral").faces
|
|
49
|
+
with poseviz.PoseViz(joint_names, joint_edges, body_model_faces=faces) as viz:
|
|
50
|
+
# Iterate over the frames of e.g. a video
|
|
51
|
+
for i in range(1):
|
|
52
|
+
# Get the current frame
|
|
53
|
+
frame = np.zeros([720, 1280, 3], np.uint8)
|
|
54
|
+
|
|
55
|
+
# Make predictions here
|
|
56
|
+
# ...
|
|
57
|
+
|
|
58
|
+
# Update the visualization
|
|
59
|
+
viz.update(
|
|
60
|
+
frame=frame,
|
|
61
|
+
boxes=np.array([[10, 20, 100, 100]], np.float32),
|
|
62
|
+
vertices=np.array([smpl_canonical + [500, 0, 5000]]),
|
|
63
|
+
camera=cameravision.Camera.from_fov(55, frame.shape[:2], world_up=(0, 1, 0)),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
viz.update(
|
|
67
|
+
frame=frame,
|
|
68
|
+
boxes=np.array([[10, 20, 100, 100]], np.float32),
|
|
69
|
+
vertices=np.array(
|
|
70
|
+
[smpl_canonical + [-500, 0, 3000], smpl_canonical + [-500, 0, 5000]]
|
|
71
|
+
),
|
|
72
|
+
camera=cameravision.Camera.from_fov(55, frame.shape[:2], world_up=(0, 1, 0)),
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
time.sleep(1000)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
if __name__ == "__main__":
|
|
79
|
+
main_smpl()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@import url("theme.css");
|
|
2
|
+
@import url("https://fonts.googleapis.com/css2?family=Mona+Sans:ital,wght@0,200..900;1,200..900&family=Geist:wght@100..900&&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Outfit:wght@100..900&display=swap");
|
|
3
|
+
|
|
4
|
+
@media (min-width: 960px) {
|
|
5
|
+
.bd-page-width {
|
|
6
|
+
max-width: 120rem;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#rtd-footer-container {
|
|
11
|
+
margin-top: 0 !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
html[data-theme="light"] {
|
|
15
|
+
--pst-color-table-row-hover-bg: #dfc6ff;
|
|
16
|
+
--pst-color-link-hover: #845818;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
html[data-theme="dark"] {
|
|
20
|
+
--pst-color-table-row-hover-bg: #41296c;
|
|
21
|
+
--pst-color-inline-code: #dd8cd4;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
html[data-theme="dark"] dt:target {
|
|
26
|
+
background-color: #4f4500;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html[data-theme="dark"] .linkcode-link {
|
|
30
|
+
color: #9090ff;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
html[data-theme="dark"] table.indextable tr.cap {
|
|
34
|
+
background-color: #464646;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
html[data-theme="dark"] a:visited {
|
|
38
|
+
color: #9E67D0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.navbar-brand .logo__title {
|
|
42
|
+
font-family: "Mona Sans", sans-serif;
|
|
43
|
+
font-size: 2.5rem;
|
|
44
|
+
font-weight: 400;
|
|
45
|
+
font-style: normal;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:root {
|
|
49
|
+
--pst-font-family-monospace: "JetBrains Mono", monospace;
|
|
50
|
+
--pst-font-family-heading: "Mona Sans", sans-serif;
|
|
51
|
+
--pst-font-family-base: "Mona Sans", sans-serif;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
body {
|
|
55
|
+
font-weight: 450;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.bd-main .bd-content .bd-article-container {
|
|
59
|
+
max-width: 100%; /* default is 60em */
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.bd-sidebar-primary {
|
|
63
|
+
width: 18%;
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{% extends "python/data.rst" %}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{% if obj.display %}
|
|
2
|
+
{% if is_own_page %}
|
|
3
|
+
{{ obj.name }}
|
|
4
|
+
{{ "=" * obj.name | length }}
|
|
5
|
+
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% set visible_children = obj.children|selectattr("display")|list %}
|
|
8
|
+
{% set own_page_children = visible_children|selectattr("type", "in", own_page_types)|list %}
|
|
9
|
+
{% if is_own_page and own_page_children %}
|
|
10
|
+
.. toctree::
|
|
11
|
+
:hidden:
|
|
12
|
+
|
|
13
|
+
{% for child in own_page_children %}
|
|
14
|
+
{{ child.include_path }}
|
|
15
|
+
{% endfor %}
|
|
16
|
+
|
|
17
|
+
{% endif %}
|
|
18
|
+
.. py:{{ obj.type }}:: {% if is_own_page %}{{ obj.id }}{% else %}{{ obj.short_name }}{% endif %}{% if obj.args %}({{ obj.args }}){% endif %}
|
|
19
|
+
|
|
20
|
+
{% for (args, return_annotation) in obj.overloads %}
|
|
21
|
+
{{ " " * (obj.type | length) }} {{ obj.short_name }}{% if args %}({{ args }}){% endif %}
|
|
22
|
+
|
|
23
|
+
{% endfor %}
|
|
24
|
+
{% if obj.bases %}
|
|
25
|
+
{% if "show-inheritance" in autoapi_options %}
|
|
26
|
+
|
|
27
|
+
Bases: {% for base in obj.bases %}{{ base|link_objs }}{% if not loop.last %}, {% endif %}{% endfor %}
|
|
28
|
+
{% endif %}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
{% if "show-inheritance-diagram" in autoapi_options and obj.bases != ["object"] %}
|
|
32
|
+
.. autoapi-inheritance-diagram:: {{ obj.obj["full_name"] }}
|
|
33
|
+
:parts: 1
|
|
34
|
+
{% if "private-members" in autoapi_options %}
|
|
35
|
+
:private-bases:
|
|
36
|
+
{% endif %}
|
|
37
|
+
|
|
38
|
+
{% endif %}
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% if obj.docstring %}
|
|
41
|
+
|
|
42
|
+
{{ obj.docstring|indent(3) }}
|
|
43
|
+
{% endif %}
|
|
44
|
+
{% for obj_item in visible_children %}
|
|
45
|
+
{% if obj_item.type not in own_page_types %}
|
|
46
|
+
|
|
47
|
+
{{ obj_item.render()|indent(3) }}
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% endfor %}
|
|
50
|
+
{% if is_own_page and own_page_children %}
|
|
51
|
+
{% set visible_attributes = own_page_children|selectattr("type", "equalto", "attribute")|list %}
|
|
52
|
+
{% if visible_attributes %}
|
|
53
|
+
Attributes
|
|
54
|
+
----------
|
|
55
|
+
|
|
56
|
+
.. autoapisummary::
|
|
57
|
+
|
|
58
|
+
{% for attribute in visible_attributes %}
|
|
59
|
+
{{ attribute.id }}
|
|
60
|
+
{% endfor %}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
{% endif %}
|
|
64
|
+
{% set visible_properties = own_page_children|selectattr("type", "equalto", "property")|list %}
|
|
65
|
+
{% if visible_properties %}
|
|
66
|
+
Properties
|
|
67
|
+
----------
|
|
68
|
+
|
|
69
|
+
.. autoapisummary::
|
|
70
|
+
|
|
71
|
+
{% for property in visible_properties %}
|
|
72
|
+
{{ property.id }}
|
|
73
|
+
{% endfor %}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
{% endif %}
|
|
77
|
+
{% set visible_exceptions = own_page_children|selectattr("type", "equalto", "exception")|list %}
|
|
78
|
+
{% if visible_exceptions %}
|
|
79
|
+
Exceptions
|
|
80
|
+
----------
|
|
81
|
+
|
|
82
|
+
.. autoapisummary::
|
|
83
|
+
|
|
84
|
+
{% for exception in visible_exceptions %}
|
|
85
|
+
{{ exception.id }}
|
|
86
|
+
{% endfor %}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
{% endif %}
|
|
90
|
+
{% set visible_classes = own_page_children|selectattr("type", "equalto", "class")|list %}
|
|
91
|
+
{% if visible_classes %}
|
|
92
|
+
Classes
|
|
93
|
+
-------
|
|
94
|
+
|
|
95
|
+
.. autoapisummary::
|
|
96
|
+
|
|
97
|
+
{% for klass in visible_classes %}
|
|
98
|
+
{{ klass.id }}
|
|
99
|
+
{% endfor %}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
{% endif %}
|
|
103
|
+
{% set visible_methods = own_page_children|selectattr("type", "equalto", "method")|list %}
|
|
104
|
+
{% if visible_methods %}
|
|
105
|
+
Methods
|
|
106
|
+
-------
|
|
107
|
+
|
|
108
|
+
.. autoapisummary::
|
|
109
|
+
|
|
110
|
+
{% for method in visible_methods %}
|
|
111
|
+
{{ method.id }}
|
|
112
|
+
{% endfor %}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
{% endif %}
|
|
116
|
+
|
|
117
|
+
{% endif %}
|
|
118
|
+
{% endif %}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
.. footbibliography::
|