Skip to content

Commit 55ec9f2

Browse files
committed
Fix a typo on simplePosetEstimation.m in GPU deployment.
Regenerate all HTML files to ship as a toolbox.
1 parent b543e17 commit 55ec9f2

17 files changed

+271
-55
lines changed

doc/SimplePoseNetEstimationOnJetson.md

+124-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Deploy Simple Pose Estimation on NVIDIA® Jetson Using GPU Coder
1+
# Deploy Simple Pose Estimation on NVIDIA(R) Jetson(TM) Using GPU Coder(TM)
22

33

44
![image_0_png.jpg](SimplePoseNetEstimationOnJetson_images/image_0_png.jpg)
@@ -29,7 +29,28 @@ Running on a Jetson AGX Xavier.
2929

3030
```matlab:Code
3131
clear;
32-
hwobj = jetson('192.168.55.1', 'nvidia', 'nvidia');
32+
hwobj = jetson('tohru-jetson-nano', 'nvidia', 'nvidia');
33+
```
34+
35+
36+
```text:Output
37+
Checking for CUDA availability on the Target...
38+
Checking for 'nvcc' in the target system path...
39+
Checking for cuDNN library availability on the Target...
40+
Checking for TensorRT library availability on the Target...
41+
Checking for prerequisite libraries is complete.
42+
Gathering hardware details...
43+
Checking for third-party library availability on the Target...
44+
Gathering hardware details is complete.
45+
Board name : NVIDIA Jetson TX1
46+
CUDA Version : 10.0
47+
cuDNN Version : 7.3
48+
TensorRT Version : 5.0
49+
GStreamer Version : 1.14.5
50+
V4L2 Version : 1.14.2-1
51+
SDL Version : 1.2
52+
Available Webcams : MicrosoftÂ(R) LifeCam Cinema(TM)
53+
Available GPUs : NVIDIA Tegra X1
3354
```
3455

3556
# **Verify the GPU Environment**
@@ -41,12 +62,24 @@ Use the [coder.checkGpuInstall](matlab:doc('coder.checkGpuInstall')) function an
4162

4263
```matlab:Code
4364
envCfg = coder.gpuEnvConfig('jetson');
44-
envCfg.DeepLibTarget = 'tensorrt';
65+
envCfg.DeepLibTarget = 'cudnn';
4566
envCfg.DeepCodegen = 1;
4667
envCfg.HardwareObject = hwobj;
4768
coder.checkGpuInstall(envCfg);
4869
```
4970

71+
72+
```text:Output
73+
互換性のある GPU : パス
74+
CUDA 環境 : パス
75+
ランタイム : パス
76+
cuFFT : パス
77+
cuSOLVER : パス
78+
cuBLAS : パス
79+
cuDNN 環境 : パス (警告: 深層学習コード生成は、cuDNN v7.5 を使用してテストされました。指定された cuDNN ライブラリの v7.3 に完全な互換性がない可能性があります。)
80+
深層学習 (cuDNN) コードの生成 : パス
81+
```
82+
5083
# **Prepare Pose Estimation for Stand-Alone Deployment**
5184

5285

