Acronyms in This Document ................................................................................................................................................. 4
4.Programming the Demo ............................................................................................................................................. 11
4.1.Programming the MicroSD Card Firmware ....................................................................................................... 11
5.Running the Demo ...................................................................................................................................................... 13
Technical Support ............................................................................................................................................................... 15
Revision History .................................................................................................................................................................. 16
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
Figure 3.1. Back View of ECP5 VIP Input Bridge Board ......................................................................................................... 9
Figure 3.2. Top View of CrossLink VIP Input Bridge Board ................................................................................................. 10
Figure 4.1. Connecting the MicroSD Card ........................................................................................................................... 11
Figure 4.2. Win32 Disk Imager ............................................................................................................................................ 12
Figure 5.1. Example Output with Car Image ....................................................................................................................... 13
Figure 5.2. Example Output with Truck Image ................................................................................................................... 14
Figure 5.3. Example Output with Motorbike Image ........................................................................................................... 14
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
This document provides technical information and instructions for setting up and running the EVDK Based Vehicle
Classification Demo. This demo is designed to utilize the Lattice Machine Learning Engine (MLE) IP and is implemented
on the Lattice Embedded Vision Development Kit (EVDK). The EVDK based vehicle classification demo takes image data
from one of the cameras on the EVDK and feeds it through a CNN and outputs the input image with a bounding box
overlay through the HDMI Output. The color of the bounding box and a letter indicate the vehicle class.
Refer to the following documents for detailed information on Lattice development boards and kit:
Lattice Embedded Vision Development Kit User Guide (FPGA-UG-02015)
CrossLink VIP Input Bridge Board Evaluation Board User Guide (FPGA-EB-02002)
ECP5 VIP Processor Board Evaluation Board User Guide (FPGA-EB-02001)
HDMI VIP Output Bridge Board Evaluation Board User Guide (FPGA-EB-02003)
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
The EVDK Based Vehicle Classification Demo is designed to utilize the Lattice Embedded Vision Development Kit with
MicroSD Card Adapter Board, as shown in Figure 2.1.
The Lattice Embedded Vision Development Kit features a stackable modular architecture consisting of three boards:
Figure 2.1 shows Revision C of the Embedded Vision Development Kit. For earlier revisions, refer to the user guide of
the specific evaluation board. For more information on the Embedded Vision Development Kit, visit the Lattice website
Embedded Vision Development Kit page.
The firmware, which holds the CNN training results (from Caffe tool) is stored inside the SD card. The MLE classifies
input images and generates a bounding box and class designation which is shown as an overlay on the output image.
As shown in Figure 2.2, the video data taken by the camera sensor (CN2) on the CrossLink VIP Input Bridge Board are
fed into the ECP5 VIP Processor Board where the MLE processes the image data. This data, with weights and biases
from the firmware, is used to create the bounding box and classification overlay.
The implementation of this demo in ECP5-85 consists of 8 Neural Network engines (NN) engines.
Figure 2.1. Lattice EVDK with MicroSD Card Adapter Board
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
Lattice Embedded Vision Development Kit (LF-EVDK1-EVN)
Mini-USB Cable (Included in the kit)
12 V Power Supply (Included in the kit)
HDMI Cable
HDMI Monitor (1080p60)
MicroSD Card Adapter (MICROSD-ADP-EVN)
MicroSD Card (Standard only - less than 2 GB, not SDHC/SDXC and others)
3.2. Software and Firmware Requirements
Diamond Programmer (Refer to www.latticesemi.com/programmer)
Programming files for Embedded Vision Development Kit
Before programming the boards, perform the following steps:
On the ECP5 VIP Input Bridge Board, make sure the jumper settings are as shown in Figure 3.1. On the CrossLink VIP Processor Board (Figure 3.2), ensure that SW2 is ON to power the board (LEDs should be ON). Connect the 12 V power supply to the barrel plug J4. Connect the mini-USB cable from the PC to the mini-USB connector J2.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
Figure 3.1. Back View of ECP5 VIP Input Bridge Board
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
Figure 3.2. Top View of CrossLink VIP Input Bridge Board
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
Use Win32diskimager to write the appropriate Flash image file to the SD memory card. Depending on your PC, you
may need a separate adapter (not described in this document) to physically connect to the card. See the
Programming the Demo section to determine the file for the specific demo.
Connect the MicroSD Card as shown in Figure 4.1.
In Win32 Disk Imager, select the image file ~/Demonstration/vehicle_classification_demo.bin as shown in
Figure 4.2.
Select the card reader in Device. Click Write.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
Insert the configured MicroSD Card into the MicroSD Card Adapter, and connect it to the Embedded Vision
Development Kit.
Cycle the power on the Embedded Vision Development Kit to allow ECP5 and CrossLink to be reconfigured from
Flash.
Connect the Embedded Vision Development Kit to the HDMI monitor. The camera image should be displayed on
monitor.
Place image for classification in front of the camera. If a vehicle is detected, a bounding box is shown along with a
classification letter as follows:
Car -- Red box and L (Light)
Truck -- Green box and H (Heavy)
Motorbike or bicycle -- Blue box and T (Two-wheeler)
Some example outputs are shown below (Figure 5.1, Figure 5.3, and Figure 5.2).
Note: Since demo firmware/information is written to non-volatile Flash memory, it runs at power-up.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
For assistance, submit a technical support case at www.latticesemi.com/techsupport.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
All other brand or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.