Customer Success - Gran Telescopio Canarias

The World's Largest Optical Telescope Relies on VxWorks

The Gran Telescopio Canarias enables scientists to view the furthest and palest cosmic bodies in the universe.

Customer Success Story

The Objective

Gran Telescopio Canarias (GTC), the world’s largest single-aperture optical telescope, utilizes an extremely sophisticated computerized onboard system to capture secrets in the night sky. GTC is controlled by a high-capacity, high-performance IT architecture. A set of subsystems, physically distributed throughout the GTC, controls functions and compensates for the adverse effects of variables such as wind, temperature, hygrometry, distortion of parts, and vibration. A network of interconnected equipment, such as computers and sensors, supervises these subsystems and provides a homogenous user interface. The trick is to make all of this work together in real time.

“We chose Wind River’s VxWorks because we needed a sufficiently stable and high-performance real-time operating system so that we were free to concentrate on developing applications.”

—Martí Pi i Puig, Head of the Control Group, GTC Project

How Wind River Helped

The GTC Control Group—a collaboration of Spain, Mexico, and the University of Florida—determined that traditional operating systems would not meet the requirements it had identified for the onboard computers. GTC Control Group selected VxWorks® because it would support the telescope’s stringent performance requirements. Many of the telescope's subsystems — such as motors, encoders, sensors, and cameras — require supervision on a material level and real-time results.

The Results

Astronomers from Spain, Mexico, and the U.S. have been coming to the Canary Islands since “first light” in 2009 to study the furthest and palest cosmic bodies in the universe with the largest telescope in existence. The VxWorks stable, high-performance real-time operating system has allowed these astronomers to concentrate on developing applications rather than spend time configuring components of the operating system or solving basic problems. Observation time is a precious commodity, and the scheduling of telescope time stretches out for years. VxWorks keeps the many disparate systems working in tight, real-time coordination. The rest is starlight.

Resources

Case Study

A Star is Born: Gran Telescopio Canarias (GTC)

Learn more

Customer Success - Bosch Motorsport

Bosch Wins Big with VxWorks-Powered ECUs

Wind River helped Bosch Motorsport cut development time in half.

Customer Success Story

The Objective

Endurance motorsport racing demands hard real-time engine performance to keep drivers safe. It also requires the collection and interpretation of massive amounts of machine-to-machine performance data in real time — the information race engineers need to make winning decisions on the fly. Engine control units (ECUs) join hardware and software architectures to create and direct this brain on four wheels. Bosch needed to deliver a new, improved product fast in order to retain market share.

“Wind River helped us develop an advanced, high-quality product while meeting challenging deadlines. We were able to shorten development time by over 50 percent for our engine control units for motorsports use.”

—Markus Kirschner, Group Leader for Hardware Development, Bosch Motorsport

How Wind River Helped

Wind River® provided a comprehensive solution that included a fully integrated VxWorks® platform, middleware, tools, BSP availability, technical support, services, and training. This working partnership made it possible for Bosch to update engine performance and race telemetry in record time.

The Results

Historically, developing the system that runs ECUs took from 18 months to two years. With the Wind River solution and support, Bosch cut the cycle by more than 50 percent—and powered the winning vehicles in three major world events the same year: the 6 Hours of Silverstone; 6 Hours of Spa; and the crown jewel of the FIA World Endurance Championship season, 24 Hours of Le Mans. Leveraging VxWorks, Bosch continues to create components that allow race engineers to stay competitive with optimized vehicle performance.

Resources

Press Release

Wind River Helps Bosch Motorsport Race for the Win

Learn more

Case Study

Bosch Motorsport Speeds Development of Critical Racing Components with Wind River VxWorks

Learn more

Customer Success - NASA JPL | Wind River

VxWorks Powers NASA JPL's Mars Rover Curiosity

When NASA deployed Curiosity, the most technologically advanced autonomous robotic spacecraft and geologist set of its time, VxWorks was the OS powering it through "seven minutes of terror."

Customer Success Story

The Objective

The Curiosity team at NASA JPL needed to build a spacecraft and rover that could withstand the harsh space environment and arrive safely on Mars—in a more precise, complex landing than required by any previous mission. The landing sequences, called “EDL” for “entry, descent, and landing,” presented the most action-packed operations aside from the initial launch. Curiosity also planned to carry 10 times as many scientific instruments and explore a larger area than did previous rovers.

