Comments and readme update
This commit is contained in:
110
README.md
110
README.md
@@ -1,5 +1,62 @@
|
||||
# Human Pose Estimation with mediapipe
|
||||
|
||||
## Run with osc for UE4
|
||||
|
||||
```console
|
||||
python3 hpe_win.py
|
||||
```
|
||||
|
||||
The script accepts the following arguments in "config.yml" file:
|
||||
|
||||
* address_input - file path or webcam index
|
||||
* scale_pose - shoulder width in metric system
|
||||
* crop_image - coefficient if you need to resize the image
|
||||
* osc_address - address for osc client
|
||||
* osc_port - port for osc client
|
||||
* osc_message_address - address for message output via osc client
|
||||
* output_method (['file', 'osc']) - output type via file or osc client
|
||||
* mirror_image - horizontal display of the output image
|
||||
* show_image - output image output via opencv
|
||||
* apose - send only APose coordinate
|
||||
* world - world or local values of rotation and rotation
|
||||
* old_world - old convrerting model (does not work anymore)
|
||||
|
||||
To test with matplotlib, you need to run a script (example with a webcam with index 0):
|
||||
```console
|
||||
python3 hpe_videocapture.py 0
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
Python libraries:
|
||||
* mediapipe
|
||||
* numpy
|
||||
* matplotlib (could be optional)
|
||||
* opencv-python
|
||||
* json
|
||||
* python-osc
|
||||
|
||||
The mediapipe library requires the cuda toolkit and cudnn to work with the gpu.
|
||||
|
||||
## Interface for hpe_videocapture
|
||||
|
||||
For one-time rendering of points in 3D using matplotlib, you need to press the 'm' key.
|
||||
|
||||
To write the converted data to the UE4 model in the file 'hierarchy_data.json', you need to press the 'j' key.
|
||||
|
||||
To close the program, press the 'esc' key.
|
||||
|
||||
## Requirements for setting up an experiment
|
||||
|
||||
* There must be one person in the frame.
|
||||
* The camera should be approximately at a 90 degree angle.
|
||||
* The person must enter the frame entirely.
|
||||
* It is desirable that the contours of the clothes on the person are clearly visible.
|
||||
|
||||
## Build on Windows
|
||||
|
||||
In development
|
||||
|
||||
## Запуск
|
||||
|
||||
Для тестового запуска через вебкамеру с индексом 0.
|
||||
@@ -23,56 +80,3 @@ python3 hpe_json.py --address_input 0 --show_image True
|
||||
```console
|
||||
python3 hpe_videocapture.py 0
|
||||
```
|
||||
|
||||
## Зависимости
|
||||
|
||||
Библиотеки python:
|
||||
* mediapipe
|
||||
* numpy
|
||||
* matplotlib (можно сделать опциональной)
|
||||
* opencv-python
|
||||
* json
|
||||
* python-osc
|
||||
|
||||
Библиотека mediapipe требует cudatoolkit и cudnn для работы с gpu.
|
||||
|
||||
## Интерфейс для hpe_videocapture
|
||||
|
||||
Для разовой отрисовки точек в 3D с помощью matplotlib необходимо нажать клавишу 'm'.
|
||||
|
||||
Чтобы записать сконвертированные данные в модель UE4 в файл 'hierarchy_data.json', нужно нажать клавишу 'j'.
|
||||
|
||||
Для закрытия программы нужно нажать клавишу 'esc'.
|
||||
|
||||
## Требования к постановке эксперимента
|
||||
|
||||
* Человек в кадре должен быть один.
|
||||
* Камера примерно должна быть под углом 90 градусов.
|
||||
* Человек должен входить в кадр целиком.
|
||||
* Желательно, чтобы у одежда на человеке были хорошо видны контуры.
|
||||
|
||||
## Сборка на Windows
|
||||
|
||||
В разработке
|
||||
|
||||
## Config file
|
||||
|
||||
В разработке.
|
||||
|
||||
Предположительные переменные.
|
||||
|
||||
Параметры класса hpe_mp_class из hpe_mp_class.py:
|
||||
* hands_static_image_mode = False
|
||||
* hands_max_num_hands = 2
|
||||
* hands_min_detection_confidence = 0.7
|
||||
* hands_min_tracking_confidence = 0.5
|
||||
* pose_static_image_mode = False
|
||||
* pose_upper_body_only = False
|
||||
* pose_smooth_landmarks = True
|
||||
* pose_min_detection_confidence = 0.7
|
||||
* pose_min_tracking_confidence = 0.5
|
||||
* hol_static_image_mode = False
|
||||
* hol_upper_body_only = False
|
||||
* hol_smooth_landmarks = True
|
||||
* hol_min_detection_confidence = 0.7
|
||||
* hol_min_tracking_confidence = 0.5
|
||||
|
||||
Reference in New Issue
Block a user