# OAK 示例

## 概述

[OAK 示例](https://github.com/luxonis/oak-examples/tree/main/neural-networks) 是一组推理示例，可用作您自己应用的起点或灵感来源。这些示例利用了
[推理](https://docs.luxonis.com/software-v3/ai-inference/inference.md) 部分介绍的概念，并在 OAK 设备上运行实时 AI 推理。我们建议先探索通用示例，然后继续使用我们为各种 ML
任务准备的众多自定义示例。

## 通用示例

[通用示例](https://github.com/luxonis/oak-examples/tree/main/neural-networks/generic-example)
运行一个简单的推理管线，用于单头模型在单图像输入上进行预测。例如，您可以在摄像头输入上运行 YOLOv6 目标检测：

```python
python3 main.py --model luxonis/yolov6-nano:r2-coco-512x288
```

## 自定义示例

我们还提供了一系列多样化的[自定义示例](https://github.com/luxonis/oak-examples/tree/main/neural-networks)，演示了使用包含多个模型（可能具有多个头部）和/或自定义输出处理的管线。这些示例涵盖了广泛的
ML 任务，包括：

 * [分类](https://github.com/luxonis/oak-examples/tree/main/neural-networks#classification)： 为图像中的目标分配标签（例如，猫 vs. 狗）；
 * [目标检测](https://github.com/luxonis/oak-examples/tree/main/neural-networks#object-detection)： 识别并定位图像中的多个目标；
 * [人脸检测](https://github.com/luxonis/oak-examples/tree/main/neural-networks#face-detection)： 分析人脸特征、表情和行为；
 * [3D 检测](https://github.com/luxonis/oak-examples/tree/main/neural-networks/3D-detection)： 将目标检测扩展到三维空间，估计目标的位置、大小和方向；
 * [关键点检测](https://github.com/luxonis/oak-examples/tree/main/neural-networks/keypoint-detection)： 检测目标内的特定兴趣点（例如，人脸关键点）；
 * [姿态估计](https://github.com/luxonis/oak-examples/tree/main/neural-networks#pose-estimation)： 分析人体或动物身体，预测关节位置和姿态；
 * [分割](https://github.com/luxonis/oak-examples/tree/main/neural-networks/segmentation)： 根据类别对每个像素进行标注（例如，目标 vs. 背景）；
 * [目标跟踪](https://github.com/luxonis/oak-examples/tree/main/neural-networks#object-tracking)： 跟踪同一场景中一系列图像内各个目标的运动；
 * [计数](https://github.com/luxonis/oak-examples/tree/main/neural-networks#counting)： 统计图像中的目标数量（例如，人群中的行人）；
 * [光学字符识别](https://github.com/luxonis/oak-examples/tree/main/neural-networks#ocr)： 从图像中提取文本，将其转换为机器可读文本；
 * [重识别](https://github.com/luxonis/oak-examples/tree/main/neural-networks#reidentification)： 在不同场景的图像中匹配和识别单个目标；
 * [深度估计](https://github.com/luxonis/oak-examples/tree/main/neural-networks#depth-estimation)： 预测目标距离摄像头的距离，生成场景的深度图；
 * [线条检测](https://github.com/luxonis/oak-examples/tree/main/neural-networks#line-detection)： 识别图像中的线条或边缘（例如，自动驾驶中的车道检测）；
 * [图像到图像转换](https://github.com/luxonis/oak-examples/tree/main/neural-networks#image-to-image-translation)：
   将图像从一种格式转换为另一种格式（例如，增强分辨率）；
 * [特征检测](https://github.com/luxonis/oak-examples/tree/main/neural-networks#image-to-image-translation)： 识别图像中的关键特征或点，用于图像匹配等任务；
 * [语音识别](https://github.com/luxonis/oak-examples/tree/main/neural-networks#speech-recognition)： 通过分析音频信号将口语转换为文本。

下面展示了一些示例，但请务必在 [GitHub](https://github.com/luxonis/oak-examples/tree/main/neural-networks) 上查看完整集合。

[https://github.com/luxonis/oak-examples/tree/main/neural-networks/3D-detection/objectron](https://github.com/luxonis/oak-examples/tree/main/neural-networks/3D-detection/objectron)[https://github.com/luxonis/oak-examples/tree/main/neural-networks/ocr/license-plate-recognition](https://github.com/luxonis/oak-examples/tree/main/neural-networks/ocr/license-plate-recognition)[https://github.com/luxonis/oak-examples/tree/main/neural-networks/pose-estimation/animal-pose](https://github.com/luxonis/oak-examples/tree/main/neural-networks/pose-estimation/animal-pose)[https://github.com/luxonis/oak-examples/tree/main/neural-networks/face-detection/emotion-recognition](https://github.com/luxonis/oak-examples/tree/main/neural-networks/face-detection/emotion-recognition)[https://github.com/luxonis/oak-examples/tree/main/neural-networks/generic-example](https://github.com/luxonis/oak-examples/tree/main/neural-networks/generic-example)[https://github.com/luxonis/oak-examples/tree/main/neural-networks/counting/crowdcounting](https://github.com/luxonis/oak-examples/tree/main/neural-networks/counting/crowdcounting)
