Skip to content

Commit 1159152

Browse files
committed
Review blur and low-light camera Learning Path
1 parent 358373c commit 1159152

File tree

4 files changed

+51
-64
lines changed

4 files changed

+51
-64
lines changed

content/learning-paths/mobile-graphics-and-gaming/ai-camera-pipelines/1-prerequisites.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ layout: learningpathall
88

99
## Host machine requirements
1010

11-
This Learning Path demonstrates how to improve the performance of camera pipelines using KleidiAI and KleidiCV in applications running on Arm. You will need an Arm64 machine, preferably running an Ubuntu-based distribution. These instructions have been tested on Ubuntu.
11+
This Learning Path demonstrates how to improve the performance of camera pipelines using KleidiAI and KleidiCV in applications running on Arm. You will need an Arm64 machine, preferably running an Ubuntu-based distribution. The instructions have been tested on Ubuntu 24.04.
1212

1313
## Install required software
1414

@@ -24,14 +24,14 @@ These tools can be installed by running the following command, depending on your
2424

2525
{{< tabpane code=true >}}
2626
{{< tab header="Linux/Ubuntu" language="bash">}}
27-
sudo apt install git git-lfs
27+
sudo apt install git git-lfs -y
2828
{{< /tab >}}
2929
{{< tab header="macOS" language="bash">}}
3030
brew install git git-lfs
3131
{{< /tab >}}
3232
{{< /tabpane >}}
3333

34-
### docker
34+
### Docker
3535

3636
Start by checking that `docker` is installed on your machine by typing the following command line in a terminal:
3737

@@ -52,23 +52,19 @@ Once you have confirmed that Docker is installed on your machine, you can check
5252
docker run hello-world
5353
Unable to find image 'hello-world:latest' locally
5454
latest: Pulling from library/hello-world
55-
478afc919002: Pull complete
56-
Digest: sha256:305243c734571da2d100c8c8b3c3167a098cab6049c9a5b066b6021a60fcb966
55+
c9c5fd25a1bd: Pull complete
56+
Digest: sha256:c41088499908a59aae84b0a49c70e86f4731e588a737f1637e73c8c09d995654
5757
Status: Downloaded newer image for hello-world:latest
5858

5959
Hello from Docker!
6060
This message shows that your installation appears to be working correctly.
6161

62-
To generate this message, Docker followed these steps:
63-
62+
To generate this message, Docker took the following steps:
6463
1. The Docker client contacted the Docker daemon.
65-
66-
2. The Docker daemon pulled the "hello-world" image from Docker Hub.
64+
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
6765
(arm64v8)
68-
6966
3. The Docker daemon created a new container from that image which runs the
7067
executable that produces the output you are currently reading.
71-
7268
4. The Docker daemon streamed that output to the Docker client, which sent it
7369
to your terminal.
7470

