Skip to content

abir739/imageflow_flutter

Repository files navigation

ImageFlow - Smart Image Processing App

An intelligent Flutter application that automatically detects and processes images using ML Kit. Supports face detection with B&W filtering and document scanning with OCR text extraction.

Screenshots

Home & Processing

Home Screen Image Capture Document Processing OCR Text Extraction Face Processing

Results

Face Result After Face Result Before Document Result Detail View Document Detail View Face

Video Demo

You can watch the demo here: 👉 Watch Demo

Features

  • Smart Content Detection — Automatically identifies faces or documents using face + text analysis
  • Face Processing — Applies black & white filter to all detected faces (supports multiple faces)
  • Document Processing — Detects document region based on text and paper color, enhances contrast, and exports to PDF
  • OCR Text Extraction — Recognizes text from documents — view, search inside text, copy to clipboard
  • Processing History — Grid view of past results with thumbnails, metadata and detail screen

Architecture

Clean Architecture Layers

lib/
├── data/
│   ├── datasources/     # ML Kit & Image Processing
│   ├── models/          # Data Models
│   └── repositories/    # Repository Implementations
├── domain/
│   ├── entities/        # Business Entities
│   └── repositories/    # Repository Interfaces
└── presentation/
    ├── home/           # Home Screen
    ├── capture/        # Image Capture
    ├── processing/     # Processing Screen
    ├── result/         # Result Display
    └── history_detail/ # Detail View

Design Patterns

  • Repository Pattern - Separation of data sources
  • Dependency Injection - Using GetX bindings
  • Reactive Programming - GetX state management
  • SOLID Principles - Clean, maintainable code

Key Architectural Decisions

  • State Management: GetX

  • Reactive state updates

  • Dependency injection

  • Simple navigation

  • No setState needed

  • Local Storage: Hive

  • Fast, lightweight NoSQL database

  • Type-safe data persistence

  • Perfect for metadata storage

  • Image Processing: Google ML Kit + image package

  • Face detection with bounding boxes

  • Text recognition (OCR)

  • Color-based edge detection

  • Custom processing algorithms

Implementation Choices

  • Face Detection
    Uses two sensitivity levels (strict + relaxed fallback) to improve detection on small/distant/angled faces.

  • Document Cropping
    Expands from detected text region using paper color matching (instead of full contour detection) for speed and simplicity.

  • Cropping Safety
    Uses small padding (~10 px) + bounded expansion to avoid cutting important content.

Tech Stack

Category Technology
Framework Flutter 3.10.8
Language Dart 3.0+
State Management GetX 4.7.3
ML & Computer Vision Google ML Kit
Image Processing Image Package 4.5.0
PDF Generation PDF 3.11.3
Local Storage Hive 2.2.3
File Handling Path Provider 2.1.2

Dependencies

dependencies:
  get: ^4.7.3                              # State management
  google_mlkit_face_detection: ^0.13.2     # Face detection
  google_mlkit_text_recognition: ^0.15.1   # OCR
  image: ^4.5.0                            # Image processing
  image_picker: ^1.2.1                     # Camera/Gallery
  hive: ^2.2.3                             # Local storage
  hive_flutter: ^1.1.0                     # Hive initialization
  path_provider: ^2.1.2                    # File paths
  pdf: ^3.11.3                             # PDF generation
  open_file: ^3.5.11                       # Open PDF viewer
  intl: ^0.20.2                            # Date formatting

Getting Started

Prerequisites

  • Flutter SDK 3.10.8 or higher
  • Dart SDK 3.0 or higher

Installation Steps

  1. Clone the repository
   git clone https://github.com/abir739/imageflow_flutter.git
   cd imageflow_flutter
  1. Install dependencies
   flutter pub get
  1. Run the app
   flutter run

How to Use

1️⃣ Capture Image

  • Tap the + button on home screen
  • Choose Camera to take a photo or Gallery to select existing image

2️⃣ Automatic Processing

  • App automatically detects content type (Face or Document)
  • Watch real-time processing progress with status updates

3️⃣ View Results

For Face Processing:

  • Toggle between Before/After to see B&W face filter
  • Supports multiple faces in single image

For Document Scanning:

  • View generated PDF
  • Read extracted OCR text
  • Search within text
  • Copy text to clipboard
  • Open PDF in external PDF viewer

4️⃣ Access History

  • Browse all processed images in grid view
  • Tap to view full details
  • Long press to delete items

About

An intelligent Flutter application that automatically detects and processes images using ML Kit. Supports face detection with B&W filtering and document scanning with OCR text extraction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors