Deep Learning for Defect Detection on Raspberry Pi

버전 3.0.0 (9.41 MB) 작성자: Kei Otsuka
How to create, train simple network, integrate it into pre/post image processing and generate C code to run it on Raspberry Pi
다운로드 수: 1.3K
업데이트 날짜: 2023/9/2

라이선스 보기

This example shows how to create and train a simple convolutional neural network for defect detection, and how to integrate it into pre/post image processing and generate C code for pre-processing, neural network and post processing to run it on Raspberry Pi.
The algorithm is to detect defective hexagon nuts that has scratch on a surface.
This example demonstrates how to:
#1. Load and explore image data.
#2. Define the network architecture
#3. Train the network
#4. Confirm if trained network works well for new data
#5. Walk through whole algorithm that consist of pre-processing, CNN and
post-processing.
#6. Generate C++ code for whole algorithm to test it on host machine
#7. Generate C++ code for ARM target(Raspberry Pi)
#8. Build and run the exe on the Raspberry Pi
To build and run generated code for deep learning networks that you deploy to Raspberry Pi, you must install third-party software. Please see "Prerequisites for Deep Learning with MATLAB Coder" by running following command.
>>web(fullfile(docroot, 'coder/ug/prerequisites-for-deep-learning-with-matlab-coder.html'))
Note : Code generation for ARM target is only supported on Linux and Windows.
[Japanese]本プログラムでは、簡単な畳み込みニューラルネットワークの作成と、前処理・後処理との統合、コード生成してRaspberry Pi上で動作させるまでの一連の流れをご紹介します。
今回は六角ナットを使用していますが、表面にキズがあるナットは不良品としており、良品と不良品を分類できるネットワークを作成します。また、ナットが写っている場所をROIとして抽出する部分は前処理として、検出された位置に注釈を挿入する部分は後処理として定義しており、それぞれコード生成して統合し、Raspberry Pi上で動作させます。
MATLAB Coderで生成されたコードをRaspberryPi上でビルド&実行させるためには、必要なソフトウェアのインストールおよび環境変数の設定が必要です。以下のコマンドをMATLAB上で実行し、事前に詳細を確認ください。
>>web(fullfile(docroot, 'coder/ug/prerequisites-for-deep-learning-with-matlab-coder.html'))
本プログラムはLinuxプラットフォーム(Ubuntu16.04)上で動作確認をしています。
[Keyward]
画像処理・画像分類・ディープラーニング・DeepLearning・デモ・IPCVデモ・ニューラルネットワーク・Raspberry Pi・ラズパイ

인용 양식

Kei Otsuka (2024). Deep Learning for Defect Detection on Raspberry Pi (https://www.mathworks.com/matlabcentral/fileexchange/68474-deep-learning-for-defect-detection-on-raspberry-pi), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2023a
R2023a와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Code Generation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

RaspPi_23aCam

버전 게시됨 릴리스 정보
3.0.0

Support for OpenCV ver4.x and ARM Compute Lib ver20.x

2.0.0

Integrated Code Generation Support

1.0.1

Removed GPU Coder from required products

1.0.0