Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
balintlaczko committed Nov 13, 2021
1 parent 03c87f4 commit 353db36
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 97 deletions.
1 change: 1 addition & 0 deletions musicalgestures/documentation/MODULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Full list of [Musicalgestures](README.md#musicalgestures-index) project modules.
- [Motionvideo Mp Run](_motionvideo_mp_run.md#motionvideo-mp-run)
- [Pose](_pose.md#pose)
- [Show](_show.md#show)
- [Show Window](_show_window.md#show-window)
- [Utils](_utils.md#utils)
- [Videoadjust](_videoadjust.md#videoadjust)
- [Videograms](_videograms.md#videograms)
Expand Down
8 changes: 4 additions & 4 deletions musicalgestures/documentation/_motionvideo_mp_render.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@

## bool_from_str

[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L205)
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L201)

```python
def bool_from_str(boolstring):
```

## calc_frame_groups

[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L191)
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L187)

```python
def calc_frame_groups(framecount, num_cores):
```

## mg_motion_mp

[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L19)
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L14)

```python
def mg_motion_mp(args):
```

## run_pool

[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L186)
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_motionvideo_mp_render.py#L182)

```python
def run_pool(func, args, numprocesses):
Expand Down
14 changes: 7 additions & 7 deletions musicalgestures/documentation/_pose.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## download_model

[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_pose.py#L323)
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_pose.py#L344)

```python
def download_model(modeltype):
Expand All @@ -23,10 +23,10 @@ Helper function to automatically download model (.caffemodel) files.
```python
def pose(
self,
model='mpi',
device='cpu',
model='body_25',
device='gpu',
threshold=0.1,
downsampling_factor=4,
downsampling_factor=2,
save_data=True,
data_format='csv',
save_video=True,
Expand All @@ -42,10 +42,10 @@ Outputs the predictions in a text file containing the normalized x and y coordin

#### Arguments

- `model` *str, optional* - 'mpi' loads the model trained on the Multi-Person Dataset (MPII), 'coco' loads one trained on the COCO dataset. The MPII model outputs 15 points, while the COCO model produces 18 points. Defaults to 'mpi'.
- `device` *str, optional* - Sets the backend to use for the neural network ('cpu' or 'gpu'). Defaults to 'cpu'.
- `model` *str, optional* - 'body_25' loads the model trained on the BODY_25 dataset, 'mpi' loads the model trained on the Multi-Person Dataset (MPII), 'coco' loads one trained on the COCO dataset. The BODY_25 model outputs 25 points, the MPII model outputs 15 points, while the COCO model produces 18 points. Defaults to 'body_25'.
- `device` *str, optional* - Sets the backend to use for the neural network ('cpu' or 'gpu'). Defaults to 'gpu'.
- `threshold` *float, optional* - The normalized confidence threshold that decides whether we keep or discard a predicted point. Discarded points get substituted with (0, 0) in the output data. Defaults to 0.1.
- `downsampling_factor` *int, optional* - Decides how much we downsample the video before we pass it to the neural network. For example `downsampling_factor=4` means that the input to the network is one-fourth the resolution of the source video. Heaviver downsampling reduces rendering time but produces lower quality pose estimation. Defaults to 4.
- `downsampling_factor` *int, optional* - Decides how much we downsample the video before we pass it to the neural network. For example `downsampling_factor=4` means that the input to the network is one-fourth the resolution of the source video. Heaviver downsampling reduces rendering time but produces lower quality pose estimation. Defaults to 2.
- `save_data` *bool, optional* - Whether we save the predicted pose data to a file. Defaults to True.
- `data_format` *str, optional* - Specifies format of pose-data. Accepted values are 'csv', 'tsv' and 'txt'. For multiple output formats, use list, eg. ['csv', 'txt']. Defaults to 'csv'.
- `save_video` *bool, optional* - Whether we save the video with the estimated pose overlaid on it. Defaults to True.
Expand Down
12 changes: 5 additions & 7 deletions musicalgestures/documentation/_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
- [Musicalgestures](README.md#musicalgestures-index) / [Modules](MODULES.md#musicalgestures-modules) / Show
- [mg_show](#mg_show)
- [show_async](#show_async)
- [show_in_new_process](#show_in_new_process)

## mg_show

[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_show.py#L15)
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_show.py#L16)

```python
def mg_show(
Expand All @@ -33,12 +33,10 @@ General method to show an image or video file either in a window, or inline in a
- `window_height` *int, optional* - The height of the window. Defaults to 480.
- `window_title` *str, optional* - The title of the window. If None, the title of the window will be the file name. Defaults to None.

## show_async
## show_in_new_process

[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_show.py#L263)
[[find in source code]](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_show.py#L222)

```python
def show_async(command):
def show_in_new_process(command):
```

Helper function to show ffplay windows asynchronously
5 changes: 5 additions & 0 deletions musicalgestures/documentation/_show_window.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Show Window

> Auto-generated documentation for [_show_window](https://github.com/fourMs/MGT-python/blob/master/musicalgestures/_show_window.py) module.
- [Musicalgestures](README.md#musicalgestures-index) / [Modules](MODULES.md#musicalgestures-modules) / Show Window
Loading

0 comments on commit 353db36

Please sign in to comment.