AI Based Object Redaction/Performance: Difference between revisions

From RidgeRun Developer Wiki
mNo edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The library has two major components: detection of the desired object done by ONNX model and the application of the redaction effect done either by the CPU or GPU.
<noinclude>
{{AI Based Object Redaction/Head|previous=Examples/GStreamer Pipelines|next=Performance/Jetson_Xavier_NX|metakeywords=}}
</noinclude>


For testing purposes, take into account the folowing points:
<!----
{{DISPLAYTITLE:AI Based Object Redaction - Performance|noerror}}
---->
 
 
The library has four major consuming methods: convert the input buffer to the desired format and size of the AI model, the detection of the desired object done by the ONNX model, tracking and the application of the redaction effect.
 
For testing purposes, take into account the following points:
* Jetpack 5.1.X
* Jetpack 5.1.X
* Tested with GPU+CPU and CPU only. For GPU, execution done with TensorRT and CUDA.
* Tested with GPU and CPU only. For GPU, execution is done with TensorRT and CUDA.
* The library offers two approaches: each method used separately and all together using the apply method.  
* The library offers two approaches: each method used separately and all together using the apply method.  
* The metrics measured are: CPU and GPU consumption, processing time and FPS.
* The metrics measured are CPU and GPU consumption, processing time, and FPS.
* The tracker is implemented only with support for CPU.  
* The tracker is implemented only with support for CPU.  


== '''Xavier NX''' ==
Check the following links for performance:
In this section you will find the performance for the methods separated and for all of them together regarding the Jetson Xavier NX.
=== GPU ===
* TensorRT
{| class="wikitable" style="text-align:center;"
|-
! colspan="13" | Image 1080p- 7 faces
|-
| Platform
| colspan="12" | Xavier NX(6-core 20WMode )
|-
| Method
| colspan="4" style="background-color:#ffce93;" | Convert
| colspan="4" style="background-color:#9aff99;" | Detect
| colspan="4" style="background-color:#fffc9e;" | Redact
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | GPU%/VRAM
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | GPU%/VRAM
| style="background-color:#9aff99;" | Processing time
| style="background-color:#9aff99;" | FPS
| style="background-color:#fffc9e;" | CPU%
| style="background-color:#fffc9e;" | GPU%/VRAM
| style="background-color:#fffc9e;" | Processing time
| style="background-color:#fffc9e; text-align:left;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 1.04%<br />Core: 6.25%
| style="background-color:#ffce93;" | 1.08%<br />85 MiB
| style="background-color:#ffce93;" | 4.988 ms
| style="background-color:#ffce93;" | 200.5
| style="background-color:#9aff99;" | All: 4.42%<br />Core: 20.53%
| style="background-color:#9aff99;" | 3.37%<br />85 MiB
| style="background-color:#9aff99;" | 23.628 ms
| style="background-color:#9aff99;" | 42
| style="background-color:#fffc9e;" | All: 0.68%<br />Core: 4.11%
| style="background-color:#fffc9e;" | 4.38%<br />85 MiB
| style="background-color:#fffc9e;" | 20.024 ms
| style="background-color:#fffc9e; text-align:left;" | 49.9
|}
{| class="wikitable" style="text-align:center;"
|-
! colspan="5" | Image 1080p- 7 faces
|-
| Platform
| colspan="4" | Xavier NX(6-core 20WMode )
|-
| Method
| colspan="4" style="background-color:#ffffff;" | Apply
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | GPU%/VRAM
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 3.58%<br />Core: 21.46%
| style="background-color:#ffce93;" | 4.08%<br />85 MiB
| style="background-color:#ffce93;" | 33.3 ms
| style="background-color:#ffce93;" | 30
|}
 