How Wind River Helped

The VxWorks® real-time operating system (RTOS) played a central role in this historic mission. VxWorks provides the core operating system of the spacecraft control system—from the second the rocket left Earth on November 26, 2011, until the end of the mission. NASA’s Jet Propulsion Laboratory (JPL), the lead U.S. center for robotic exploration of the solar system, has used VxWorks as its mission-critical OS brain for more than two decades. The total cost of the Curiosity project is approximately $2.5B and represents eight years of passion and work, so the stakes are high, and a fail-proof, resilient RTOS was a core requirement.

The Results

On August 6, 2012, NASA made an enormous advancement in space exploration when it landed Curiosity in the Gale Crater on Mars. Curiosity is the most technologically advanced autonomous robotic spacecraft and geologist set ever to be deployed by any space venture. It’s on a groundbreaking mission to determine whether Mars is or has ever been capable of supporting life, and to assess its habitability for future human missions.

Resources

Video

NASA Jet Propulsion Laboratory MSL Curiosity

Watch Video

Success Story PDF

NASA’s Mars Rover Curiosity Powered by Wind River

Learn more

Press Release

NASA’s Mars Rover Curiosity Powered by Wind River

Learn more

Customer Success - OMRON | Wind River

Omron Shapes the Factory of the Future

Wind River helps Omron implement IoT-powered innovations to drive digital transformation in manufacturing.

Customer Success Story

The Objective

Omron Corporation, a global leader in industrial automation, anticipated increasing demand from its customers for factory automation solutions that leverage data collection and analytics from interconnected machines—the Industrial Internet of Things (IIoT) in action. The Omron team wanted to develop a new type of control solution based on a PC architecture that combined advanced automation control capabilities with the ability to utilize data from connected systems and devices.

“The IPC RTOS Controller supports both real-time control and information technology in one box. With VxWorks or Wind River Linux, users get fast and highly accurate automation technology combined with a flexible development and programming environment.”

—Toshiki Natsui, Manager, Controller Product Management Group, Omron

How Wind River Helped

Wind River® assisted in the development of the company’s IPC RTOS Controller, which can run on either VxWorks® or Wind River Linux, enabling manufacturers to program real-time control of machine functionality while simultaneously executing advanced data processing tasks.

The Results

The 2016 launch of Omron’s industrial PC (IPC) control platform puts the company at the forefront of digital transformation in manufacturing. The platform helps make manufacturing equipment smarter, improving productivity and output quality through IoT connectivity and Big Data analytics, while meeting strict performance and reliability standards.

Resources

Case Study

Wind River Helps Omron Shape the Factory of the Future

Read More

Case Study (German Version)

Wind River Unterstützt Omron bei der Gestaltung der Fabrik der Zukunft

Read More

Customer Success - TaxiBot

Pioneering a Robotic Airplane-Towing Vehicle

TaxiBot, a semi-autonomous truck, eliminates massive fuel waste and pollution from jets idling on runways.

Customer Success Story

The Objective

To address the growing problems of massive fuel waste from commercial airplanes taxiing and idling on runways, Israel Aerospace Industries (IAI) launched an ambitious project with Airbus and TLD group. They wanted to create a new type of vehicle that could tow aircraft on runways and eliminate the need to run jet engines until ready for takeoff. They also needed to address key functional issues that had thwarted similar efforts in the past, including how to safely and easily connect the towing vehicle to airplanes and how to provide full control of the towing vehicle to pilots.

“For me, our ability to get the project done so quickly was a dream come true. Today we can say with confidence we are at least five years ahead of our competitors.”

—Ran Braier, TaxiBot Project Director, IAI

How Wind River Helped

IAI chose VxWorks®, the Wind River® industry-leading real-time embedded operating system, to build the truck’s intelligent software system. Wind River Professional Services also provided its extensive engineering expertise to help accelerate DO-178B/ED-12B DAL B certification and address design and project challenges.

The Results

With the VxWorks embedded operating system and Wind River technical and project support, the TaxiBot team obtained the necessary industry safety certifications quickly, helping the team dramatically shorten the product’s development from prototype to fully approved vehicle, and putting TaxiBot at least five years ahead of competitors.

