GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - WannaKhrop/page-classification-cv: Apply CNN to detect document pages with specific deparment

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
README.md
README.md
 
 
environment.yml
environment.yml
 
 
kernels.py
kernels.py
 
 
main.py
main.py
 
 
model.keras
model.keras
 
 
utils.py
utils.py
 
 

Repository files navigation

๐Ÿ“„ Page Classification with Convolutional Networks

This project tackles the problem of page-level classification in scanned or digitized documents using Convolutional Neural Networks (CNNs).

The model is trained to distinguish between:

  • โœ… Negative class: Pages that should remain in the document
  • โŒ Positive class: Pages that should be deleted (e.g., blank, separator, or irrelevant)

The classification is performed based on the page header image.


๐Ÿš€ Features

  • CNN-based binary classification model
  • Focused on structural features in page headers
  • Trained on labeled header crops
  • Scripted pipeline for preprocessing, training, and inference
  • Designed for integration into document-cleaning workflows

๐Ÿง  Model Overview

The model uses a convolutional architecture optimized for small header regions, where layout and text patterns play a key role in identifying unnecessary pages.

Input: Cropped header image of shape [300, 1000, 1]
Output: Binary label (0 = keep, 1 = delete)


โš™๏ธ Training Setup

The model is built using TensorFlow Keras Sequential API and trained for binary classification.

๐Ÿ”ง Architecture

  • Input layer: Accepts images of shape (300, 1000, 1)
  • Conv2D Layer 1: 64 filters, kernel size (10, 20), strides (3, 5), ReLU, L2 regularization
  • MaxPooling2D: pool size (3, 5)
  • Conv2D Layer 2: 128 filters, kernel size (3, 4), strides (1, 1), ReLU, L2 regularization
  • MaxPooling2D: pool size (2, 4)
  • Flatten
  • Dropout: rate 0.20 to prevent overfitting
  • Dense Output Layer: 1 unit with sigmoid activation (no bias)

๐Ÿงช Training Configuration

  • Optimizer: Adam, learning rate 1e-3
  • Loss Function: BinaryCrossentropy (no label smoothing)
  • Metrics:
    • Recall (threshold = 0.9)
    • FalsePositives (threshold = 0.9)

๐Ÿ“Š Metrics

Recall False Positive Loss
0.94 0.0 0.0416

๐Ÿ“Œ Notes

  • The dataset is not included in this repository for privacy reasons.
  • Evaluation is done using custom-labeled data with real-world scanned documents.

About

Apply CNN to detect document pages with specific deparment

Topics

classificationcomputer-visionconvolutional-neural-networkskeras

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.