How I Built a Face-Verification App using Flutter, MLKit, and TFLite for CET Students Verification

How I Built a Face-Verification App using Flutter, MLKit, and TFLite for CET Students Verification

TB

Teqani Blogs

Writer at Teqani

November 10, 20254 min read

This article details the development of a face-verification app for Common Entrance Test (CET) student verification using Flutter, MLKit, and TFLite. The application aims to replace manual ID checks with a more efficient and secure machine learning-based system.

Project Overview

The CET Student Verification Application simplifies and secures the student verification process during Common Entrance Test (CET) events. It uses Flutter, Google MLKit, and TensorFlow Lite (TFLite) to provide accuracy, speed, and security across Android and iOS.

Tech Stack

The app incorporates several technologies:

  • Flutter 3.24 (Dart 3.9 – Null Safety)
  • State Management: BLoC + Provider
  • Database: Hive • SQLite (Offline caching)
  • Machine Learning: Google MLKitTFLite (MobileFaceNet)
  • Security: AES Encryption • flutter_secure_storage • Screen Protector
  • UI/UX: Syncfusion Charts • Shimmer • Percent Indicator
  • Backend Integration: API-based verification endpoints (NIC Servers)

App Architecture

The app follows Clean Architecture with the BLoC pattern and dependency injection via get_it. This ensures testability, modularity, and clean separation between UI, business logic, and data layers.

Key Features

  • Face Verification (MLKit + TFLite): Uses Google MLKit for real-time face detection and validation.
  • Secure Authentication: JWT-based login system with OTP verification and AES Encryption.
  • Offline-First Design: Student data cached in local SQLite with background sync.
  • Analytics Dashboard: Built using Syncfusion Charts to display candidate summaries.
  • Admin Tools: Role-based login and real-time verification logs.

Security Measures

The app implements AES-encrypted image and embedding storage, flutter_secure_storage for token management, HTTPS-only API communication, and a Screen Protector to block screenshots during sensitive operations.

Performance Highlights

The ML model (facenet_512.tflite) is optimized for mobile using the TFLite interpreter, reducing image preprocessing latency by ~40% using compute() for isolates. Achieved <1 sec face verification time on mid-range Android devices. Offline mode tested with 1,000+ student entries with smooth sync on reconnect.

Testing

Various tests were conducted:

  • Unit Tests: Mockito
  • Widget Tests: Flutter Test
  • Integration Tests: Flutter Driver

Future Enhancements

  • Liveness Detection (anti-spoofing)
  • NFC ID Verification
  • Push Notifications for verification alerts
  • Role-Based Dashboards for Admins & Officers
TB

Teqani Blogs

Verified
Writer at Teqani

Senior Software Engineer with 10 years of experience

November 10, 2025
Teqani Certified

All blogs are certified by our company and reviewed by our specialists
Issue Number: #3f2836d0-07b9-4886-bd84-30c2029721c7