Resources

Case Study

Cleared for TakeOff: Wind River Helps Taxibot Pioneer Robotic Airplane-Towing Vehicle

Learn more

Press Release

Israel Aerospace Industries Delivers Revolutionary Airplane Towing Vehicle with Wind River Solution

Learn more

Blog Post

TaxiBot Certified for Take-off

Learn more

Customer Success - Parkeon | Wind River

Parkeon Makes the "Smart City" a Reality

Global leader in on-street parking payment solutions selects Wind River Professional Services to integrate intelligent street kiosks.

Customer Success Story

The Objective

Parkeon is a global leader in urban mobility technology developing a next-generation parking terminal. The company wanted to move the main intelligence out of the pay station and into the cloud, then turn a simple parking meter into a useful, on-street, IoT-networked kiosk. It wanted to connect and integrate the new terminals with the company’s back-office business systems.

“When we started to think about the architecture we need to create the open platform we envision, we knew we needed a much more robust connectivity solution than we could build ourselves.”

—Marc Boulanger, Parkeon’s StreetSmart Program Director

How Wind River Helped

In order to create the open platform they envisioned, Parkeon knew it needed a much stronger and more robust connectivity solution than its engineers could build themselves. Parkeon turned to Wind River® Professional Services to help it deliver an end-to-end solution to accelerate its time-to-market and reduce risk.

The Results

By partnering with Wind River, Parkeon was able to deliver a solution in less time, at a lower cost and with less project risk than developing in-house. Along with spending less money, Parkeon was also able to save six months to a year in time-to-market.

Resources

Case Study PDF

Parkeon Selects Wind River Professional Services to Integrate Intelligent Street Kiosks

Read More

Customer Success: Mitsubishi Electric

Mitsubishi Electric Pushes Intelligence to the Edge

VxWorks powers a state-of-the-art device control and edge computing solution for factory automation.

Customer Success Story

The Objective

Mitsubishi Electric Corporation, a leading global supplier of electronic hardware for factory automation (FA), was preparing to launch its first line of products specifically designed for edge computing in industrial environments. The goal was to combine real-time equipment control with high-speed data collection, processing, diagnosis, and feedback in a single machine.

“VxWorks allows the MI5000 to provide both real-time equipment control and edge computing in a single solution. It enables the system to collect data from IoT devices while managing them in real time. We have been using Wind River products and services for more than 10 years. We have a high level of trust in the core technology of Wind River products.”

—Ryosuke Watabe, Senior Manager, Controller Development Section, FA Systems Dept. 1, Nagoya Works, Mitsubishi Electric Corporation

How Wind River Helped

Wind River® supplied the VxWorks® real-time operating system, which enables the MI5000 to collect data from IoT devices while managing them in real time. The solution also incorporates Wind River virtualization technology built on VxWorks, which enables the consolidation of workloads on a single edge compute platform.

The Results

Mitsubishi Electric successfully launched the MELIPC Series of industrial control computers in 2018, advancing the state of edge computing in manufacturing and strengthening the company’s position as a leader in Industrial IoT.

Resources

Case Study PDF

Mitsubishi Electric Pushes Intelligence to the Edge with Wind River

Learn more

Customer Success - Ford Motor Company | Wind River

Wind River Helps Ford Remotely Update Connected Vehicles

OTA updates keep intelligent cars smart and safe without recalls.

Customer Success Story

The Objective

To continue to increase customer satisfaction and stay on the automotive cutting edge, Ford is implementing over-the-air (OTA) update technology in its next-generation cars. OTA updates allow automakers to rapidly deploy secure, cost-efficient updates and new features to connected vehicles, eliminating the cost and inconvenience of software recalls.

“The ability to continuously and remotely update, resolve issues, and introduce new features for improved customer satisfaction will be more critical than ever. By delivering new innovations to companies like Ford, we’re helping to improve efficiencies and experiences for carmakers and their customers.”

—Marques McCammon, VP of Automotive, Wind River

How Wind River Helped

Ford chose Wind River® Edge Sync technology, including differential updates that allow the ability to minimize data update size, transmission time, and memory usage for updating vehicle software over the air. Edge Sync is an intelligent OTA update and software lifecycle management solution that enables auto manufacturers to remotely maintain the integrity of embedded systems, apply feature and performance enhancements, and collect and report critical data across the lifecycle of the vehicle.