* CUDA
{| class="wikitable" style="text-align:center;"
|-
! colspan="13" | Image 1080p- 7 faces
|-
| Platform
| colspan="12" | Xavier NX(6-core 20WMode )
|-
| Method
| colspan="4" style="background-color:#ffce93;" | Convert
| colspan="4" style="background-color:#9aff99;" | Detect
| colspan="4" style="background-color:#fffc9e;" | Redact
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | GPU%/VRAM
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | GPU%/VRAM
| style="background-color:#9aff99;" | Processing time
| style="background-color:#9aff99;" | FPS
| style="background-color:#fffc9e;" | CPU%
| style="background-color:#fffc9e;" | GPU%/VRAM
| style="background-color:#fffc9e;" | Processing time
| style="background-color:#fffc9e; text-align:left;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 1.05%<br />Core: 6.3%
| style="background-color:#ffce93;" | 1.039%<br />78 MiB
| style="background-color:#ffce93;" | 5 ms
| style="background-color:#ffce93;" | 200
| style="background-color:#9aff99;" | All: 5.03%<br />Core: 30.17%
| style="background-color:#9aff99;" | 4.46%<br />83 MiB
| style="background-color:#9aff99;" | 27.78 ms
| style="background-color:#9aff99;" | 36
| style="background-color:#fffc9e;" | All: 0.8%<br />Core: 4.83%
| style="background-color:#fffc9e;" | 4.8%<br />83 MiB
| style="background-color:#fffc9e;" | 20.307 ms
| style="background-color:#fffc9e; text-align:left;" | 49.2
|}
 
{| class="wikitable" style="text-align:center;"
|-
! colspan="5" | Image 1080p- 7 faces
|-
| Platform
| colspan="4" | Xavier NX(6-core 20WMode )
|-
| Method
| colspan="4" style="background-color:#ffffff;" | Apply
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | GPU%/VRAM
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 5.41%<br />Core: 32.43%
| style="background-color:#ffce93;" | 4.68%<br />83 MiB
| style="background-color:#ffce93;" | 35.851 ms
| style="background-color:#ffce93;" | 27.9
|}
 
=== CPU ===
{| class="wikitable" style="text-align:center;"
|-
! colspan="19" | Image 1080p- 7 faces
|-
| Platform
| colspan="18" | Xavier NX(Desktop Mode )
|-
| Method
| colspan="6" style="background-color:#ffce93;" | Convert
| colspan="6" style="background-color:#9aff99;" | Detect
| colspan="6" style="background-color:#ffffc7;" | Redact
|-
| Num threads
| colspan="3" style="background-color:#ffce93;" | 1
| colspan="3" style="background-color:#ffce93;" | 4
| colspan="3" style="background-color:#9aff99;" | 1
| colspan="3" style="background-color:#9aff99;" | 4
| colspan="3" style="background-color:#ffffc7;" | 1
| colspan="3" style="background-color:#ffffc7;" | 4
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | Processing time
| style="background-color:#9aff99;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | Processing Time
| style="background-color:#9aff99;" | FPS
| style="background-color:#ffffc7;" | CPU%
| style="background-color:#ffffc7;" | Processing Time
| style="background-color:#ffffc7;" | FPS
| style="background-color:#ffffc7;" | CPU%
| style="background-color:#ffffc7;" | Processing time
| style="background-color:#ffffc7;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 23.36%<br />Core: 140.17%
| style="background-color:#ffce93;" | 2.738 ms
| style="background-color:#ffce93;" | 365
| style="background-color:#ffce93;" | All: 23.33% <br />Core: 139.97%
| style="background-color:#ffce93;" | 2.723 ms
| style="background-color:#ffce93;" | 367
| style="background-color:#9aff99;" | All: 13.67%<br />Core: 82.04%
| style="background-color:#9aff99;" | 157.073 ms
| style="background-color:#9aff99;" | 6.36
| style="background-color:#9aff99;" | All: 41.42%<br />Core: 248.51%
| style="background-color:#9aff99;" | 94.265 ms
| style="background-color:#9aff99;" | 10.61
| style="background-color:#ffffc7;" | All: 14.68%<br />Core: 88.07%
| style="background-color:#ffffc7;" | 239.640 ms
| style="background-color:#ffffc7;" | 4.17
| style="background-color:#ffffc7;" | All: 14.67%<br />Core: 88.04%
| style="background-color:#ffffc7;" | 236.452 ms
| style="background-color:#ffffc7;" | 4.23
|}


