Skip to content
Nat Lee

Keyboard shortcuts

Turn these off if they get in the way of a screen reader or voice control. The setting is saved in this browser.

1
Home
2
Work
3
Projects
4
About
5
Experience
/
Search projects
?
Show this panel

Computer Vision

Spin-off · Infortrend

Simply Blur Detector

CNN meets Laplacian, in your browser

Drop in a picture and compare a small Keras CNN with Laplacian variance, including a window-by-window blur heat map. No upload needed.

Role
Creator & Maintainer
Period
2019 – 2026.11
Status
Completed
Categories
Vision & imagingAI & machine learning
Origin
Infortrend
Stack
  • Python
  • TensorFlow
  • Keras
  • ONNX Runtime Web
  • OpenCV
  • Docker
Simply Blur Detector, screenshot 1

Overview

A TensorFlow / Keras CNN trained on sharp illustrations and copies blurred with blur-generator. The 2026 version includes original training artwork, x86 and ARM Docker support, and ONNX export for a browser demo that compares the CNN with Laplacian variance. Its verdict is a model estimate, with both methods visible for comparison.

What it's good for

For anyone sorting photos or camera frames by sharpness: try both scores on your own pictures, watch them react as a stress test blurs the picture step by step, then train the same CNN on your own sharp pictures. blur-generator makes the blurry half for you.

How it fits together

Simplified on purpose. The real thing has more arrows and at least one config file nobody understands.

40 out of 40 on its own test set, 34 on the project's drawings. Home games are easier.

  1. Sharp pictures
    • 120 own illustrations
    • data/*/nonblur
    → blurred by
  2. blur-generator
    • blurgenerator package
    • lens, Gaussian, motion
    → training data
  3. This oneBlur detector
    • Keras CNN
    • model/model.h5
    • ONNX export
    → deployed to
  4. Browser demo
    • ONNX Runtime Web
    • Laplacian variance
    • GitHub Pages

Point at a box to see what it connects to.

The web demo on Seaside ride: CNN and Laplacian both say sharp, with the heat map on top.
The web demo on Seaside ride: CNN and Laplacian both say sharp, with the heat map on top.

Features

  • Browser-local inference and patch-by-patch heat maps
  • CNN and Laplacian variance side by side
  • Original sharp and blurred training illustrations
  • Docker training and ONNX export

The problem

  • Matching preprocessing between Python training and browser inference

What I did

  • The same equalisation, resize and normalisation steps across training and export
Lens blur growing across a 4 × 4 grid: only the lightest, top left, still passes as clear.
Lens blur growing across a 4 × 4 grid: only the lightest, top left, still passes as clear.

Results

  • Interactive GitHub Pages demo with local image processing
  • Reproducible training assets and model evaluation in the repository

What I learned

  • A model trained on code-drawn cartoons scored 40 of 40 on its own test set and 34 of 40 on the repo's illustrations.
  • Until November 2026 the training folder held anime character art with an unclear licence. It is now 120 of the project's own illustrations.
  • The publishing gate counts whole pictures: 85% means 34 of 40. It was 90% until it was lowered on 2026-11-04 for that day's anime model.
  • A sharp training picture, one of the project's own 120 illustrations.
    A sharp training picture, one of the project's own 120 illustrations.
  • Its blurred copy from blur-generator, the other half of the training pair.
    Its blurred copy from blur-generator, the other half of the training pair.
  • Vision & imagingAI & machine learning11 stars on GitHub

    Street Scene OCR

    Compare EasyOCR, RapidOCR and PaddleOCR on Traditional Chinese street signs, with text boxes, timings and a small public-domain benchmark.

    2026Completed
  • Spin-off · Infortrend
    Vision & imagingAI & machine learning11 stars on GitHub

    Face Wall Generator

    Tile a folder of face pictures into a seeded grid. Optionally crop faces with OpenCV’s YuNet detector before building the wall.

    2021Completed
  • Spin-off · Infortrend
    Vision & imagingAI & machine learning33 stars on GitHub

    OpenPose Wrist Heatmap

    Runs the body OpenPose model over a video and piles up where the wrists went into a heatmap. The repo name says hands; the model only ever knew about wrists.

    2020Completed