The Results

With Edge Sync, carmakers can maximize the role of software innovation in both driver experience and vehicle safety, gaining a powerful tool for creating new concepts of what a car can be. And as carmakers’ portfolios of connected vehicles evolve, the Wind River portfolio of OTA and lifecycle management technologies will keep pace.

Resources

Video

Ford Motor Company

Watch Video

Press Release

Ford Selects Wind River Over-the-Air Update Technology

Learn more

News

Wind River
Newsroom

call: 510.749.2972

 

Wind River Linux Tuitorial Tensorflow - Japan



インテリジェントエッジの実現には、組込みシステム周辺の環境情報を分析できるエッジAIが不可欠です。エッジAIは、組込みシステム上で動作することから、組込みAIとも呼ばれます。最新のWind River Linuxではエッジコンピューティング機能としてAI/機械学習(ML)に対応しており、AI/機械学習のフレームワークであるGoogle TensorFlowとIntel OpenVinoをサポートしています。これらのフレームワーク上に実装されたAI/機械学習のアルゴリズムを組込みシステム上で組込みAIとして実行することができます。

また、Wind River Linuxは、エッジコンピューティングで解析したデータをサーバと送受信する際に必要となるメッセージングサービスにも対応しており、最新のWind River LinuxはMQTT、Minifyをサポートしています。



エッジAI(組込みAI)とは

AIは、人間の知能を模倣するためにコンピュータを利用する技術分野です。古典的なプログラミングでは、アルゴリズムをコード化し、コンピュータにロジックを実行させ、データを処理し、出力を計算することにより問題を解決します。これに対して、AI/機械学習は、データからパターンを見つけ出し、効果的に学習するアプローチです。なかでも、ディープラーニングは、大規模なデータセットを利用する機械学習です。モデルを繰り返し学習させるために、複数の層からなるニューラルネットワークを使用します。画像処理をはじめ音声認識など様々な問題を解決することができます。こうした機能をエッジに活用したものが、エッジAIです。

エッジAIに活用されるフレームワーク

AIはデータ中心の手法のため、モデルの作成と学習には大規模なデータセットへのアクセスと、データを操作するためのフレームワークが必要です。そのためAIには、データを容易に操作でき、複雑な数値解析や統計解析などのライブラリを利用できる言語フレームワークとしてPythonが広く採用されています。また、Python上のAI/機械学習のフレームワークであるTensorFlowやOpenVinoも広く利用されています。最新のWind River Linux はPythonとTensorFlow、OpenVinoをサポートしています。


hypervisor
図1:AI/機械学習アプリケーションを支える言語フレームワークのPythonと開発フレームワークのTensorFlow、OpenVino

なお、高精度なモデルを作成するためには膨大なデータセットが必要であり、モデルの学習に大量の計算リソースが必要となるため、通常、学習はクラウドやハイパフォーマンスコンピューティング環境で実行されます。エッジAIは、学習済みのモデルによる推論のみを実行することが一般的です。



エッジAI(組込みAI)のメリットとユースケース

エッジAI(組込みAI)のメリット

エッジでAI/機械学習を活用することのメリットは、大別して2つあります。

レイテンシと帯域の改善

ミッションクリティカルなシステムのレイテンシに関するアプリケーション固有の課題は、特に厳しいものです。エッジAIを活用することにより、ネットワーク上を通過するデータ量とデータが移動する時間の両方を削減できるため、インテリジェントエッジでのコンピューティングにおける全体的なレイテンシを削減可能です。

セキュリティ脅威への対応

サーバにシステムのデータを送ることなく処理できるエッジAIを導入したインテリジェントエッジアーキテクチャを活用したローカルアプリケーションは、セキュリティ脅威の影響を抑えることができます。従来型の集中型データセンターやネットワークオペレーションセンターから脱却し、5Gのインテリジェントエッジのユースケースである分散型のサービスも実現可能です。

エッジAI(組込みAI)のユースケース

航空宇宙・防衛

エッジAIを導入することにより、航空宇宙・防衛アプリケーションで通信障害が発生した場合でも、意思決定の遅れや重要な情報なしの操作を防ぎ、利用可能な情報をフル活用したアプリケーションの自律的な制御を可能にします。

オートモーティブ

高精度のダイナミックな3D地図の提供や、インテリジェントな運転などのサービスを実現可能です。ローカルなデータを瞬時に処理し、狭い帯域のモバイルネットワークであっても、適切なデータを適切な場所で適切な時間に処理することができます。

医療

現在の血糖値モニターやその他のセンサーなどの医療機器では、未処理の大量のデータをサードパーティのクラウドに保存する機器が多くあります。そのため、医療機関にはセキュリティ上の懸念があります。病院の敷地内にエッジAIを敷設し、データをローカルで処理することにより、データのプライバシーを保全することができます。また、患者の異常な動向や行動について医療従事者に適時に通知することや、より包括的な現在および過去のデータを含む患者情報のダッシュボードを作成することも可能です。

インダストリアル

インテリジェントエッジは、工場やその他の産業環境におけるデジタルツインの展開を可能にします。クラウドベースのデジタルツインと比較すると、ミッションクリティカルなアプリケーションで使用するのに十分な低レイテンシ、分析の閉ループ統合、安全停止など、イベントベースの操作の応答時間を短縮できるローカル制御機能など、技術的およびビジネス的な利点があります。そして、最終的にデジタルツインの進化を加速させることが可能です。





Wind River Linuxを使ってTensorFlow上で動作する
エッジAIアプリを実行しよう

ここからは実際に、Wind River Linuxを使ってTensorFlowフレームワークを利用して実装された画像認識アプリケーションを実行する方法をご紹介します。画像認識アプリケーションを実行するまでの手順は、次の通りです。

  • TensorFlowを備えたLinuxディストリビューションをソースコードからビルドする
  • Wind River Linuxを起動してTensorFlowが利用できることを確認する
  • 画像とラベルデータを用いてMNIST画像認識モデルを作成する
  • 画像認識モデルにより入力画像に対して推論を行い、結果を出力する

詳細は、下記のドキュメントと動画をご覧ください。
「Wind River Linux Tutorial:Creating a basic neural network with TensorFlow, LTS22」
TensorFlowでベーシックなニューラルネットワークを作成 >>クリック>>

hypervisor
動画:エッジAI~TensorFlowで画像認識を体験


TensorFlowを備えたLinuxディストリビューションを
ソースコードからビルドする

事前準備

Wind River Linuxを使用するには、LinuxをインストールしたホストPCが必要です。推奨されるホストPCの要件は「Wind River Linux Release Notes:Host System Recommendations and Requirements」をご確認ください。また、「Necessary Linux Host System Libraries and Executables」に掲載されているパッケージも事前にインストールしてください。今回の動画ではホストPCにUbuntu Desktop 20.04(x86 64bit)を選択しています。



Linuxディストリビューションのソースコード入手

Wind River Linux LTS22の場合

まず、Wind River Linux によるLinuxディストリビューションの開発環境を構築します。Wind River LinuxのWEBページにて「Wind River Linux を評価(ビルドシステム含む)」をクリックし、ダウンロードに必要な項目を入力後、使用許諾契約を確認し、送信をクリックしてください(右図)。


GitHubのURLがWEBサイト上に表示されます。このURLにアクセスするとGitHubページが開きますので、gitコマンドに指定するclone用のURLを取得してください(右図)。


clone用URLと、Wind River Linux LTS22を示すブランチ名「WRLINUX_10_22_BASE」を付与した、git cloneコマンドを実行し、開発環境を構築します。以下は、ホームディレクトリの中に作業用ディレクトリ「codebuild」を作成し、codebuild内に開発環境を構築する例です。

ホストPC上での操作(Wind River Linux LTS22の場合)
                            
$ mkdir ./codebuild
$ cd ./codebuild
$ git clone --branch WRLINUX_10_22_BASE \
https://github.com/WindRiverLinux22/wrlinux-x.git
                            
                        

Wind River Linux LTS22の場合

Wind River Linux Platform Development Quick Start, LTS 22」を参考に「Wind River Linux GitHub」を開きます。GitHubのURLがWEBサイト上に表示されます。このURLにアクセスするとGitHubページが開きますので、gitコマンドに指定するclone用のURLを取得してください(右図)。

