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: content/learning-paths/mobile-graphics-and-gaming/ai-camera-pipelines/2-overview.md
+39-8Lines changed: 39 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,27 +12,30 @@ layout: learningpathall
12
12
13
13
[KleidiAI](https://gitlab.arm.com/kleidi/kleidiai) is an open-source library that provides optimized, performance-critical routines - also known as micro-kernels - for artificial intelligence (AI) workloads on Arm CPUs.
14
14
15
-
These routines are tuned to take full advantage of specific Arm hardware architectures to maximize performance. The [KleidiAI](https://gitlab.arm.com/kleidi/kleidiai) library is designed for easy integration into C or C++ machine learning (ML) and AI frameworks.
15
+
These routines are tuned to take full advantage of specific Arm hardware architectures to maximize performance. The [KleidiAI](https://gitlab.arm.com/kleidi/kleidiai) library is designed for easy integration into C or C++ machine learning (ML) and AI frameworks.
16
16
17
17
Several popular AI frameworks already take advantage of [KleidiAI](https://gitlab.arm.com/kleidi/kleidiai) to improve performance on Arm platforms.
18
18
19
19
## KleidiCV
20
20
21
-
[KleidiCV](https://gitlab.arm.com/kleidi/kleidicv) is an open-source library that provides high-performance image processing functions for AArch64.
21
+
[KleidiCV](https://gitlab.arm.com/kleidi/kleidicv) is an open-source library that provides high-performance image processing functions for AArch64.
22
22
23
23
It is designed to be lightweight and simple to integrate into a wide variety of projects. Some computer vision frameworks, such as OpenCV, leverage [KleidiCV](https://gitlab.arm.com/kleidi/kleidicv) to accelerate image processing on Arm devices.
24
24
25
25
## AI camera pipelines
26
26
27
-
This Learning Path provides two example applications that combine AI and computer vision (CV) techniques:
28
-
- Background Blur.
29
-
- Low-Light Enhancement.
27
+
This Learning Path provides three example applications that combine AI and computer vision (CV) techniques:
28
+
- Background Blur,
29
+
- Low-Light Enhancement,
30
+
- Neural Denoising.
31
+
32
+
## Background Blur and Low Light Enhancement
30
33
31
34
Both applications:
32
-
- Use input and output images that are stored in `ppm` (Portable Pixmap format), with three RGB channels (Red, Green, and Blue). Each channel supports 256 intensity levels (0-255) commonly referred to as `RGB8`.
35
+
- Use input and output images that are stored in `png`format, with three RGB channels (Red, Green, and Blue). Each channel supports 256 intensity levels (0-255) commonly referred to as `RGB8`.
33
36
- Convert the images to the `YUV420` color space for processing.
34
37
- Apply the relevant effect (background blur or low-light enhancement).
35
-
- Convert the processed images back to `RGB8` and save them as `ppm` files.
38
+
- Convert the processed images back to `RGB8` and save them as `.png` files.
36
39
37
40
### Background Blur
38
41
@@ -50,4 +53,32 @@ The Low-Resolution Coefficient Prediction Network (implemented with LiteRT) perf
50
53
- Strided convolutions.
51
54
- Local feature extraction using convolutional layers.
52
55
- Global feature extraction using convolutional and fully connected layers.
53
-
- Add, convolve, and reshape operations.
56
+
- Add, convolve, and reshape operations.
57
+
58
+
## Neural Denoising
59
+
60
+
Every smartphone photographer has seen it: images that look sharp in daylight
61
+
but fall apart in dim lighting. This is because _signal-to-noise ratio (SNR)_
62
+
drops dramatically when sensors capture fewer photons. At 1000 lux, the signal
63
+
dominates and images look clean; at 1 lux, readout noise becomes visible as
64
+
grain, color speckles, and loss of fine detail.
65
+
66
+
That’s why _neural camera denoising_ is one of the most critical --- and
67
+
computationally demanding --- steps in a camera pipeline. Done well, it
68
+
transforms noisy frames into sharp, vibrant captures. Done poorly, it leaves
69
+
smudges and artifacts that ruin the shot.
70
+
71
+
As depicted in the diagram below, the Neural Denoising pipeline is using 2
72
+
algorithms to process the frames:
73
+
- either temporally, with an algorithm named `ultralite` in the code
74
+
repository,
75
+
- or spatially, with an algorithm named `collapsenet` in the code repository,
Copy file name to clipboardExpand all lines: content/learning-paths/mobile-graphics-and-gaming/ai-camera-pipelines/4-run.md
+37-8Lines changed: 37 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,26 +9,55 @@ layout: learningpathall
9
9
10
10
## Apply transformations
11
11
12
-
In the previous section, you built the AI Camera Pipelines. In this section, you'll run them to apply transformations to an input image.
12
+
In the previous section, you built the AI Camera Pipelines. In this section, you'll run them to apply transformations to an input image or input frames.

25
33
26
34
### Low-Light Enhancement
27
35
36
+
Run the Low-Light Enhancement pipeline, using `resources/test_input.png` as the input image and write the transformed image to `test_output2_lime.png`:

57
+
The input frames are:
58
+
- first converted from `.png` files in the `resources/test-lab-sequence/` directory to the sensor format (RGGB Bayer) into `neural_denoiser_io/input_noisy*`,
59
+
- those frames are then processed by the Neural Denoiser and written into `neural_denoiser_io/output_denoised*`,
60
+
- last, the denoised frames are converted back to `.png` for easy visualization in directory `test-lab-sequence-out`.
|`cinematic_mode_benchmark`| 2029.25 ms | 2023.39 ms |
95
-
|`low_light_image_enhancement_benchmark`| 79.431 ms | 54.3546 ms |
96
-
97
-
As shown, the background blur pipeline (`cinematic_mode_benchmark`) gains only a small improvement, while the low-light enhancement pipeline sees a significant ~30% performance uplift when KleidiCV and KleidiAI are enabled.
98
-
99
-
## Future performance uplift with SME2
105
+
```bash
106
+
bin/neural_denoiser_temporal_benchmark_4K 20
107
+
```
100
108
101
-
A major benefit of using KleidiCV and KleidiAI is that they can automatically leverage new Arm architecture features - such as SME2 (Scalable Matrix Extension v2) - without requiring changes to your application code.
109
+
The new output is similar to:
102
110
103
-
As KleidiCV and KleidiAI operate as performance abstraction layers, any future hardware instruction support can be utilized by simply rebuilding the application. This enables better performance on newer processors without additional engineering effort.
111
+
```output
112
+
Total run time over 20 iterations: 38.0813 ms
113
+
```
104
114
115
+
### Comparison table and future performance uplift with SME2
105
116
117
+
| Benchmark | Without KleidiCV+KleidiAI | With KleidiCV+KleidiAI |
0 commit comments