@@ -61,13 +94,41 @@ d = imageDisplay(hwobj);
6194
image(d,img);
6295
```
6396

97+
98+
![figure_0_png.jpg](SimplePoseNetEstimationOnJetson_images/figure_0_png.jpg)
99+
64100
# Test Pose Estimation Function on MATLAB
65101

66102
```matlab:Code
67103
clear hwobj d w envCfg;
68104
figure;
69105
set(gcf,'Visible','on');
70106
simplePoseEstimation
107+
```
108+
109+
110+
```text:Output
111+
Checking for CUDA availability on the Target...
112+
Checking for 'nvcc' in the target system path...
113+
Checking for cuDNN library availability on the Target...
114+
Checking for TensorRT library availability on the Target...
115+
Checking for prerequisite libraries is complete.
116+
Gathering hardware details...
117+
Checking for third-party library availability on the Target...
118+
Gathering hardware details is complete.
119+
Board name : NVIDIA Jetson TX1
120+
CUDA Version : 10.0
121+
cuDNN Version : 7.3
122+
TensorRT Version : 5.0
123+
GStreamer Version : 1.14.5
124+
V4L2 Version : 1.14.2-1
125+
SDL Version : 1.2
126+
Available Webcams : MicrosoftÂ(R) LifeCam Cinema(TM)
127+
Available GPUs : NVIDIA Tegra X1
128+
```
129+
130+
131+
```matlab:Code
71132
% Need to Ctrl+C to stop the running program.
72133
```
73134

@@ -77,25 +138,83 @@ simplePoseEstimation
77138
cfg = coder.gpuConfig('exe');
78139
cfg.Hardware = coder.hardware('NVIDIA Jetson');
79140
cfg.Hardware.BuildDir = '~/remoteBuildDir';
80-
cfg.DeepLearningConfig = coder.DeepLearningConfig('tensorrt');
141+
cfg.DeepLearningConfig = coder.DeepLearningConfig('cudnn');
81142
cfg.GenerateExampleMain = 'GenerateCodeAndCompile';
82143
codegen('-config ',cfg,'simplePoseEstimation.m','-report');
83144
```
84145

146+
147+
```text:Output
148+
Warning: 無限ループのため、関数 'simplePoseEstimation' が終了しません。
149+
150+
警告 ==> simplePoseEstimation 行: 65 列: 1
151+
コードの生成が成功しました (警告あり):レポートの表示
152+
```
153+
85154
# Run the Pose Estimation on the Target
86155

87156

88-
To run the generated executable on the target, use the MATLAB® runApplication function.
157+
To run the generated executable on the target, use the MATLAB(R) runApplication function.
89158

90159

91160

92161
```matlab:Code
93162
clear hwobj;
94163
hwobj = jetson
164+
```
165+
166+
167+
```text:Output
168+
Checking for CUDA availability on the Target...
169+
Checking for 'nvcc' in the target system path...
170+
Checking for cuDNN library availability on the Target...
171+
Checking for TensorRT library availability on the Target...
172+
Checking for prerequisite libraries is complete.
173+
Gathering hardware details...
174+
Checking for third-party library availability on the Target...
175+
Gathering hardware details is complete.
176+
Board name : NVIDIA Jetson TX1
177+
CUDA Version : 10.0
178+
cuDNN Version : 7.3
179+
TensorRT Version : 5.0
180+
GStreamer Version : 1.14.5
181+
V4L2 Version : 1.14.2-1
182+
SDL Version : 1.2
183+
Available Webcams : MicrosoftÂ(R) LifeCam Cinema(TM)
184+
Available GPUs : NVIDIA Tegra X1
185+
hwobj =
186+
jetson のプロパティ:
187+
188+
DeviceAddress: 'tohru-jetson-nano'
189+
Port: 22
190+
BoardName: 'NVIDIA Jetson TX1'
191+
CUDAVersion: '10.0'
192+
cuDNNVersion: '7.3'
193+
TensorRTVersion: '5.0'
194+
SDLVersion: '1.2'
195+
V4L2Version: '1.14.2-1'
196+
GStreamerVersion: '1.14.5'
197+
GPUInfo: [1x1 struct]
198+
WebcamList: {'MicrosoftÂ(R) LifeCam Cinema(TM)'}
199+
200+
```
201+
202+
203+
```matlab:Code
95204
pid = runApplication(hwobj,'simplePoseEstimation');
96205
```
97206

98207

208+
```text:Output
209+
### Launching the executable on the target...
210+
Executable launched successfully with process ID 6938.
211+
Displaying the simple runtime log for the executable...
212+
213+
Note: For the complete log, run the following command in the MATLAB command window:
214+
system(hwobj,'cat /home/nvidia/remoteBuildDir/MATLAB_ws/R2020a/C/matlab/pose-estimation-github/work/simplePoseEstimation.log')
215+
```
216+
217+
99218
```matlab:Code
100219
%killApplication(hwobj,'simplePoseEstimation');
101220
```
Loading

doc/SimplePoseNetEstimationWithWebcamExample.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This example shows how to predict human poses using a pretrained mode with a web
1212
# Load Camera and Pretrained Network
1313

1414

