YaazhiniS/OMR-Evaluation
๐ฏ 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
- Clone the repository:
git clone https://github.com/Yaazhini25/omr-evaluation-system.git
cd omr-evaluation-system- Install dependencies:
pip install -r requirements.txt- Run the application:
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:
- All subjects showing 0 scores:
- Ensure OMR sheet image is clear and well-lit
- Check that bubbles are properly filled (dark marks)
- Verify answer key format matches expected structure
- All subjects showing maximum scores:
- Enable debug mode to see detection details
- Check if image preprocessing is working correctly
- Verify answer key mapping is correct
- "Too many values to unpack" error:
- This has been fixed in the latest version
- 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
