---
tags: openpose
---
# Human-Pose-Compare 的執行
## 2021/6/6
### https://github.com/kr1210/Human-Pose-Compare
[用conda建立及管理python虛擬環境](https://medium.com/python4u/%E7%94%A8conda%E5%BB%BA%E7%AB%8B%E5%8F%8A%E7%AE%A1%E7%90%86python%E8%99%9B%E6%93%AC%E7%92%B0%E5%A2%83-b61fd2a76566)
-----
### (1) 使用底下的postNet
https://github.com/rwightman/posenet-python
```
conda create --name boxing
conda install tensorflow-gpu scipy pyyaml python=3.6
pip install opencv-python==3.4.5.20
```

```
pip install -r requirements.txt
```


```
pip install -r requirements.txt --user
```

```
pip install dtw
pip install dtw-python
pip install dtaidistance
```

> ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.1.0 requires tensorboard<2.2.0,>=2.1.0, but you have tensorboard 1.14.0 which is incompatible.
tensorflow 2.1.0 requires tensorflow-estimator<2.2.0,>=2.1.0rc0, but you have tensorflow-estimator 1.14.0 which is incompatible.
[pip install --upgrade tensorflow tensorflow-tensorboard](https://github.com/tensorflow/tensorboard/issues/1255)
```
pip install --upgrade tensorflow tensorflow-tensorboard
```

> ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow-gpu 1.14.0 requires tensorboard<1.15.0,>=1.14.0, but you have tensorboard 2.5.0 which is incompatible.
tensorflow-gpu 1.14.0 requires tensorflow-estimator<1.15.0rc0,>=1.14.0rc0, but you have tensorflow-estimator 2.5.0 which is incompatible.
```
pip install --upgrade tensorflow-tensorboard
```

[查看conda 虛擬機內部的所有的package](https://ithelp.ithome.com.tw/articles/10192460?sc=hot)
```
conda list
```

```
python start_here.py
```

> AttributeError: module 'tensorboard' has no attribute 'lazy'
### 可能 tensorflow 的版本有衝突
------
### (2) python3.6 跟 pip install -r requirements.txt
```
pip install -r requirements.txt
```
> ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
dtw-python 1.1.10 requires numpy>=1.19, but you have numpy 1.18.2 which is incompatible.
把 dtw-python 給砍掉
```
pip uninstall dtw-python
```
去執行
```
python start_here.py --activity "punch - side" --video "test.mp4"
```
### 正解
### 得到 總分跟陣列資料
----