15-
Connect to the camera and load a pretrained GoogLeNet network. You can use any pretrained network at this step. The example requires MATLAB Support Package for USB Webcams, and Deep Learning Toolbox Model *for GoogLeNet Network*. If you do not have the required support packages installed, then the software provides a download link.
15+
Connect to the camera and load a pretrained GoogLeNet network. You can use any pretrained network at this step. The example requires MATLAB Support Package for USB Webcams, and Deep Learning Toolbox(TM) Model *for GoogLeNet Network*. If you do not have the required support packages installed, then the software provides a download link.
1616

1717

1818

doc/SimplePoseNetTrainingExample.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ As a training dataset, we use COCO\hyperref{72EF1FDB}{[2]}. COCO's annotation da
3131

3232
```matlab:Code
3333
% COCO datset root directory.
34-
cocoDir = 'D:\coco';
34+
cocoDir = 'D:\Dataset\coco';
3535
if ~exist(cocoDir,"dir")
3636
error("Dataset cannot be found.")
3737
end
@@ -334,7 +334,7 @@ initialLearnRate = 0.001;
334334

335335

336336

337-
Train on a GPU if one is available. Using a GPU requires Parallel Computing Toolbox and a CUDA® enabled NVIDIA® GPU with compute capability 3.0 or higher.
337+
Train on a GPU if one is available. Using a GPU requires Parallel Computing Toolbox(TM) and a CUDA(R) enabled NVIDIA(R) GPU with compute capability 3.0 or higher.
338338

339339

340340

@@ -824,7 +824,11 @@ end
824824
end
825825
```
826826

827-
827+
828+
829+
**Heatmaps visualization:**
830+
831+
828832

829833
```matlab:Code
830834
function Iout = visualizeHeatmaps(heatmaps, I)
@@ -843,7 +847,11 @@ Iout = im2uint8(Iout);
843847
end
844848
```
845849

846-
850+
851+
852+
**Keypoints visualization:**
853+
854+
847855

848856
```matlab:Code
849857
function Iout = visualizeKeyPoints(I,joints,skeleton,bboxes)
Loading

src/doc/GettingStarted.mlx

2 Bytes
Binary file not shown.
File renamed without changes.
72.2 KB
Binary file not shown.
Binary file not shown.
1004 Bytes
Binary file not shown.

src/doc/html/GettingStarted.html

+6-10
Large diffs are not rendered by default.

src/doc/html/README.html

+1-1
Large diffs are not rendered by default.

src/doc/html/SimplePoseNetEstimationOnJetson.html

+105-7
Large diffs are not rendered by default.

src/doc/html/SimplePoseNetEstimationWithWebcamExample.html

+3-3
Large diffs are not rendered by default.

src/doc/html/SimplePoseNetForMultiPerson.html

+5-5
Large diffs are not rendered by default.

src/doc/html/SimplePoseNetTrainingExample.html

+11-11
Large diffs are not rendered by default.

src/doc/simplePoseEstimation.m

+3-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
%
44
% Copyright 2019 The MathWorks, Inc.
55

6-
function simplePoseEstimation
7-
%#codegen
8-
%
9-
% Copyright 2019 The MathWorks, Inc.
10-
116
persistent simplePoseNet;
127
if isempty(simplePoseNet)
13-
simplePoseNet = coder.loadDeepLearningNetwork('..\train\simplePoseNet.mat','simplePoseNet');
8+
simplePoseNet = coder.loadDeepLearningNetwork('simplePoseNet.mat','simplePoseNet');
149
end
1510

1611
hwobj = jetson; % To redirect to the code generatable functions.
@@ -31,8 +26,8 @@
3126

3227
% Detect keypoints
3328
output = simplePoseNet.predict(Icrop);
34-
[scores,idx] = max(output,[],[1,2],'linear');
35-
[y,x,~,~] = ind2sub(size(output),idx);
29+
[scores,idx_out] = max(output,[],[1,2],'linear');
30+
[y,x,~,~] = ind2sub(size(output),idx_out);
3631
keypoints = permute(cat(1,x,y),[3,1,2]);
3732

3833
% Display image.

0 commit comments

Comments
 (0)