clone用URLと、Wind River Linux LTS22を示すブランチ名「WRLINUX_10_22_BASE」を付与した、git cloneコマンドを実行し、開発環境を構築します。以下は、ホームディレクトリの中に作業用ディレクトリ「codebuild」を作成し、codebuild内に開発環境を構築する例です。

ホストPC上での操作(Wind River Linux LTS22の場合)
                            
$ mkdir ./codebuild
$ cd ./codebuild
$ git clone --branch WRLINUX_10_22_BASE \
https://github.com/WindRiverLinux22/wrlinux-x.git
                            
                        
Why Wind River Linux
図2:ソースコードベースのWind River Linuxの入手

Why Wind River Linux
図3:GitHub上のWind River Linux


Linuxディストリビューションのビルド

次に、TensorFlowを備えたLinuxディストリビューションを作成するための設定を含むビルドシステムを取得します。git cloneコマンドにより入手した"./wrlinux-x/setup.sh"開発ツールに次のオプションを付与して実行することで、ビルドシステムを取得できます。

ホストPC上での操作
                        
$ ./wrlinux-x/setup.sh --list-machines
<利用可能なBSPの一覧が表示される>
$ ./wrlinux-x/setup.sh --machines qemuarm64 \
--templates feature/tensorflow \
--layers meta-tensorflow --dl-layers
<qemuarm64に対応するBSPを備え、TensorFlowを備えた
Linuxディストリビューションを作成するための設定を含むビルドシステムを取得する>                            
                        
                    

続いて、". ./environment-setup-x86_64-wrlinuxsdk-linux"コマンドを実行してください。このコマンドにより、開発作業に必要なPATHがシステムに追加されます。続いて". ./oe-init-build-env"のコマンドを実行すると、Linuxディストリビューションをカスタマイズするための設定ファイルを含む、ビルド用ディレクトリが作成されます。

ホストPC上での操作
                        
$ . ./environment-setup-x86_64-wrlinuxsdk-linux
$ . ./oe-init-build-env                                        
                        
                    

"conf/local.conf"を編集して、ビルドの設定を行います。ビルド中にネットワークからパッケージを自動収集できるよう"BB_NO_NETWORK ?= '0'"を指定します。他の設定項目は、setup.shにより自動的にTensorFlowを備えたLinuxディストリビューションが作成されるように設定されています。

ホストPC上での操作
                        
$ vi conf/local.conf
BB_NO_NETWORK ?= '0' 
WRTEMPLATE ?= “feature/tensorflow”
MACHINE ??= " qemuarm64"
DISTRO ??= “wrlinux”
PACKAGE_CLASSES ?= “package_rpm”                                                    
                        
                    

最後に、Linuxディストリビューションをビルドします。ビルドには"bitbake"コマンドを利用します。bitbakeコマンドの引数には、標準のビルドを意味する"wrlinux-image-std"を指定し、オプションとしてアプリケーションを開発するためのSDKを生成する"-c populate_sdk"を指定します。bitbakeコマンドを実行すると約5000個のソースコードが次々にダウンロードされ、統合されます。完了までしばらくお待ちください。

ホストPC上での操作
                        
$ bitbake wrlinux-image-std -c populate_sdk
                        
                    



Wind River Linuxを起動して
TensorFlowが利用できることを確認する

ビルドしたLinuxディストリビューションをQEMU上で実行してみましょう。実行には"runqemu"コマンドを使います。オプションにはMACHINE名"qemuarm64"を指定します。TensorFlowのアプリケーションはメモリを大量に消費するため"qemuparams="-m 5120""オプションを指定してください。runqemuコマンドによりQEMUの実行が開始されると、CUIのWind River Linuxが起動します。

ホストPC上での操作
                        
$ runqemu qemuarm64 wrlinux-image-std qemuparams="-m 5120"
                        
                    

作成したLinuxディストリビューション上でPythonとTensorFlowを実行できることを確認してみましょう。次のコマンドを実行することにより、PythonがTensorFlowを呼び出し、TensorFlowが1000x1000の二次元配列を乱数で初期化し、その合計値が算出される様子を確認することができます。

Wind River Linux上での操作
                        
# python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
Tensor(-87.60, shape=(), dtype=float32)
※出力値は乱数の合計値となることから実行毎に変化する                            
                        
                    

hypervisor
図4:Wind River Linux上で動作するPythonとTensorFlow


