CoolFace
Apppublic

YaazhiniS/OMR-Evaluation

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

๐ŸŽฏ Automated OMR Evaluation & Scoring System

An automated OMR (Optical Mark Recognition) evaluation system built for Innomatics Research Labs to process placement readiness assessments efficiently.

๐Ÿ“‹ Problem Statement

At Innomatics Research Labs, we conduct placement readiness assessments across roles like Data Analytics and AI/ML for Data Science with Generative AI courses. Each exam uses standardized OMR sheets with 100 questions distributed as 20 per subject across 5 subjects.

The manual evaluation process was:

  • โ€”โฐ Time-consuming (delays in releasing results)
  • โ€”โŒ Error-prone (human miscounts)
  • โ€”๐Ÿ’ฐ Resource-intensive (requires multiple evaluators)

๐Ÿš€ Solution

This automated system provides:

  • โ€”๐Ÿ“ฑ Mobile phone camera capture support
  • โ€”๐Ÿ”„ Automatic image preprocessing and perspective correction
  • โ€”๐ŸŽฏ Accurate bubble detection using Computer Vision
  • โ€”๐Ÿ“Š Subject-wise scoring and total score calculation
  • โ€”๐ŸŒ Web-based interface for easy evaluation
  • โ€”๐Ÿ“ˆ Real-time results and statistics
  • โ€”๐Ÿ’พ Secure database storage with audit trail

๐Ÿ› ๏ธ Tech Stack

Core OMR Processing

  • โ€”Python - Primary programming language
  • โ€”OpenCV - Image preprocessing, bubble detection, perspective correction
  • โ€”NumPy - Image array manipulation and calculations
  • โ€”Pandas - Data processing and Excel handling
  • โ€”SQLite - Database for storing results

Web Application

  • โ€”Streamlit - Frontend web interface
  • โ€”Pillow - Image manipulation and format conversion

๐Ÿ“ฆ Installation

  1. 1.Clone the repository:
bash
git clone https://github.com/Yaazhini25/omr-evaluation-system.git
cd omr-evaluation-system
  1. 1.Install dependencies:
bash
pip install -r requirements.txt
  1. 1.Run the application:
bash
streamlit run app.py

๐ŸŽฎ Usage

Step 1: Prepare Answer Key

  • โ€”Create an Excel file with subjects as columns (Python, EDA, SQL, POWER BI, Statistics)
  • โ€”Each column should contain 20 correct answers in format "1 - a", "2 - b", etc.
  • โ€”Use letters a, b, c, d for the 4 answer choices

Step 2: Upload Answer Key

  • โ€”Click "Browse files" and select your Excel answer key
  • โ€”Verify the preview shows correct subjects and answers

Step 3: Upload OMR Sheets

  • โ€”Take clear, well-lit photos of completed OMR sheets
  • โ€”Ensure sheets are flat with all bubbles clearly visible
  • โ€”Upload one or multiple images (PNG, JPG, JPEG)

Step 4: Evaluate

  • โ€”Optionally enter student name
  • โ€”Click "Start Evaluation"
  • โ€”Review results and download CSV reports

๐Ÿ“Š Features

  • โ€”โœ… <0.5% Error Tolerance - Meets Innomatics quality standards
  • โ€”โšก Minutes vs Days - Reduces evaluation time from days to minutes
  • โ€”๐Ÿ” Debug Mode - Shows processing steps for troubleshooting
  • โ€”๐Ÿ“ˆ Real-time Statistics - Subject-wise averages and performance metrics
  • โ€”๐Ÿ’พ Data Persistence - All results stored in SQLite database
  • โ€”๐Ÿ“ฑ Mobile Compatible - Works with smartphone camera captures
  • โ€”๐ŸŒ Web Interface - Easy-to-use browser-based evaluation

๐Ÿ—‚๏ธ Project Structure

