---
title: 目标检测样例
description: "1. 在jupyter lab可视化界面目录中双击“01-yolov5”模型样例目录。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Getting%20Started%20with%20Application%20Development/paqe/paqe_0003.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Getting Started with Application Development/paqe/paqe_0003.html
indexId: 9ac57854446a4441adcf05868d274a267b01847d24899f028d76cb3c70221987110
---
# 目标检测样例

1. 在jupyter lab可视化界面目录中双击“01-yolov5”模型样例目录。
2. 双击打开“main.ipynb”脚本，进入样例运行页面。
  图1 样例运行页面

3. 当前目标检测样例支持图片、视频、USB摄像头目标检测，用户可修改代码块中infer_mode，默认值：video，可选值：image、video、camera。
  图2 运行模式

4. 单击按钮运行样例，单击“Restart”按钮，运行完成后等待若干秒时间，查看推理结果，如图4和图5所示，目标检测识别出汽车、人物与足球。
  图3 单击按钮

  图4 视频目标检测推理结果

  图5 图像目标检测推理结果

  若运行多个样例后，出现Kernel Restarting提示框，如图6所示，请参见jupyter notebook运行多个推理样例后提示Kernel Restarting(https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Appendices/faq/faq_0040.html)解决。 图6 错误提示