@@ -82,13 +78,15 @@ For more examples and ideas, visit:
8278
https://docs.docker.com/get-started/
8379
```
8480

85-
### `libomp`
81+
### OpenMP library
82+
83+
`libomp` is the OpenMP library developed by the LLVM project. It provides the necessary support for executing OpenMP parallel programs.
8684

8785
`libomp` can be installed by running the following command, depending on your OS:
8886

8987
{{< tabpane code=true >}}
9088
{{< tab header="Linux/Ubuntu" language="bash">}}
91-
sudo apt install libomp-19-dev
89+
sudo apt install libomp-19-dev -y
9290
{{< /tab >}}
9391
{{< tab header="macOS" language="bash">}}
9492
brew install libomp

content/learning-paths/mobile-graphics-and-gaming/ai-camera-pipelines/5-performances.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,32 @@ These benchmarks demonstrate the performance improvements enabled by KleidiCV an
2020

2121
## Performances with KleidiCV and KleidiAI
2222

23-
By default, the OpenCV library is built with KleidiCV support, and TFLite+xnnpack is built with KleidiAI support. You can run the benchmarks using the applications you built earlier:
23+
By default, the OpenCV library is built with KleidiCV support, and TFLite+xnnpack is built with KleidiAI support.
24+
25+
You can run the benchmarks using the applications you built earlier.
26+
27+
Run the first benchmark:
2428

2529
```bash
26-
$ bin/cinematic_mode_benchmark 20 resources/depth_and_saliency_v3_2_assortedv2_w_augment_mobilenetv2_int8_only_ptq.tflite
30+
bin/cinematic_mode_benchmark 20 resources/depth_and_saliency_v3_2_assortedv2_w_augment_mobilenetv2_int8_only_ptq.tflite
31+
```
32+
33+
The output is similar to:
34+
35+
```output
2736
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2837
Total run time over 20 iterations: 2023.39 ms
38+
```
39+
40+
Run the second benchmark:
41+
42+
```bash
43+
bin/low_light_image_enhancement_benchmark 20 resources/HDRNetLIME_lr_coeffs_v1_1_0_mixed_low_light_perceptual_l2_loss_int8_only_ptq.tflite
44+
```
2945

30-
$ bin/low_light_image_enhancement_benchmark 20 resources/HDRNetLIME_lr_coeffs_v1_1_0_mixed_low_light_perceptual_l2_loss_int8_only_ptq.tflite
46+
The output is similar to:
47+
48+
```output
3149
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
3250
Total run time over 20 iterations: 54.3546 ms
3351
```
@@ -43,14 +61,28 @@ To measure the performance without these optimizations, recompile the pipelines
4361
-DENABLE_KLEIDICV:BOOL=OFF -DXNNPACK_ENABLE_KLEIDIAI:BOOL=OFF
4462
```
4563

46-
Then rerun the benchmarks:
64+
Re-run the first benchmark:
4765

4866
```bash
49-
$ bin/cinematic_mode_benchmark 20 resources/depth_and_saliency_v3_2_assortedv2_w_augment_mobilenetv2_int8_only_ptq.tflite
67+
bin/cinematic_mode_benchmark 20 resources/depth_and_saliency_v3_2_assortedv2_w_augment_mobilenetv2_int8_only_ptq.tflite
68+
```
69+
70+
The new output is similar to:
71+
72+
```output
5073
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
5174
Total run time over 20 iterations: 2029.25 ms
75+
```
76+
77+
Re-run the second benchmark:
78+
79+
```bash
80+
bin/low_light_image_enhancement_benchmark 20 resources/HDRNetLIME_lr_coeffs_v1_1_0_mixed_low_light_perceptual_l2_loss_int8_only_ptq.tflite
81+
```
82+
83+
The new output is similar to:
5284

53-
$ bin/low_light_image_enhancement_benchmark 20 resources/HDRNetLIME_lr_coeffs_v1_1_0_mixed_low_light_perceptual_l2_loss_int8_only_ptq.tflite
85+
```output
5486
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
5587
Total run time over 20 iterations: 79.431 ms
5688
```

content/learning-paths/mobile-graphics-and-gaming/ai-camera-pipelines/_index.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
---
2-
title: Accelerate Background Blur and Low-Light Camera Effects on Android
3-
4-
draft: true
5-
cascade:
6-
draft: true
2+
title: Accelerate Background Blur and Low-Light Camera Effects
73

84
minutes_to_complete: 30
95

@@ -14,15 +10,12 @@ learning_objectives:
1410
- Use KleidiCV and KleidiAI to improve the performance of real-time camera pipelines.
1511

1612
prerequisites:
17-
- CMake.
18-
- Git + Git LFS.
19-
- Docker.
13+
- A computer running Arm Linux or macOS with Docker installed.
2014

2115
author: Arnaud de Grandmaison.
2216

2317
test_images:
2418
- ubuntu:latest
25-
test_link: null
2619
test_maintenance: false
2720

2821
### Tags
@@ -35,7 +28,6 @@ tools_software_languages:
3528
operatingsystems:
3629
- Linux
3730
- macOS
38-
- Windows
3931

4032
further_reading:
4133

content/learning-paths/mobile-graphics-and-gaming/ai-camera-pipelines/_review.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)