FPGA · Verilog HDL · Zynq‑7 ZC702

Lightweight Binary Image
Classification on FPGA

An M.Tech project on hardware‑accelerated malaria diagnosis, later published in two research papers — k‑Nearest Neighbors, CNN and Decision Tree classifiers, synthesized in 8‑bit fixed‑point and benchmarked across parallel, pipelined and basic architectures.

80%
Peak Accuracy (CNN)
200MHz
Clock Frequency
8‑bit
Fixed‑Point Precision
8×8
Optimum Resolution
Block diagram of the lightweight binary image classification system
System overview — image preprocessing → classifier selection → HDL synthesis → result comparison
Tool · FPGA Design
Xilinx Vivado
Synthesis, implementation, bitstream & on‑chip power
Tool · Area, Power & Delay
Cadence Genus
Gate‑level area, power and timing delay analysis
Hardware Used
Zynq‑7 ZC702
Evaluation board, 200 MHz target clock
Project Overview

What This Project Is About

A hardware-accelerated screening pipeline for malaria. Blood-smear images are preprocessed, then classified as parasitic or uninfected by machine-learning models running directly on an FPGA — fast, compact and low power, without a GPU or a PC in the loop.

1

The problem

Malaria diagnosis from blood smears needs to be quick and affordable, including where compute resources are limited.

2

The approach

Images are converted to grayscale, binarized and shrunk to a small fixed size (8×8 works best), then fed to three classifiers: CNN, k‑NN and Decision Tree.

3

The hardware

Each model is written in Verilog with 8‑bit fixed‑point arithmetic and built as basic, parallel and pipelined architectures, then compared on area, power and delay.

4

The result

Real-time classification at a 200 MHz clock with accuracy up to 80%, showing that lightweight models on an FPGA can support low-power malaria screening.

Stage 01 – 04

Image Preprocessing Pipeline

Every classifier shares the same front end: grayscale conversion, thresholded binarization, and downsampling to a hardware‑friendly resolution. This runs live on the actual Kaggle blood‑smear photographs used in the Project.

01RGB Input
02Grayscale
03Binary (0/1)
04Resized — 8×8

Live pipeline, running on the real Cell Images for Detecting Malaria dataset samples (Kaggle).

Architecture Explorer

Classifier Architectures on Silicon

Each classifier is realized as an independent hardware module. Pick a classifier and an implementation style to see the actual figure from the project — and what it costs in area, power and timing.

Post‑Synthesis Results

Hardware Benchmarks — All 9 Configurations

Accuracy, on‑chip power and Cadence Genus timing delay across every classifier × architecture pairing, synthesized on the Zynq‑7 ZC702 at 200 MHz, 8‑bit fixed‑point.

ModelSim Accuracy (%)

On‑Chip Power — Vivado (W)

Cadence Genus Delay (ps)

KNN CNN Decision Tree
Design Space

Resolution vs. Accuracy vs. Hardware Cost

Higher resolution preserves more morphological detail — at a steep hardware price. 8×8 was selected as the optimum trade‑off for FPGA deployment.

Diagnostic Validity

Confusion Matrix & Clinical Metrics

Beyond raw accuracy: precision, recall and F1‑score across 5,512 test images, split evenly between infected and uninfected blood cells.

Cycle-Level Estimation

End-to-End Latency & Throughput

Estimated at 200 MHz (5 ns clock period) across the full inference pipeline — input buffering through output decision.

ClassifierArchitectureClock CyclesLatency (µs)Throughput (img/s)
Deployment Guide

Which Model, For Which Application?

Design-to-Hardware Flow

From RTL to Real-Time Inference

The path each classifier takes from HDL source to a live, running design on the Zynq‑7 ZC702 board.

01

Implementation

Verilog HDL

RTL for KNN, CNN & DT — parallel / pipelined

02

Synthesis

Vivado · Genus

Netlist, area, power & timing at 200 MHz

03

Bitstream Generation

Place & Route

Implementation run produces the .bit file

04

FPGA Uploading

JTAG · ZC702

Program the Zynq‑7 device with the bitstream

05

Real-Time Check

Live verification

Feed test images, observe class output on hardware