{| class="wikitable" style="text-align:center;"
*;[[AI_Based_Object_Redaction/Performance/Jetson_Xavier_NX|Jetson Xavier NX]]
|-
! colspan="7" | Image 1080p- 7 faces
*;[[AI_Based_Object_Redaction/Performance/Jetson_Xavier_AGX|Jetson Xavier AGX]]
|-
| Platform
| colspan="6" | Xavier NX(Desktop Mode )
|-
| Method
| colspan="6" | Apply
|-
| Num threads
| colspan="3" style="background-color:#ffce93;" | 1
| colspan="3" style="background-color:#9aff99;" | 4
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | Processing time
| style="background-color:#9aff99;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 17.13%<br />Core: 102.77%
| style="background-color:#ffce93;" | 395,855 ms
| style="background-color:#ffce93;" | 2,53
| style="background-color:#9aff99;" | All: 27.16% <br />Core: 162.94%
| style="background-color:#9aff99;" | 331,721 ms
| style="background-color:#9aff99;" | 3
|}
== '''Xavier AGX''' ==
In this section you will find the performance for the methods separated and for all of them together regarding the Jetson Xavier NX.


=== CPU ===
<noinclude>
{| class="wikitable" style="text-align:center;"
{{AI Based Object Redaction/Foot|Examples/GStreamer Pipelines|Performance/Jetson_Xavier_NX}}
|-
</noinclude>
! colspan="25" | Image 1080p- 7 faces
|-
| Platform
| colspan="24" | Xavier AGX(Desktop Mode )
|-
| Method
| colspan="6" style="background-color:#ffce93;" | Convert
| colspan="6" style="background-color:#9aff99;" | Detect
| colspan="6" style="background-color:#96fffb;" | Track
| colspan="6" style="background-color:#fffc9e;" | Redact
|-
| Num threads
| colspan="3" style="background-color:#ffce93;" | 1
| colspan="3" style="background-color:#ffce93;" | 4
| colspan="3" style="background-color:#9aff99;" | 1
| colspan="3" style="background-color:#9aff99;" | 4
| colspan="3" style="background-color:#96fffb;" | 1
| colspan="3" style="background-color:#96fffb;" | 4
| colspan="3" style="background-color:#fffc9e;" | 1
| colspan="3" style="background-color:#fffc9e;" | 4
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | Processing time
| style="background-color:#9aff99;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | Processing Time
| style="background-color:#9aff99;" | FPS
| style="background-color:#96fffb;" | CPU%
| style="background-color:#96fffb;" | Processing Time
| style="background-color:#96fffb;" | FPS
| style="background-color:#96fffb;" | CPU%
| style="background-color:#96fffb;" | Processing time
| style="background-color:#96fffb;" | FPS
| style="background-color:#fffc9e;" | CPU%
| style="background-color:#fffc9e;" | Processing Time
| style="background-color:#fffc9e;" | FPS
| style="background-color:#fffc9e;" | CPU%
| style="background-color:#fffc9e;" | Processing time
| style="background-color:#fffc9e;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 9.12%<br />Core: 9.12%
| style="background-color:#ffce93;" | 3,069 ms
| style="background-color:#ffce93;" | 325.84
| style="background-color:#ffce93;" | All: 9.05% <br />Core: 36.21%
| style="background-color:#ffce93;" | 2,968 ms
| style="background-color:#ffce93;" | 336.93
| style="background-color:#9aff99;" | All: 18.51%<br />Core: 74.03%
| style="background-color:#9aff99;" | 99,577 ms
| style="background-color:#9aff99;" | 10,04
| style="background-color:#9aff99;" | All: 18.72%<br />Core: 74.86%
| style="background-color:#9aff99;" | 103,367 ms
| style="background-color:#9aff99;" | 9.67
| style="background-color:#96fffb;" | All: 6.71%<br />Core: 26.83%
| style="background-color:#96fffb;" | 11,889 ms
| style="background-color:#96fffb;" | 84,11
| style="background-color:#96fffb;" | All: 6.83%<br />Core: 27.32%
| style="background-color:#96fffb;" | 12,093 ms
| style="background-color:#96fffb;" | 82,69
| style="background-color:#fffc9e;" | All: 21.35%<br />Core: 85.38%
| style="background-color:#fffc9e;" | 195,167 ms
| style="background-color:#fffc9e;" | 5,12
| style="background-color:#fffc9e;" | All: 21.31%<br />Core: 85.25%
| style="background-color:#fffc9e;" | 194,899 ms
| style="background-color:#fffc9e;" | 5,12
|}
{| class="wikitable" style="text-align:center;"
|-
! colspan="19" | Image 1080p- 7 faces
|-
| Platform
| colspan="18" | Xavier AGX(8-cores 30W Mode )
|-
| Method
| colspan="6" style="background-color:#ffce93;" | Convert
| colspan="6" style="background-color:#9aff99;" | Detect
| colspan="6" style="background-color:#abe9ff;" | Track
| colspan="6" style="background-color:#ffffc7;" | Redact
|-
| Num threads
| colspan="3" style="background-color:#ffce93;" | 1
| colspan="3" style="background-color:#ffce93;" | 4
| colspan="3" style="background-color:#9aff99;" | 1
| colspan="3" style="background-color:#9aff99;" | 4
| colspan="3" style="background-color:#abe9ff;" | 1
| colspan="3" style="background-color:#abe9ff;" | 4
| colspan="3" style="background-color:#ffffc7;" | 1
| colspan="3" style="background-color:#ffffc7;" | 4
|-
| Stat
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#ffce93;" | CPU%
| style="background-color:#ffce93;" | Processing time
| style="background-color:#ffce93;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | Processing time
| style="background-color:#9aff99;" | FPS
| style="background-color:#9aff99;" | CPU%
| style="background-color:#9aff99;" | Processing Time
| style="background-color:#9aff99;" | FPS
| style="background-color:#abe9ff;" | CPU%
| style="background-color:#abe9ff;" | Processing Time
| style="background-color:#abe9ff;" | FPS
| style="background-color:#abe9ff;" | CPU%
| style="background-color:#abe9ff;" | Processing time
| style="background-color:#abe9ff;" | FPS
| style="background-color:#ffffc7;" | CPU%
| style="background-color:#ffffc7;" | Processing Time
| style="background-color:#ffffc7;" | FPS
| style="background-color:#ffffc7;" | CPU%
| style="background-color:#ffffc7;" | Processing time
| style="background-color:#ffffc7;" | FPS
|-
| Value
| style="background-color:#ffce93;" | All: 5.95%<br />Core: 47.57%
| style="background-color:#ffce93;" | 2.075 ms
| style="background-color:#ffce93;" | 481.93
| style="background-color:#ffce93;" | All: 5.88% <br />Core: 47.04%
| style="background-color:#ffce93;" | 2.189 ms
| style="background-color:#ffce93;" | 456.83
| style="background-color:#9aff99;" | All: 10.52%<br />Core: 84.14%
| style="background-color:#9aff99;" | 204.358 ms
| style="background-color:#9aff99;" | 4.89
| style="background-color:#9aff99;" | All: 10.51%<br />Core: 84.09%
| style="background-color:#9aff99;" | 203.679 ms
| style="background-color:#9aff99;" | 4.9
| style="background-color:#abe9ff;" | All: 3.35%<br />Core: 26.77%
| style="background-color:#abe9ff;" | 11.672 ms
| style="background-color:#abe9ff;" | 85.68
| style="background-color:#abe9ff;" | All: 3.26%<br />Core: 26.05%
| style="background-color:#abe9ff;" | 11.459 ms
| style="background-color:#abe9ff;" | 87.27
| style="background-color:#ffffc7;" | All: 11.32%<br />Core: 90.55%
| style="background-color:#ffffc7;" | 363.230 ms
| style="background-color:#ffffc7;" | 2.75
| style="background-color:#ffffc7;" | All: 11.42%<br />Core: 91.39%
| style="background-color:#ffffc7;" | 359.669 ms
| style="background-color:#ffffc7;" | 2.78
|}

Latest revision as of 19:36, 2 January 2024


Index






The library has four major consuming methods: convert the input buffer to the desired format and size of the AI model, the detection of the desired object done by the ONNX model, tracking and the application of the redaction effect.

For testing purposes, take into account the following points:

  • Jetpack 5.1.X
  • Tested with GPU and CPU only. For GPU, execution is done with TensorRT and CUDA.
  • The library offers two approaches: each method used separately and all together using the apply method.
  • The metrics measured are CPU and GPU consumption, processing time, and FPS.
  • The tracker is implemented only with support for CPU.

Check the following links for performance:


Index