omr-evaluation-system/
โ”œโ”€โ”€ app.py                      # Main Streamlit application
โ”œโ”€โ”€ omr_preprocessing.py        # Image preprocessing functions
โ”œโ”€โ”€ omr_bubble_detection.py     # Bubble detection algorithms
โ”œโ”€โ”€ omr_scoring.py             # Scoring and answer key processing
โ”œโ”€โ”€ omr_results.db             # Backend DB to view the results
โ”œโ”€โ”€ ans_key.py                 # Load the answer key excel file
โ”œโ”€โ”€ db_setup.py                # Database operations
โ”œโ”€โ”€ db_drop.py                 # Drop old database
โ”œโ”€โ”€ db_checkup.py              # To verify database on the backend 
โ”œโ”€โ”€ requirements.txt           # Python dependencies
โ”œโ”€โ”€ Dockerfile                 # Docker configuration
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ ans key
    โ”œโ”€โ”€ Key (Set A and B)                  # Answer key to verify
โ””โ”€โ”€ input-images/              # Sample OMR sheets and answer keys
    โ”œโ”€โ”€ Img1.jpeg
    โ””โ”€โ”€ Img2.jpeg
    โ”œโ”€โ”€ Img3.jpeg
    โ””โ”€โ”€ Img4.jpeg
    โ”œโ”€โ”€ Img5.jpeg
    โ””โ”€โ”€ Img6.jpeg
    โ”œโ”€โ”€ Img7.jpeg
    โ””โ”€โ”€ Img8.jpeg
    โ”œโ”€โ”€ Img9.jpeg
    โ””โ”€โ”€ Img10.jpeg
    โ”œโ”€โ”€ Img11.jpeg
    โ””โ”€โ”€ Img12.jpeg
    โ”œโ”€โ”€ Img13.jpeg
    โ””โ”€โ”€ Img14.jpeg
    โ”œโ”€โ”€ Img15.jpeg
    โ””โ”€โ”€ Img16.jpeg

๐Ÿ”ง Configuration

The system is pre-configured for Innomatics OMR sheet format:

  • โ€”5 Subjects: Python, EDA, SQL, Power BI, Statistics
  • โ€”20 Questions per Subject (Total: 100 questions)
  • โ€”4 Answer Choices: A, B, C, D per question

To modify for different formats, update the parameters in extract_bubbles() function.

Main Interface

  • โ€”Upload answer key and OMR sheets
  • โ€”Real-time processing with progress indicators
  • โ€”Individual sheet results display

Results Dashboard

  • โ€”Subject-wise score breakdown
  • โ€”Overall statistics and analytics
  • โ€”CSV export functionality

๐Ÿ› Troubleshooting

Common Issues:

  1. 1.All subjects showing 0 scores:
  2. 2.Ensure OMR sheet image is clear and well-lit
  3. 3.Check that bubbles are properly filled (dark marks)
  4. 4.Verify answer key format matches expected structure
  1. 1.All subjects showing maximum scores:
  2. 2.Enable debug mode to see detection details
  3. 3.Check if image preprocessing is working correctly
  4. 4.Verify answer key mapping is correct
  1. 1."Too many values to unpack" error:
  2. 2.This has been fixed in the latest version
  3. 3.Ensure you're using the updated code files

Tips for Better Accuracy:

  • โ€”๐Ÿ“ท Use good lighting when photographing OMR sheets
  • โ€”๐Ÿ“ Keep camera parallel to the sheet surface
  • โ€”๐ŸŽฏ Ensure all bubbles are clearly visible
  • โ€”๐Ÿšซ Avoid shadows on the answer sheet

๐Ÿš€ Deployment

This application is containerized using Docker for reliable deployment across different environments. The Docker configuration handles all system dependencies including OpenCV requirements.

๐Ÿ‘ฅ Author

  • โ€”Yaazhini S - Initial work - https://github.com/Yaazhini25/omr-evaluation-system