include Batch Demo folder + minor edits

This commit is contained in:
davidpagnon 2024-07-30 16:13:42 +02:00
parent 3bb2c5dfb6
commit 48f169dfdb
5 changed files with 22 additions and 16 deletions

View File

@ -19,7 +19,7 @@ parameters may be wrong. Set show_corner_detection to 1 to verify.
INPUTS: INPUTS:
- a calibration file in the 'calibration' folder (.qca.txt extension) - a calibration file in the 'calibration' folder (.qca.txt extension)
- OR folders 'calibration\intrinsics' (populated with video or about 30 images) and 'calibration\extrinsics' (populated with video or one image) - OR folders 'calibration/intrinsics' (populated with video or about 30 images) and 'calibration/extrinsics' (populated with video or one image)
- a Config.toml file in the 'User' folder - a Config.toml file in the 'User' folder
OUTPUTS: OUTPUTS:

View File

@ -17,7 +17,7 @@ The definition and hierarchy of the following skeletons are available:
N.B.: Not all face and hand keypoints are reported in the skeleton architecture, N.B.: Not all face and hand keypoints are reported in the skeleton architecture,
since some are redundant for the orientation of some bodies. since some are redundant for the orientation of some bodies.
N.B.: The corresponding OpenSim model files are provided in the "Pose2Sim\Empty project" folder. N.B.: The corresponding OpenSim model files are provided in the "Pose2Sim/Empty project" folder.
If you wish to use any other, you will need to adjust the markerset in the .osim model file, If you wish to use any other, you will need to adjust the markerset in the .osim model file,
as well as in the scaling and IK setup files. as well as in the scaling and IK setup files.
''' '''
@ -372,8 +372,8 @@ COCO_133 = Node("CHip", id=None, children=[
]), ]),
Node("Neck", id=None, children=[ Node("Neck", id=None, children=[
Node("Nose", id=0, children=[ Node("Nose", id=0, children=[
Node("right_eye", id=2), Node("REye", id=2),
Node("left_eye", id=1), Node("LEye", id=1),
]), ]),
Node("RShoulder", id=6, children=[ Node("RShoulder", id=6, children=[
Node("RElbow", id=8, children=[ Node("RElbow", id=8, children=[

View File

@ -160,9 +160,9 @@ def time_lagged_cross_corr(camx, camy, lag_range, show=True, ref_cam_id=0, cam_i
Compute the time-lagged cross-correlation between two pandas series. Compute the time-lagged cross-correlation between two pandas series.
INPUTS: INPUTS:
- camx: pandas series. The first time series (coordinates of reference camera). - camx: pandas series. Coordinates of reference camera.
- camy: pandas series. The second time series (camera to compare). - camy: pandas series. Coordinates of camera to compare.
- lag_range: int or list. The range of frames for which to compute cross-correlation. - lag_range: int or list. Range of frames for which to compute cross-correlation.
- show: bool. If True, display the cross-correlation plot. - show: bool. If True, display the cross-correlation plot.
- ref_cam_id: int. The reference camera id. - ref_cam_id: int. The reference camera id.
- cam_id: int. The camera id to compare. - cam_id: int. The camera id to compare.

View File

@ -130,23 +130,28 @@ If you don't use Anaconda, type `python -V` in terminal to make sure python>=3.9
4. ***Optional:***\ 4. ***Optional:***\
*For faster inference, you can run on the GPU. Install pyTorch with CUDA and cuDNN support, and ONNX Runtime with GPU support (not available on MacOS). Be aware that it takes an additional 4 GB on disk.* *For faster inference, you can run on the GPU. Install pyTorch with CUDA and cuDNN support, and ONNX Runtime with GPU support (not available on MacOS). Be aware that it takes an additional 4 GB on disk.*
Go to the [pyTorch website]( https://pytorch.org/get-started/locally), select the latest CUDA version that is also [available with ONNX runtime](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), and run the provided command.\ Go to the [ONNXruntime requirement page](https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), check the latest CUDA and cuDNN requirements. Then go to the [pyTorch website]( https://pytorch.org/get-started/locally) and install the latest version that satisfies these requirements (beware that torch 2.4 ships with cuDNN 9, while torch 2.3 installs cuDNN 8). For example:
For example, for Windows 11 (June 6th, 2024), CUDA 12.4 is not available for pyTorch, and CUDA 12.1 is not available for ONNX Runtime, so you should revert to CUDA 11.8: ``` cmd
``` pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
``` ```
***Note:*** issues reported with the default command. However, this has been tested and works:
`pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu118`
Then install ONNX Runtime with GPU support: Then install ONNX Runtime with GPU support:
``` ```
pip install onnxruntime-gpu pip install onnxruntime-gpu
``` ```
> Note on storage use:\ > Note on storage use:\
<img src="Content/Storage.png" width="760"> <img src="Content/Storage.png" width="760">
<!-- import torch; torch.cuda.is_available() <!-- import torch; print(torch.cuda.is_available())
import onnxruntime as ort; ort.get_available_providers()--> import onnxruntime as ort; ort.get_available_providers()
print(f'torch version: {torch.__version__}, cuda version: {torch.version.cuda}, cudnn version: {torch.backends.cudnn.version()}, onnxruntime version: {ort.__version__}') -->
</br> </br>

View File

@ -55,4 +55,5 @@ install_requires =
packages = find_namespace: packages = find_namespace:
[options.package_data] [options.package_data]
* = OpenSim_Setup/**, MarkerAugmenter/**, Demo_SinglePerson/**, Demo_SinglePerson/**/.*, Demo_SinglePerson/**/**/.*, Demo_SinglePerson/**/**/**/.*, Demo_MultiPerson/**, Demo_MultiPerson/**/.* * = OpenSim_Setup/**, MarkerAugmenter/**,
Demo_SinglePerson/**, Demo_SinglePerson/**/.*, Demo_SinglePerson/**/**/.*, Demo_SinglePerson/**/**/**/.*, Demo_MultiPerson/**, Demo_MultiPerson/**/.*, Demo_Batch/**, Demo_Batch/**/.*, Demo_Batch/**/**/.*