Object Counting

Lattice sensAI Reference Design

This reference design provides an example of how to implement an object counting application based on the Lattice sensAI stack. It includes a SPI, DDR memory interface IP blocks, an image signal processing engine, 8 CNN acceleration engines and a counting and overlay engine to count and indicate how many fruit items were detected.

The reference design is optimized for the ECP5-85 FPGA. While the FPGA logic will be loaded from the external flash memory, the weights and biases are loaded from a SD card, connected to SPI interface.


  • Example reference design for counting objects
  • Uses weights and activation based on a fruit dataset created by Lattice
  • Runs @ 1fps with 224 x 224 RGB Input
  • Total ECP5 power consumption of 0.85 W
  • Internal EBR blocks used to store activations, minimizing DRAM access
Lattice sensAI

Jump to


Object Counting Using ECP5 and CNNsExpand Image

Object Counting Using ECP5 and CNNs

  • This demonstration tallies apples and oranges to demonstrate object counting
  • The inferencing is done using eight Convolutional Neural Networks implemented in the Embedded Vision Development Kit’s ECP5 FPGA
  • Power consumption is less than 1W

Block Diagram


Technical Resources
Object Counting Using CNN Accelerator IP - Documentation
FPGA-RD-02036 1.1 9/25/2018 PDF 1.1 MB
Object Counting Using CNN Accelerator IP Project Files
1.1 9/25/2018 ZIP 48.2 MB

Like most websites, we use cookies and similar technologies to enhance your user experience. We also allow third parties to place cookies on our website. By continuing to use this website you consent to the use of cookies as described in our Cookie Policy.