Read OMRs fast and accurately using a scanner π¨ or your phone π€³.
TLDR; Jump to Getting Started.
A full-fledged OMR checking software that can read and evaluate OMR sheets scanned at any angle and having any color.
Specs | |
---|---|
π― Accurate | Currently nearly 100% accurate on good quality document scans; and about 90% accurate on mobile images. |
πͺπΏ Robust | Supports low resolution, xeroxed sheets. See Robustness for more. |
β© Fast | Current processing speed without any optimization is 200 OMRs/minute. |
β Customizable | Easily apply to custom OMR layouts, surveys, etc. |
π Visually Rich | Get insights to configure and debug easily. |
π Lightweight | Very minimal core code size. |
π« Large Scale | Tested on a large scale at Technothlon. |
π©πΏβπ» Dev Friendly | Pylinted and Black formatted code. Also has a developer community on discord. |
Note: For solving interesting challenges, developers can check out TODOs.
See the complete guide and details at Project Wiki.
Once you configure the OMR layout, just throw images of the sheets at the software; and you'll get back the marked responses in an excel sheet!
Images can be taken from various angles as shown below-
See step-by-step processing of any OMR sheet:
*Note: This image is generated by the code itself!*
Get a CSV sheet containing the detected responses and evaluated scores:
There are many more visuals in the wiki. Check them out here!
Operating system: OSX or Linux is recommended although Windows is also supported.
To check if python3 and pip is already installed:
python3 --version
python3 -m pip --version
Install Python3
To install python3 follow instructions here
To install pip - follow instructions here
Install OpenCV
Any installation method is fine.
Recommended:
python3 -m pip install --user --upgrade pip
python3 -m pip install --user opencv-python
python3 -m pip install --user opencv-contrib-python
More details on pip install openCV here.
Extra steps(for Linux users only)
Installing missing libraries(if any):
On a fresh computer, some of the libraries may get missing in event after a successful pip install. Install them using following commands(ref):
sudo apt-get install -y build-essential cmake unzip pkg-config
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install -y libatlas-base-dev gfortran
Clone the repo
git clone https://github.com/Udayraj123/OMRChecker
cd OMRChecker/
Install pip requirements
python3 -m pip install --user -r requirements.txt
Note: If you face a distutils error in pip, use --ignore-installed
flag in above command.
- First copy and examine the sample data to know how to structure your inputs:
cp -r ./samples/sample1 inputs/ # Note: you may remove previous inputs (if any) with `mv inputs/* ~/.trash` # Change the number N in sampleN to see more examples
- Run OMRChecker:
python3 main.py
Alternatively you can also use python3 main.py -i ./samples/sample1
.
Each example in the samples folder demonstrates different ways in which OMRChecker can be used.
1. [Windows] ERROR: Could not open requirements file
Command: python3 -m pip install --user -r requirements.txt
Link to Solution: #54
2. [Linux] ERROR: No module named pip
Command: python3 -m pip install --user --upgrade pip
Link to Solution: #70
- First, create your own template.json.
- Configure the tuning parameters.
- Run OMRChecker with appropriate arguments (See full usage).
python3 main.py [--setLayout] [--autoAlign] [--inputDir dir1] [--outputDir dir1]
Explanation for the arguments:
--setLayout
: Set up OMR template layout - modify your json file and run again until the template is set.
--autoAlign
: (experimental) Enables automatic template alignment - use if the scans show slight misalignments.
--inputDir
: Specify an input directory.
--outputDir
: Specify an output directory.
Note: The --noCropping
flag has been replaced with including/excluding a 'CropPage' plugin in "preProcessors" of the template.json(see samples).
Why is this software free?
This project was born out of a student-led organization called as Technothlon. It is a logic-based international school championship organized by students of IIT Guwahati. Being a non-profit organization, and after seeing it work fabulously at such a large scale we decided to share this tool with the world. The OMR checking processes still involves so much tediousness which we aim to reduce dramatically.
We believe in the power of open source! Currently, OMRChecker is in an intermediate stage where only developers can use it. We hope to see it become more user-friendly as well as robust from exposure to different inputs from you all!
Can I use this code in my work?
OMRChecker can be forked and modified. You are encouraged to play with it and we would love to see your own projects in action!
The only requirement is disclose usage of this software in your code.
It is published under the GPLv3 license.
What are the ways to contribute?
-
Help OMRChecker reach more people by giving a star! The Goal is to reach top position for the OMR Topic
-
Join the developer community on Discord to fix issues with OMRChecker.
-
If this project saved you large costs on OMR Software licenses, or saved efforts to make one. Consider donating an amount of your choice(donate section).
A Huge thanks to: Adrian Rosebrock for his exemplary blog: https://pyimagesearch.com
Harrison Kinsley aka sentdex for his video tutorials and many other resources.
Satya Mallic for his resourceful blog: https://www.learnopencv.com
And to other amazing people from all over the globe who've made significant improvements in this project.
Thank you!
Here's a sneak peak of the Android OMR Helper App (WIP):
For more details see LICENSE.
Find OMRChecker on Product Hunt | Reddit | Discord | Linkedin | opensourcehub.io | goodfirstissue.dev | codepeak.tech | fossoverflow.dev