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 - MRohaabBaig/text-to-image-recognition-ocr

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
Explanation.md
Explanation.md
 
 
README.md
README.md
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Project 4: Basic Text Recognition (OCR)

Overview

This is my submission for Project 4 (Image or Text Recognition - Basic) at DecodeLabs. It's a Python pipeline that takes a raw image, cleans it up, runs Optical Character Recognition on it using Tesseract, and only keeps results the model is at least 80% confident about.

The script is self-contained: it generates its own sample test image on first run, so there's nothing you need to supply to see it work end to end.

Features

  • Generates a sample input image automatically (no external files needed)
  • Full pre-processing pipeline: grayscale conversion -> Gaussian blur -> adaptive thresholding
  • OCR via pytesseract (Google's Tesseract engine)
  • Per-word confidence filtering (80% minimum, configurable)
  • Draws bounding boxes on every word that passes the confidence gate
  • Saves every intermediate step as an image, so you can see exactly what each stage of the pipeline did

Installation

1. Install the Tesseract engine (required - not a pip package)

pytesseract is just a Python wrapper. The actual OCR engine has to be installed separately:

  • Windows: install the "UB Mannheim" Tesseract build, then uncomment and update the tesseract_cmd line near the top of ocr_pipeline.py with your install path.
  • macOS: brew install tesseract
  • Linux (Debian/Ubuntu): sudo apt install tesseract-ocr

2. Install Python dependencies

pip install -r requirements.txt

Usage

python ocr_pipeline.py

That's it. On first run it will:

  1. Create an assets/ folder and generate a sample test image inside it.
  2. Create an output/ folder with three images: grayscale, thresholded, and the final result with green bounding boxes.
  3. Print the extracted text and average confidence to the console.

Expected output

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 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.