You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: body-tracking-samples/sample_unity_bodytracking/README.md
+66-62Lines changed: 66 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
3
3
### Directions for getting started:
4
4
5
-
6
5
#### 1) First get the latest nuget packages of libraries:
7
6
8
7
Open the sample_unity_bodytracking project in Unity.
@@ -20,42 +19,41 @@ Update-Package -reinstall
20
19
21
20
The latest libraries will be put in the Packages folder under sample_unity_bodytracking
22
21
22
+
#### 2) Next add these libraries to the Assets/Plugins folder:
23
23
24
-
#### 2) Next download the latest Body Tracking Package
25
-
26
-
Go to: https://docs.microsoft.com/en-us/azure/kinect-dk/body-sdk-download and follow the directions to install the sdk for version 1.1.0
27
-
28
-
The default location for the SDK is: C:\Program Files\Azure Kinect Body Tracking SDK
29
-
30
-
**You can download the SDK wherever you like but you will then need to update the paths in the MoveLibraryFiles.bat file**
31
-
32
-
set BODY_TRACKING_SDK_PATH="YOUR PATH HERE"
33
-
24
+
You can do this by hand or just **run the batch file MoveLibraryFile.bat** in the sample_unity_bodytracking directory
34
25
35
-
#### 3) Next add these libraries to the Assets/Plugins folder:
36
-
37
-
You can do this by hand or just run the batch file MoveLibraryFile.bat in the sample_unity_bodytracking directory
38
-
39
-
40
-
From Wherever You Installed Azure Kinect Body Tracking SDK\sdk\netstandard2.0\release
26
+
From Packages/Microsoft.Azure.Kinect.BodyTracking.1.1.2/lib/netstandard2.0
41
27
42
28
- Microsoft.Azure.Kinect.BodyTracking.deps.json
43
29
- Microsoft.Azure.Kinect.BodyTracking.xml
44
30
- Microsoft.Azure.Kinect.BodyTracking.dll
45
31
- Microsoft.Azure.Kinect.BodyTracking.pdb
46
32
33
+
From Packages/Microsoft.Azure.Kinect.BodyTracking.1.1.2/lib/native/amd64/release/
34
+
35
+
- k4abt.dll
36
+
37
+
From Packages/Microsoft.Azure.Kinect.BodyTracking.ONNXRuntime.1.10.0/lib/native/amd64/release
38
+
39
+
- directml.dll
40
+
- onnxruntime.dll
41
+
- onnxruntime_providers_cuda.dll
42
+
- onnxruntime_providers_shared.dll
43
+
- onnxruntime_providers_tensorrt.dll
44
+
47
45
From Packages/Microsoft.Azure.Kinect.Sensor.1.4.1/lib/netstandard2.0
48
46
49
47
- Microsoft.Azure.Kinect.Sensor.deps.json
50
48
- Microsoft.Azure.Kinect.Sensor.xml
51
49
- Microsoft.Azure.Kinect.Sensor.dll
52
50
- Microsoft.Azure.Kinect.Sensor.pdb
53
51
54
-
From AzureKinect Body Tracking SDK\tools
52
+
From Packages/Microsoft.Azure.Kinect.Sensor.1.4.1/lib/native/amd64/release
55
53
56
-
-cudart64_110.dll
57
-
-cublas64_11.dll
58
-
-cublasLt64_11.dll
54
+
-depthengine_2_0.dll
55
+
-k4a.dll
56
+
-k4arecord.dll
59
57
60
58
From Packages/System.Buffers.4.4.0/lib/netstandard2.0
61
59
@@ -73,71 +71,77 @@ From Packages/System.Runtime.CompilerServices.Unsafe.4.5.2/lib/netstandard2.0
73
71
74
72
- System.Runtime.CompilerServices.Unsafe.dll
75
73
76
-
From Packages/Microsoft.Azure.Kinect.Sensor.1.4.1/lib/native/amd64/release
77
74
78
-
- depthengine_2_0.dll
79
-
- k4a.dll
80
-
- k4arecord.dll
75
+
#### 3) Then add these libraries to the sample_unity_bodytracking project root directory that contains the Assets folder:
81
76
82
-
From Azure Kinect Body Tracking SDK\sdk\windows-desktop\amd64\release\bin
77
+
You can do this by hand or just **run the batch file MoveLibraryFile.bat** in the sample_unity_bodytracking directory
83
78
84
-
- k4abt.dll
79
+
From Packages/Microsoft.Azure.Kinect.BodyTracking.1.1.2/content
80
+
81
+
- dnn_model_2_0_op11.onnx
82
+
83
+
From Packages/Microsoft.Azure.Kinect.BodyTracking.ONNXRuntime.1.10.0/lib/native/amd64/release
84
+
85
+
- directml.dll
85
86
- onnxruntime.dll
87
+
- onnxruntime_providers_cuda.dll
88
+
- onnxruntime_providers_shared.dll
89
+
- onnxruntime_providers_tensorrt.dll
86
90
87
91
88
-
#### 4) Then add these libraries to the sample_unity_bodytracking project root directory that contains the Assets folder
92
+
#### 4) Next make sure you have all the [required DLLs for ONNX Runtime execution](https://docs.microsoft.com/en-us/azure/kinect-dk/body-sdk-setup#required-dlls-for-onnx-runtime-execution-environments):
89
93
90
-
From Azure Kinect Body Tracking SDK\tools\
94
+
First, download and install [Visual C++ Redistributable](https://docs.microsoft.com/en-us/azure/kinect-dk/body-sdk-setup#visual-c-redistributable-for-visual-studio-2015).
91
95
92
-
- cudnn64_8.dll
93
-
- cudnn_cnn_infer64_8.dll
94
-
- cudnn_ops_infer64_8.dll
96
+
Additionally:
95
97
96
-
From Azure Kinect Body Tracking SDK\tools\
98
+
**For CUDA**:
99
+
* Download and install appropriate version of CUDA and make sure that CUDA_PATH exists as an environment variable (e.g C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4).
100
+
* Download and install appropriate version of cuDNN and add a value to the PATH environment variable for it (e.g C:\Program Files\NVIDIA GPU Computing Toolkit\cuda-8.2.2.6\bin).
97
101
98
-
- cudart64_110.dll
99
-
- cublas64_11.dll
100
-
- cublasLt64_11.dll
101
-
- cufft64_10.dll
102
+
**For TensorRT**:
103
+
* Download and install appropriate version of CUDA and make sure that CUDA_PATH exists as an environment variable (e.g C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4).
104
+
* Download and install appropriate version of TensorRT and add a value to the PATH environment variable for it (e.g C:\Program Files\NVIDIA GPU Computing Toolkit\TensorRT-8.2.1.8\lib).
102
105
103
-
From Azure Kinect Body Tracking SDK\tools\
106
+
**For DirectML**:
107
+
* Copy the **directml.dll** from the sample_unity_bodytracking folder to the unity editor directory (e.g C:\Program Files\Unity\Hub\Editor\2019.1.2f1\Editor)
104
108
105
-
- onnxruntime.dll
106
109
107
-
From Azure Kinect Body Tracking SDK\tools\
110
+
#### 5) Then specify Execution Provider for the tracking:
108
111
109
-
- dnn_model_2_0_op11.onnx
112
+
In the ...\sample_unity_bodytracking\Assets\Scripts\SkeletalTrackingProvider.cs change the ProcessingMode to the one you want.
113
+
114
+
* TrackerProcessingMode.GPU (Defaults to DirectML for Windows)
115
+
* TrackerProcessingMode.CPU
116
+
* TrackerProcessingMode.Cuda
117
+
* TrackerProcessingMode.TensorRT
118
+
* TrackerProcessingMode.DirectML
110
119
111
120
112
-
#### 5) Open the Unity Project and under Scenes/ select the Kinect4AzureSampleScene
121
+
#### 6) Open the Unity Project and under Scenes/ select the Kinect4AzureSampleScene:
113
122
114
123

115
124
116
125
117
126
Press play.
118
127
119
-
#### If you wish to create a new scene just:
120
128
121
-
1) create a gameobject and add the component for the main.cs script
122
-
2) go to the prefab folder and drop in the Kinect4AzureTracker prefab
123
-
3) now drag the gameobject for the Kinect4AzureTracker onto the Tracker slot in the main object in the inspector.
129
+
#### If you wish to create a new scene:
124
130
131
+
* Create a gameobject and add the component for the main.cs script.
132
+
* Go to the prefab folder and drop in the Kinect4AzureTracker prefab.
133
+
* Now drag the gameobject for the Kinect4AzureTracker onto the Tracker slot in the main object in the inspector.
125
134
126
-
### Finally if you Build a Standalone Executable
127
-
####Then you will need to put these files in the same directory with the .exe:
128
135
129
-
- onnxruntime.dll
130
-
- onnxruntime_providers_cuda.dll
131
-
- onnxruntime_providers_shared.dll
132
-
- onnxruntime_providers_tensorrt.dll
133
-
- dnn_model_2_0_op11.onnx
134
-
- dnn_model_2_0_lite_op11.onnx
135
-
- cudnn64_8.dll
136
-
- cudnn_cnn_infer64_8.dll
137
-
- cudnn_ops_infer64_8.dll
138
-
- cudart64_110.dll
139
-
- cublas64_11.dll
140
-
- cublasLt64_11.dll
141
-
- cufft64_10.dll
142
-
- directml.dll
136
+
### Finally if you Build a Standalone Executable:
137
+
138
+
You will need to put [required DLLs for ONNX Runtime execution](https://docs.microsoft.com/en-us/azure/kinect-dk/body-sdk-setup#required-dlls-for-onnx-runtime-execution-environments) in the same directory with the .exe:
139
+
140
+
You can copy ONNXRuntime and DirectML files from nuget package by hand or from sample_unity_bodytracking directory after running **the batch file MoveLibraryFile.bat** (Step #3)
141
+
142
+
For the CUDA/cuDNN/TensorRT DLLs (Step #4) you can either have them in the PATH environment variable or copy required set of DLLs from the installation locations:
143
143
144
+
e.g.
145
+
* from C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin for the CUDA files.
146
+
* from C:\Program Files\NVIDIA GPU Computing Toolkit\cuda-8.2.2.6\bin for the cuDNN files.
147
+
* from C:\Program Files\NVIDIA GPU Computing Toolkit\TensorRT-8.2.1.8\lib for the TensorRT files.
0 commit comments