Alphapose-docker as submodule

This commit is contained in:
Ruben van de Ven 2023-03-08 14:38:10 +01:00
parent c769f0f87a
commit 877faa8c84
7 changed files with 43 additions and 7 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ exp/
detector/ detector/
out/ out/
pretrained-models/ pretrained-models/
.venv/

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "alphapose-docker"]
path = alphapose-docker
url = https://git.rubenvandeven.com/security_vision/alphapose-docker

31
README.md Normal file
View file

@ -0,0 +1,31 @@
# Looping Alphapose Training
Pulling the traditional media art trick: can we loop the training of Alphapose? What if we train it on COCO data, run it on COCO images, train it on these results, run it on COCO images etc. ad inf.?
## Installation
```bash
poetry install
git submodule init
git submodule update
```
Then make sure alphapose-docker is set up:
```bash
cd alphapose-docker
docker build --tag alphapose .
```
As mentioned in the README from [alphapose-docker](https://git.rubenvandeven.com/security_vision/alphapose-docker) it is necessary to download some external models before usage, as per [the AlphaPose installation guide](https://github.com/MVIG-SJTU/AlphaPose/blob/master/docs/INSTALL.md#models).
1. YOLOv3 Object detector can be place in the `alphapose-docker/detector/yolo/data` repository.
2. (Optionally) YOLOX models go in the `alphapose-docker/detector/yolox/data` repository.
3. A pretrained AlphaPose model can be place in the `alphapose-docker/pretrained_models` directory. See their [Model Zoo](https://github.com/MVIG-SJTU/AlphaPose/blob/master/docs/MODEL_ZOO.md) for the various options.
4. For pose tracking, see the [pose tracking module](https://github.com/MVIG-SJTU/AlphaPose/tree/master/trackers). Make sure to add the necessary folder as a volume to the `docker run` command.
## Usage
Then the scripts can be invoked with `poetry run python ....py`

1
alphapose-docker Submodule

@ -0,0 +1 @@
Subproject commit 5aa2d0fac11d9af37c567284324d06b5a050d81d

View file

@ -60,9 +60,9 @@ def wrap_docker_cmd(cmd: list, container: str = 'alphapose'):
'-v', str(pwd) + '/exp:/build/AlphaPose/exp', '-v', str(pwd) + '/exp:/build/AlphaPose/exp',
'-v', str(pwd) + '/data:/build/AlphaPose/data', '-v', str(pwd) + '/data:/build/AlphaPose/data',
'-v', str(pwd) + '/out:/out', '-v', str(pwd) + '/out:/out',
'-v', str(pwd) + '/detector/yolox/data:/build/AlphaPose/detector/yolox/data', '-v', str(pwd) + '/alphapose-docker/detector/yolox/data:/build/AlphaPose/detector/yolox/data',
'-v', str(pwd) + '/detector/yolo/data:/build/AlphaPose/detector/yolo/data', '-v', str(pwd) + '/alphapose-docker/detector/yolo/data:/build/AlphaPose/detector/yolo/data',
'-v', str(pwd) + '/pretrained_models:/build/AlphaPose/pretrained_models', '-v', str(pwd) + '/alphapose-docker/pretrained_models:/build/AlphaPose/pretrained_models',
container, container,
*cmd *cmd
] ]

6
poetry.lock generated
View file

@ -560,7 +560,7 @@ cffi = {version = "*", markers = "implementation_name == \"pypy\""}
[[package]] [[package]]
name = "setuptools" name = "setuptools"
version = "67.5.1" version = "67.6.0"
description = "Easily download, build, install, upgrade, and uninstall Python packages" description = "Easily download, build, install, upgrade, and uninstall Python packages"
category = "main" category = "main"
optional = false optional = false
@ -1345,8 +1345,8 @@ pyzmq = [
{file = "pyzmq-25.0.0.tar.gz", hash = "sha256:f330a1a2c7f89fd4b0aa4dcb7bf50243bf1c8da9a2f1efc31daf57a2046b31f2"}, {file = "pyzmq-25.0.0.tar.gz", hash = "sha256:f330a1a2c7f89fd4b0aa4dcb7bf50243bf1c8da9a2f1efc31daf57a2046b31f2"},
] ]
setuptools = [ setuptools = [
{file = "setuptools-67.5.1-py3-none-any.whl", hash = "sha256:1c39d42bda4cb89f7fdcad52b6762e3c309ec8f8715b27c684176b7d71283242"}, {file = "setuptools-67.6.0-py3-none-any.whl", hash = "sha256:b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2"},
{file = "setuptools-67.5.1.tar.gz", hash = "sha256:15136a251127da2d2e77ac7a1bc231eb504654f7e3346d93613a13f2e2787535"}, {file = "setuptools-67.6.0.tar.gz", hash = "sha256:2ee892cd5f29f3373097f5a814697e397cf3ce313616df0af11231e2ad118077"},
] ]
setuptools-scm = [ setuptools-scm = [
{file = "setuptools_scm-7.1.0-py3-none-any.whl", hash = "sha256:73988b6d848709e2af142aa48c986ea29592bbcfca5375678064708205253d8e"}, {file = "setuptools_scm-7.1.0-py3-none-any.whl", hash = "sha256:73988b6d848709e2af142aa48c986ea29592bbcfca5375678064708205253d8e"},

View file

@ -1,5 +1,5 @@
[tool.poetry] [tool.poetry]
name = "alphapose-loop" name = "alphapose-feedback"
version = "0.1.0" version = "0.1.0"
description = "" description = ""
authors = ["Ruben van de Ven <git@rubenvandeven.com>"] authors = ["Ruben van de Ven <git@rubenvandeven.com>"]