udayraj123 / omrchecker Goto Github PK
View Code? Open in Web Editor NEWEvaluate OMR sheets fast and accurately using a scanner ๐จ or your phone ๐คณ.
License: GNU General Public License v3.0
Evaluate OMR sheets fast and accurately using a scanner ๐จ or your phone ๐คณ.
License: GNU General Public License v3.0
I will add a section where it will show all the contributors profile image and will have a nice tagline too.
Please assign me this under Hacktoberfest.
Thanks & Regards
Currently there are some csv files and directories created in each of the input directories i.e. ErrorFiles, MultiMarkedFiles and BadRollNoFiles. Since they are not yet implemented for general use, they are created and left out empty. This leads to a lot of unnecessary files getting created and extra logs for the same.
Fixing it requires removing some unused/redundant file creations.
Dear team,
Huge thanks for this amazing project.
I'm wondering where I can find template format description in details? Sorry if I missed something. But I don't understand what Concatenations
, Singles
mean?
I have tried with every sample and all i get is score=0 for every run what is the issue, not a python guy so apologies in advance if i am being wrong about it.
As you setup OMRChecker on your own machine, mark your first contribution with the following
Installing missing libraries
section is confusing for macOS users as it doesn't run for them.Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Is your feature request related to a problem? Please describe.
Need support for a customisable marking scheme with negative marking, section-wise marking, bonus questions, etc. Answer keys may exist for a test booklet code. We can also support custom logic via eval scripts for handling any other cases.
Describe the solution you'd like
Basic evaluation scheme can be stored in template.json file
Criteria for Answer Schema:
- It should allow simplest way to grade +1 -0 case
- Also for +4 -1 case, it should be of minimal effort
- In all other cases we want users to modify 3-4 keys
Describe alternatives you've considered
Right now we can solve this by applying Excel formulae(link to sample sheet) over the output results file. It works fine for simple cases which still requires knowledge about writing formulae in excel.
Additional context
NA
Discuss any ideas or suggestions/feedbacks you have here.
Can we also add Optical character reader in this application for reading student names and other detail?
Describe the bug
For the case of a non-bubbled OMR sheet with single column qBlock(singleton "vals"), the global thresholding logic fails to interpret the OMR response correctly. Example json:
"qNos": [ [ [ "q1", "q2", "q3", "q4", "q5"] ] ],
To Reproduce
Steps to reproduce the behaviour:
python3 main.py -i samples/community/ibrahimkilic
Read Response: {'q1': 'yes', 'q2': 'yes', 'q3': 'yes', 'q4': 'yes', 'q5': 'yes'}
Expected behaviour
The output should be the following
Read Response: {'q1': '', 'q2': '', 'q3': '', 'q4': '', 'q5': ''}
or after issue #61 is fixed, it should output
Read Response: {'q1': 'no', 'q2': 'no', 'q3': 'no', 'q4': 'no', 'q5': 'no'}
Screenshots
NA
Desktop (please complete the following information):
Is your feature request related to a problem? Please describe.
We have received this request multiple times now, reading QR codes in particular sections of the OMR, then splitting the images based on the information in the QR, and using particular template from that information. This can be extended to barcodes as well.
Note: OCR should be tracked in a different issue from this (#99)
Describe the solution you'd like
This can be implemented as a plugin. More details to follow in discussion.
Describe alternatives you've considered
Currently no alternatives present to scan QRs. Manual work needed.
Additional context
Discord discussion
Current control that we use over debugging OMRChecker for new images is by setting show_image_level
to 1 through 6. It is still sometimes not very effective for large number of images. We need a non-intrusive visual guide that helps tune our config for each type of images.
Experienced in data visualizations/analytics?
Contact the developer for a dataset.
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Windows OS, with matlplotlib version >=3.6.0
OMRChecker\src\defaults\config.json
"show_image_level": 5,
python3 main.py -i samples/sample1
(1) Opening image: inputs\sample1\MobileCamera\sheet1.jpg Resolution: (1240, 930)
Found page corners: [[519, 541], [148, 537], [141, 220], [479, 218]]
Matching Marker: Q1: max_t 0.451 Q2: max_t 0.582 Q3: max_t 0.692Q4: max_t 0.547 Optimal Scale: 0.46
Thresholding: global_thr: 175.25 global_std_THR: 255
Traceback (most recent call last):
File "C:\OMRChecker\main.py", line 79, in <module>
entry_point(
File "C:\OMRChecker\src\core.py", line 50, in entry_point
return process_dir(root_dir, curr_dir, args)
File "C:\OMRChecker\src\core.py", line 120, in process_dir
process_dir(root_dir, d, args, template)
File "C:\OMRChecker\src\core.py", line 120, in process_dir
process_dir(root_dir, d, args, template)
File "C:\OMRChecker\src\core.py", line 109, in process_dir
process_files(omr_files, template, args_local, out)
File "C:\OMRChecker\src\core.py", line 313, in process_files
response_dict, final_marked, multi_marked, _ = MainOperations.read_response(
File "C:\OMRChecker\src\utils\imgutils.py", line 993, in read_response
raise e
File "C:\OMRChecker\src\utils\imgutils.py", line 951, in read_response
f.canvas.set_window_title(name)
AttributeError: 'FigureCanvasTkAgg' object has no attribute 'set_window_title'
This issue is potentially caused by latest release of matplotlib. (Refer: https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.6.0.html#:~:text=get_figure_manager%3B%20use-,frame.canvas.manager,-instead.)
Multiplication is being performed between DotMap and float data type, for image level 2,3.
Steps to reproduce the behavior:
window size gets increased by 1.6 times for image level 2,3.
File "C:\OMRChecker\main.py", line 79, in <module>
entry_point(
File "C:\OMRChecker\src\core.py", line 50, in entry_point
return process_dir(root_dir, curr_dir, args)
File "C:\OMRChecker\src\core.py", line 120, in process_dir
process_dir(root_dir, d, args, template)
File "C:\OMRChecker\src\core.py", line 109, in process_dir
process_files(omr_files, template, args_local, out)
File "C:\OMRChecker\src\core.py", line 283, in process_files
in_omr = pre_processor.apply_filter(in_omr, args)
File "C:\OMRChecker\src\processors\CropOnMarkers.py", line 218, in apply_filter
h_stack, int(config.display_width * 1.6)),
TypeError: unsupported operand type(s) for *: 'DotMap' and 'float
Windows OS
Python 3.10.7
OpenCV 4.6.0
Right now, we need to follow a tedious method of creating template.json files. There are two ways to simplify this for a start.
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Describe the bug
There are some hardcodings in the codebase(some of which are tagged by a todo comment). We need to remove them and pick them up from configuration/command line. The first step would be to list out the hardcoded values in a comment below.
Then we'll break it down into new issues to fix them in parts.
To Reproduce
One example is from src/processors/CropPage.py
: the parameters passed to cv2.Canny
can be taken from something like self.canny_params
Acceptance Criteria
A list of all hardcodings should be populated.
Screenshots
NA
Desktop (please complete the following information):
Additional context
NA
Describe the bug
While running the code with below configurations, the preview of Template Alignment Adjustment
shows unexpected output. The text is not legible, which is due to incorrect spacing of the text displayed.
To Reproduce
Steps to reproduce the behavior:
"show_image_level": 3
in src\defaults\config.json
python3 main.py -i samples/community/Sandeep-1507
Expected behavior
Either change the font size or update the spacing of the text displayed.
Try changing (int(s[0] + d[0] - text_in_px[0][0]), int(s[1] - text_in_px[0][1]))
or (rect[2] + 2, rect[0] + (box_h * 2) // 3)
in src\utils\imgutils.py
Desktop (please complete the following information):
This is an enhancement version of #42
Steps
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Best part of working with opencv is visually seeing each step. OMRChecker provides a way to see the step-wise images. But they have a scope to improve.
Steps
Resources:
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Describe the bug
While running the code of the sample example, the command python3 main.py --setLayout
should give the cropped template layout automatically. However, the generated template layout is incorrectly cropped.
To Reproduce
Steps to reproduce the behavior:
inputs/template.json
and adding the given text to it. Run the command python3 main.py --setLayout
on the terminal.Expected behavior
The page should have got cropped automatically and show a basic overlay of the template.
Screenshots
Desktop (please complete the following information):
We want to be able to identify and correct rotation of input images
Some ideas
Acceptance criterion:
Example real user validation: https://discord.com/channels/590134763784896514/590134763784896520/908620446201696316
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
results.csv is showing only index like rollno,q1.q20 etc...i want ans along with score,key can you explain more in detail thanks.
Is your feature request related to a problem? Please describe.
It appears that existing commercial products use PDF as the format for processing OMRs. Supporting this in OMRChecker will help with making it easy for adoption.
Describe the solution you'd like
Use a popular pdf reading library to convert the pdf into jpg image and then forward that image to the existing solution. This can be implemented as a plugin as well (discussion needed).
We can also support multi-page pdfs this way: tracked in a separate task: #145
Describe alternatives you've considered
Currently we would need to use third party bulk converters to achieve this.
Additional context
NA
As you setup OMRChecker and run samples according to the Readme, you would maybe want to try it on new public images or some of your own. This issue is created to accept new submissions. This is your chance to feature your template and image in the samples section!
--setLayout
flag). Discuss on discord for any issues faced.samples/community
folder and raise a PR.Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
P.S. We are looking for someone to make template for popular examinations like JEE or UPSC in case of India.
There is a project under progress to migrate OMRChecker into the browser(currently in a private repository). It shall eradicate the need of having to install python or opencv on user's device.
Contact the developer to get access and updates. Tech Stack: React, Redux, Saga
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
I created template.json and I am using it to detect the bubbles. But now I want to generate an exe file and use the code with a folder containing the multiple sheets. so how could I do this with existing code
Some minor issues I observed while running a sanity check of OMRChecker on my machine.
_MULTI_/stack
for sample1.Matching Marker: Q1: max_t 0.451 Q2: max_t 0.582 Q3: max_t 0.692Q4: max_t 0.547 Optimal Scale: 0.46
. Also the name Q1, Q2, etc. can be changed to something more readable.<outputs/sample1/MobileCamera/CheckedOMRs/stack/sheet1.jpg_1_stack.jpg>
.Right now, OMRChecker does not handle invalid template.json files. It simply tries to process the file and throws an errors.
We want to extend that an do a json schema validation for the file.
Steps:
Resources:
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
The core logic of OMRChecker revolves around finding the correct separation between Marked and Unmarked bubbles. We want to let the user know if it has been determined confidently.
In the above image there are two possible thresholds based on the jumps in the histogram. In such cases the confidence metric will be useful to separate bad quality images.
More references in Rich Visuals section.
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
The --noCropping
flag is particularly annoying to new users who have scanned images(as opposed to mobile camera).
Steps
false
Currently we have this as the CLI documentation, which is often confused with by new users. We can simplify it and improve the CLI experience with above simple change.
It has been repeatedly asked as a query on discord. So this is a high impact, low effort task up for grabs :)
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Describe the bug
when show_image_level=3
, we get 3 different stack of images (that are: Warped Sheet,Final Alignment Adjustment, Final marked bubbles). However when show_image_level=4
we get only 2 stack of images (that are: Final Alignment Adjustment, Final marked bubbles)
To Reproduce
Steps to reproduce the behavior:
\src\defaults\config.json
show_image_level=3
python3 main.py -i samples/sample1
. 3 image stacks will be displayed.show_image_level=4
python3 main.py -i samples/sample1
. 2 image stacks will be displayed.Expected behavior
For show_image_level=4
four image stacks should be shown.
Desktop (please complete the following information):
Additional context
This issue is continuation of #44 and will expect to work on redefining images displayed for different show_image_levels
.
Describe the bug
Most of the read responses on the terminal in sample 6 are incorrectly interpreting the roll numbers
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should be able to read the encircled values for the roll number accurately.
Screenshots
image: samples\sample6\jpg\sample_roll_11.jpg
Desktop (please complete the following information):
Describe the bug
When running the program for multiple sample types, the templates seem to be merged with that of the previous iteration. This causes rectangles and labels to be generated where it shouldn't be.
To Reproduce
Steps to reproduce the behavior:
src/defaults/config.json
set the 'show_image_level' to either 4 or 5.python main.py -i samples/
Desktop (please complete the following information):
Additional context
The issue arises due to use of deepmerge library. It can be fixed by modifying the function to make the merge non destructive to the base template.
Comment here if anyone wants to discuss anything about the software
Discord link for quicker response: https://discord.gg/qFv2Vqf
This extends #43
Originally posted by @Udayraj123 in #60 (comment)
Hi,
In my requirement, I want to set dimension and orig as per respective dimension of OMR sheet dynamically.
I tried setting up the the "dims" array of template object inside process_files for loop. Although I can see that dimension have been added to the template object as per file, the output doesn't reflect that.
If I manually put the dimension values the get reflected to the output correctly.
Can you help me to set dimensions based on my files dynamically to the template for each OMR sheet dynamically.
Thanks,
Ram
Hello:
Got this error when launching the main.py script... any ideas?
I'm running an AWS Bitnami LAMP Server which I just updated to python 3
Here is what happened:
~/OMRChecker$ python3 main.py
Traceback (most recent call last):
File "main.py", line 13, in
import cv2
File "/home/bitnami/.local/lib/python3.5/site-packages/cv2/init.py", line 3, in
from .cv2 import *
ImportError: libXrender.so.1: cannot open shared object file: No such file or directory
Best regards
Steps
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Describe the bug
referring to the comment on issue #44
Following undesirable action is being performed:
To Reproduce
\src\defaults\config.json
show_image_level=1
save_image_level=5
python3 main.py -i samples/sample1
\outputs\MobileCamera\CheckedOMRs\stack
to see only 3 stacks (instead of expected 5 stacks).Desktop (please complete the following information):
Hi,
This looks really great. Any plans to add a barcode reading option ?
Thanks
David de Leeuw
Israel
So,This is about my idea of creating a Document photo scanner.
This is from my real life instance where we had a pile load of documents which contained passport size photos of candidates on the top right of the page and we wanted to extract photos from it.
What we did was first he scanned the document and then imported it in a photo editor then cropped photos from each document and obviously it took a lot of time.
So I wanted to create/write a program by which I can easily extract photos from a scanned document multiple at a time which would reduce the effort in future and I think will help many like my friend.
And I guess interacting with OMR Checker can boost it 10x.
Some ideas for logs:
Note: this issue is marked with the hacktoberfest
label. Follow #hacktoberfest-discussions
on Discord for further details .
Did the setup on Ubuntu 16.04 and ran the code with sample files available the repo. Please find the code I used.
sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot
python3 -m pip install --user --upgrade pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
python3 -m pip install --user --upgrade pip
python3 -m pip install --user opencv-python
python3 -m pip install --user opencv-contrib-python
git clone https://github.com/Udayraj123/OMRChecker
cd OMRChecker/
python3 -m pip install --user -r requirements.txt
sudo cp -r inputs/OMR_Files_Sample/ inputs/OMR_Files
python3 main.py
If I run the code, I am getting, "Segmentation fault (core dumped)" error.
Describe the bug
I installed pre-commit by commands given in CONTRIBUTING.md after installing when i tried to run pre-commit it gave process error.
To Reproduce
Steps to reproduce the behavior:
pip install -r requirements.dev.txt && pre-commit install
git .add
pre-commit run --files
Expected behavior
should be able to refactor the code
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.