画像とラベルデータを用いてMNIST画像認識モデルを作成する

続いて、PythonとTensorFlowを使って、画像認識アプリケーションに利用するMNIST画像認識モデルを作成してみましょう。QEMU上のWind River Linux で下記のプログラム"neural-network.demo.py"を実装します。このプログラムはMNISTと呼ばれるデータセットを活用し、画像に対応するラベルを学習するものです。

Wind River Linux上で実行
                        
# cd /root
# cat >neural-network.demo.py <<ENDOF
import tensorflow as tf
mnist = tf.keras.datasets.mnist

(x_train, y_train),(x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0

model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(512, activation=tf.nn.relu),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10, activation=tf.nn.softmax)
])
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])

model.fit(x_train, y_train, epochs=5)
model.evaluate(x_test, y_test)
ENDOF
                        
                    

実装後、以下のコマンドで学習を開始します。プログラムを開始すると、自動的に学習用のデータのダウンロードが開始され、ダウンロード完了後、データに従った学習が行われます。

Wind River Linux上で実行
                        
# python3 /root/neural-network.demo.py
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz
11493376/11490434 [==============================] - 13s 1us/step
Instructions for updating:
Colocations handled automatically by placer.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
Epoch 1/5
60000/60000 [==============================] - 11s 182us/sample - loss: 0.2194 - acc: 0.9347
Epoch 2/5
60000/60000 [==============================] - 11s 180us/sample - loss: 0.0955 - acc: 0.9704
Epoch 3/5
60000/60000 [==============================] - 11s 180us/sample - loss: 0.0679 - acc: 0.9786
Epoch 4/5
60000/60000 [==============================] - 11s 180us/sample - loss: 0.0537 - acc: 0.9831
Epoch 5/5
60000/60000 [==============================] - 11s 180us/sample - loss: 0.0439 - acc: 0.9858
10000/10000 [==============================] - 1s 60us/sample - loss: 0.0733 - acc: 0.9785
                        
                    


画像認識モデルにより入力画像に対して推論を行い、結果を出力する

最後に、MNIST画像認識モデルを使った画像認識を実行してみましょう。サンプルアプリケーションは「https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/label_image」にて配布されています。ホストPCでサンプルアプリケーションが含まれるgitリポジトリのzip圧縮ファイルをダウンロードし、サンプルアプリケーションをQEMU上のWind River Linuxへ転送します。転送後、サンプルアプリケーションを実行することにより、入力画像にふくまれているオブジェクトのラベルが出力されます。

ホストPC上での操作
                        
$ wget https://github.com/tensorflow/tensorflow/archive/refs/heads/master.zip
$ unzip master.zip
$ cd ./tensorflow-master
$ cd ./tensorflow/examples/label_image/
$ scp -r ./* root@<QEMU上のWind River Linux のIPアドレス>:~/example                            
                        
                    

Wind River Linux上で実行
                        
# cd ~/example
# label_image
2021-05-24 08:47:45.545109: I tensorflow/examples/label_image/main.cc:251] military uniform (653): 0.834306
2021-05-24 08:47:45.546126: I tensorflow/examples/label_image/main.cc:251] mortarboard (668): 0.0218695
2021-05-24 08:47:45.547013: I tensorflow/examples/label_image/main.cc:251] academic gown (401): 0.010358
2021-05-24 08:47:45.547918: I tensorflow/examples/label_image/main.cc:251] pickelhaube (716): 0.00800814
2021-05-24 08:47:45.548801: I tensorflow/examples/label_image/main.cc:251] bulletproof vest (466): 0.00535084
                        
                    

hypervisor
図5:入力画像と認識結果。サンプルアプリケーションを実行すると写真内のオブジェクトが認識されラベルが表示される


本記事では、エッジAIの概要と、AIの実装に広く利用されているフレームワークについて解説しました。また、Wind River Linux を使うことにより簡単にTensorFlowを用いて画像認識をするエッジAIアプリケーションを実行できることも紹介しました。Wind River Linux とTensorFlow、OpenVinoの組み合わせは画像認識だけでなく、様々なAI/機械学習のモデルをエッジで実行することを可能にします。是非採用をご検討中のアルゴリズムをWind River Linux を使ってお手元でお試しください!

リソース

Previous Next