Skip to content

Commit

Permalink
move create_data.py to root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
maitetsu committed Jun 16, 2021
1 parent ab4fd2d commit 9a5d1e6
Show file tree
Hide file tree
Showing 21 changed files with 13 additions and 1,289 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Offical project link:

* 2021/03/24 Fixed some errors in calculating AUC. Update the 3D PCK AUC Diffenence.

* 2021/06/14 A new method to estimate shape parameters by using fully connected neural network is added. Refer to [ShapeNet.md](./ShapeNet.md) for details. Thanks to kishan1823 and EEWenbinWu for pointing out the mistake. There are a little differences between the manopth I used and the official manopth. More details see [issues 11](https://github.com/MengHao666/Minimal-Hand-pytorch/issues/11)
* 2021/06/14 A new method to estimate shape parameters by using fully connected neural network is added. Refer to [ShapeNet.md](./ShapeNet.md) for details. Thanks to kishan1823 and EEWenbinWu for pointing out the mistake. There are a little differences between the manopth I used and the official manopth. More details see [issues 11](https://github.com/MengHao666/Minimal-Hand-pytorch/issues/11). manopth/rotproj.py is the rotproj.py which I have modified.


## Usage
Expand Down
20 changes: 11 additions & 9 deletions ShapeNet.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
## ShapeNet

#### about train ShapeNet
ShapeNet is a model that uses fully connected neural network to estimate shape parameters. Code of ShapeNet are adapted from [bihand](https://github.com/lixiny/bihand). If you want train your ShapeNet, just run these.
#### train ShapeNet

ShapeNet is a model that uses fully connected neural network to estimate shape parameters. It's faster than pso. Code of ShapeNet are adapted from [bihand](https://github.com/lixiny/bihand). If you want train your ShapeNet, just run these.

```python
# to create training set
python utils/create_data.py
# create training set
python create_data.py
# train the model
python train_shape_net.py
```
As for the pre-trained model, you can download from 需要添加连接.
As for the pre-trained model or the trainingset generated by me, you can download from 需要添加连接.

#### training set

#### about training set
The training set is generated by MANO. More details see utils/create_data.py.
The training set is generated by MANO. More details see create_data.py.

1. First sample shape parameters from normal distribution N(0,3)

2. Calculate the relative bone length corresponding to the shape parameter.

#### loss

#### about loss
The loss of ShapeNet consists of two parts, one is the error of relative bone length, the other is the regularization loss of shape parameters.

$$
Expand All @@ -32,8 +34,8 @@ $$

​ In my opinion, shape parameters include not only relative bone length information, but also absolute bone length information. It is impossible to guarantee that a relative bone length only corresponds to one shape parameter, which is necessary for neural networks. Therefore, the loss function does not directly calculate the error between the shape parameter and the label of it.

#### AUC

#### about AUC
AUC of ShapeNet can refer [README.md](./README.md). You can get higher AUC, if you change " beta = torch.tanh(beta) " which is the line 85 of model/shape_net.py to "beta = 3*torch.tanh(beta) ". This will make the output range of ShapeNet bigger and get higher AUC. According to the experiment, the finger will be thinner.

I didn't adjust the parameters carefully. Maybe you can get better results if you adjust parameters.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion dl_shape_estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import torch

from utils import create_data
import create_data
from model import shape_net

import numpy as np
Expand Down
Empty file removed mano/__init__.py
Empty file.
32 changes: 0 additions & 32 deletions mano/models/LICENSE.txt

This file was deleted.

3 changes: 0 additions & 3 deletions mano/models/info.txt

This file was deleted.

Empty file removed mano/webuser/__init__.py
Empty file.
84 changes: 0 additions & 84 deletions mano/webuser/lbs.py

This file was deleted.

55 changes: 0 additions & 55 deletions mano/webuser/posemapper.py

This file was deleted.

94 changes: 0 additions & 94 deletions mano/webuser/serialization.py

This file was deleted.

Loading

0 comments on commit 9a5d1e6

Please sign in to comment.