Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMRChecker v2.0.0 #220

Open
wants to merge 217 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
a7bcc68
feat: add CropOnTimelineDots preprocessor; update pre-commit hooks; a…
Udayraj123 Jul 19, 2023
1fec368
fix: conflicts
Udayraj123 Jul 19, 2023
26d27b8
fix: wip confidence
Udayraj123 Feb 17, 2024
4ef22d2
fix: wip refactor logic for field_bubbles_detection
Udayraj123 Feb 17, 2024
21052f7
fix: remove whitespaces when reading csv
Udayraj123 Feb 18, 2024
416cdeb
fix: wip core code done for confidence
Udayraj123 Feb 20, 2024
c8855ac
fix: add algorithms folder; fix runtime issues; add debug catch block
Udayraj123 Feb 20, 2024
834ca20
fix: convert maps to list comprehensions
Udayraj123 Feb 20, 2024
6e6acf2
fix: runtime issues
Udayraj123 Feb 20, 2024
11f6086
fix: debugging help
Udayraj123 Feb 20, 2024
c841c86
fix: add calculations wip
Udayraj123 Feb 21, 2024
aefe516
fix: improved constants handling and more metrics added
Udayraj123 Feb 23, 2024
1cfc03c
fix: wip 3d plot
Udayraj123 Feb 23, 2024
58e59aa
fix: wip
Udayraj123 Feb 24, 2024
a57830f
fix: get more args to plotter
Udayraj123 Feb 25, 2024
d1f8042
feat: add json serialisers to classes; create js importable data for …
Udayraj123 Feb 25, 2024
c423c9c
fix: typo
Udayraj123 Feb 25, 2024
a24ac47
feat: support for image metrics export to js
Udayraj123 Feb 29, 2024
14a3434
fix: conflicts
Udayraj123 Feb 29, 2024
f11752e
fix: move local_threshold to field
Udayraj123 Mar 1, 2024
d57aaa5
fix: export bubbles_in_doubt data; move local_threshold to field; ut…
Udayraj123 Mar 2, 2024
ece923a
fix: threshold hack
Udayraj123 Mar 2, 2024
4335547
fix: update snapshot for ambiguous bubble
Udayraj123 Mar 2, 2024
2f7f8a6
fix: keep author details in algorithm folder
Udayraj123 Mar 16, 2024
a459da5
fix: remove whitespaces when reading csv
Udayraj123 Feb 18, 2024
d694307
fix: debugging help
Udayraj123 Feb 18, 2024
5065518
fix: wip add white padding for morphology
Udayraj123 Feb 18, 2024
d26d41f
fix: debugging help
Udayraj123 Feb 26, 2024
bb1865d
feat: support for answers_summary_string; add Verdict DotMap
Udayraj123 Feb 26, 2024
d2d21e4
fix: conflict issues
Udayraj123 Mar 23, 2024
df58b3d
feat: support colored images wip; refactor processing_width -> proces…
Udayraj123 Mar 23, 2024
559c5ba
feat: support colored images; refactor processing_width -> processing…
Udayraj123 Mar 23, 2024
583e46b
feat: defaults for evaluation; support answers_summary_format_string;…
Udayraj123 Mar 24, 2024
0a42d2d
feat: compress img
Udayraj123 Mar 24, 2024
ae3e991
feat: add pre-commit-images
Udayraj123 Mar 24, 2024
6bb668e
feat: add pre-commit-images
Udayraj123 Mar 24, 2024
9e2c480
feat: white padding support for morphology
Udayraj123 Feb 18, 2024
402f727
fix: conflict issues
Udayraj123 Mar 24, 2024
62a0764
fix: conflict issues
Udayraj123 Mar 24, 2024
79a90f3
fix: rename samples wip
Udayraj123 Mar 24, 2024
30695ed
fix: wip position support for draw_score, draw_answer_summary
Udayraj123 Mar 24, 2024
c7c6251
Updated output_configuration
palash018 Mar 26, 2024
ad91a4a
fix: wip rearrange samples; add docs for Crop on Timelines; add sampl…
Udayraj123 Mar 28, 2024
238582b
feat: add two-dots-one-line sample
Udayraj123 Mar 28, 2024
62af617
feat: add four-dots sample
Udayraj123 Mar 28, 2024
d336044
fix: wip rearrange samples; rename tests
Udayraj123 Mar 28, 2024
8b7bc75
fix: wip rearrange samples; remove AutoShiftFieldBlocks
Udayraj123 Mar 30, 2024
b7a5509
Removed comments
palash018 Mar 30, 2024
b61fa0a
fix: wip rearrange samples; add CropOnControlPoints and migrate inter…
Udayraj123 Mar 30, 2024
c562b34
fix: wip rearrange pre-processors
Udayraj123 Mar 30, 2024
e2be45e
fix: conflicts and sample
Udayraj123 Mar 30, 2024
961063d
fix: add contributor palash018
Udayraj123 Mar 30, 2024
e809a74
feat: wip support for edge_contours_map calculation
Udayraj123 Mar 31, 2024
7480f41
feat: wip support arc wise destination points
Udayraj123 Apr 1, 2024
32bf3a2
feat: wip add destination points support
Udayraj123 Apr 1, 2024
9caf74d
fix: testing and bugfixes
Udayraj123 Apr 1, 2024
41799e5
fix: remove edge_selectors code
Udayraj123 Apr 1, 2024
86f6412
fix: testing and bugfixes
Udayraj123 Apr 1, 2024
a2e831f
feat: wip refactor to support any scanAreas and custom markers
Udayraj123 Apr 2, 2024
362ee4d
feat: wip debug warping for CropPage and CropOnCustomMarker
Udayraj123 Apr 2, 2024
dce1e47
fix: working CropOnCustomMarkers
Udayraj123 Apr 2, 2024
fef40a3
fix: working CropOnDotLines
Udayraj123 Apr 2, 2024
8ea919d
fix: working FOUR_DOTS
Udayraj123 Apr 2, 2024
1eb8a0e
fix: support for inputImageShape and fix config low dimensions
Udayraj123 Apr 4, 2024
fdeff12
fix: template shallowcopy, deepcopy field_blocks; all tests passing
Udayraj123 Apr 4, 2024
7d78ec1
fix: working samples on TWO_LINES and sample 1 fixed again
Udayraj123 Apr 4, 2024
305fe95
fix: add warpMethod; update snapshots
Udayraj123 Apr 4, 2024
1418fe8
feature: visible verdict per question on output
palash018 Apr 5, 2024
86f73c7
feat: add resize image hook; update correct scanareas
Udayraj123 Apr 6, 2024
296cbbd
feat: update regex
Udayraj123 Apr 6, 2024
729af13
feat: update hook conditions
Udayraj123 Apr 6, 2024
8255dc1
feat: update evaluation schema
Udayraj123 Apr 6, 2024
8aae75d
fix: update samples
Udayraj123 Apr 6, 2024
dfe8361
fixed: applied suggested edits
palash018 Apr 6, 2024
f1b282a
fix: removed comments in evaluation_schema
palash018 Apr 6, 2024
d8fada9
removed debug logger
palash018 Apr 6, 2024
627b0ff
Merge branch 'feature/upgrade-crop-on-markers-colored-outputs' into f…
palash018 Apr 7, 2024
041d522
fix : conflict working version
palash018 Apr 7, 2024
b4a72a6
feat: update dependency versions; show counts in hook
Udayraj123 Apr 7, 2024
413b854
feat: support for REMAP warpMethod!
Udayraj123 Apr 8, 2024
f1508e9
fix: wip split contour; introduce shapely
Udayraj123 Apr 8, 2024
dd8de9b
fix: split contour wip;
Udayraj123 Apr 8, 2024
6805223
fix: move to CHAIN_APPROX_NONE
Udayraj123 Apr 8, 2024
b1cdbb7
fix: wip
Udayraj123 Apr 8, 2024
def4498
Merge branch 'feature/colored-evaluation-outputs' of github.com:palas…
Udayraj123 Apr 8, 2024
83f78cc
fix: conflicts
Udayraj123 Apr 8, 2024
cd229dd
fix: conflicts
Udayraj123 Apr 8, 2024
b4bb7a9
fix: conflicts
Udayraj123 Apr 8, 2024
9c7be0f
fix: remove convexHull from patch largest contour; homography working…
Udayraj123 Apr 9, 2024
63ee84e
fix: support answer_item
Udayraj123 Apr 9, 2024
ae779e8
fix: support answer_type
Udayraj123 Apr 9, 2024
76a90cd
feat: support for DOC_REFINE warpMethod!
Udayraj123 Apr 11, 2024
f87fe21
fix: update descriptions in template schema
Udayraj123 Apr 17, 2024
c8df2f6
fix: rename
Udayraj123 Apr 17, 2024
27f8eff
fix: add schema support for barcode and file sorting
Udayraj123 Apr 19, 2024
fc5cf0e
Update README.md (#181)
Udayraj123 Apr 13, 2024
f904f7e
fix: validation improvement
Udayraj123 Apr 19, 2024
c0d3779
fix: rename template schema; imporve debug output for PERSPECTIVE_TRA…
Udayraj123 Apr 19, 2024
95b3957
feat: custom log level from config
Udayraj123 Apr 19, 2024
eaef4e4
Merge branch 'master' of https://github.com/udayraj123/OMRChecker int…
Udayraj123 Apr 19, 2024
312fdd3
Grouping support and coloured verdict output
palash018 Apr 26, 2024
9d4079c
fix : weighted grouping
palash018 Apr 27, 2024
9fa31bb
fix: schema fix
Udayraj123 Apr 28, 2024
d612156
fix: schema fix; support customOptions in marker top level scan areas
Udayraj123 Apr 29, 2024
931f9f6
fix: restore fieldBlocks and add conditionalSets instead
Udayraj123 May 4, 2024
fde00d4
feat: add conditionalSets to evaluation schema
Udayraj123 May 4, 2024
7ff7fcf
Implemented suggested changes
palash018 May 5, 2024
1a5eb56
fix: conflicts
Udayraj123 May 5, 2024
58675b4
fix: testing issues
Udayraj123 May 5, 2024
18789d9
feat: support for matplotlib colors
Udayraj123 May 5, 2024
c471366
fix: missing evaluation.json for draw_detected_bubble_texts
Udayraj123 May 5, 2024
db15ed1
fix: refactor symbol and colors mapping; use $ref and $def for reusin…
Udayraj123 May 6, 2024
6804e67
fix: update UTs and snapshots
Udayraj123 May 6, 2024
3253aa8
fix: minor comment
Udayraj123 May 6, 2024
e8c7b6b
fix: update deps
Udayraj123 May 6, 2024
84f75eb
fix: update snapshots using pandas to_string()
Udayraj123 May 6, 2024
864c1ee
feat: support for image snapshots
Udayraj123 May 6, 2024
63183da
feat: use $ref and $def addressess in all schemas
Udayraj123 May 7, 2024
75fb091
fix: enhancements in CropOnMarkers
Udayraj123 May 7, 2024
7114ca3
fix: add config.outputs.show_image_level >= 1 checks
Udayraj123 May 7, 2024
a336d5c
fix: rename show_colored_outputs to colored_outputs_enabled
Udayraj123 May 7, 2024
1be58e7
refactor: create new classes TemplateDrawing and SaveImageOps
Udayraj123 May 7, 2024
3f80d27
fix: rename sample
Udayraj123 May 8, 2024
c722c94
fixed : test_diff
palash018 May 8, 2024
37a127b
Merge branch 'feature/refactor-dev' of github.com:palash018/OMRChecke…
Udayraj123 May 8, 2024
45e75d6
fix: update all image snapshots; exclude snapshots from resize/optimi…
Udayraj123 May 8, 2024
53188cd
fix: refactor
Udayraj123 May 8, 2024
ff96b82
wip debug
Udayraj123 May 19, 2024
a161a9e
refactor: detection logic
Udayraj123 May 19, 2024
245f37d
refactor: logging
Udayraj123 May 20, 2024
1210681
feat: run_sample_fixture
Udayraj123 May 20, 2024
770ef07
feat: working save_image_levels for color and grayscale
Udayraj123 May 20, 2024
7bb791d
fix: update snapshots after processing image shape changes
Udayraj123 May 20, 2024
dbd6ad4
Basic-autorotate
palash018 May 22, 2024
5737b85
fix: temp
Udayraj123 May 24, 2024
d6ccdf6
auto-rotation experiment
palash018 Jun 5, 2024
3bd303a
autorotation stablized
palash018 Jul 4, 2024
33ed3a4
feat: support for conditionalSets in evaluation config
Udayraj123 May 16, 2024
378f534
fix: uncomment opencv in requirements
Udayraj123 Jul 5, 2024
1fc14b9
fix: conflicts
Udayraj123 Jul 5, 2024
a3c06bc
fix: todos
Udayraj123 Jul 6, 2024
fae8e70
fix: conflicts; support for show_preprocessors_diff
Udayraj123 Jul 6, 2024
52de2f8
fix: add conditional set sample with auto rotate
Udayraj123 Jul 6, 2024
9c70c34
fix: add conditional set sample with auto rotate
Udayraj123 Jul 6, 2024
01da0c7
fix: convert output paths to posix paths in csvs
Udayraj123 Jul 6, 2024
fec6372
fix: support file_path in get_evaluation_config_for_set
Udayraj123 Jul 6, 2024
ff74f95
autorotation changes implemented
palash018 Jul 8, 2024
88df8f8
removed comments
palash018 Jul 8, 2024
1b07eff
implemented suggestions
palash018 Jul 8, 2024
941bb41
added readme
palash018 Jul 8, 2024
a6cf2bc
edited readme
palash018 Jul 8, 2024
df4f3b0
formatted
palash018 Jul 9, 2024
d6f4660
fix: wip template alignment
Udayraj123 May 5, 2024
a128175
feat: add Contrast preprocessor
Udayraj123 May 5, 2024
8077dd2
fix: rename areaTemplate to areaPreset
Udayraj123 May 5, 2024
347c18d
fix: wip
Udayraj123 May 5, 2024
09ea665
fix: rename area to zone
Udayraj123 Jul 12, 2024
683aa92
fix: new sample
Udayraj123 Jul 12, 2024
9ae7635
Merge branch 'feature/refactor-dev' of github.com:palash018/OMRChecke…
Udayraj123 Jul 12, 2024
8244939
fix: formatting
Udayraj123 Jul 12, 2024
8c1f3e2
fix: conflicts;
Udayraj123 Jul 12, 2024
56d0f59
feat: template alignment using SIFT
Udayraj123 Jul 12, 2024
95ca4a4
feat: add phase_correlation_shifts
Udayraj123 Jul 14, 2024
d81cbe7
fix: wip sift issues
Udayraj123 Jul 20, 2024
87f089d
fix: bugs with triangles
Udayraj123 Jul 20, 2024
b345515
fix: visualize triangle warps
Udayraj123 Jul 20, 2024
562fa18
fix: sift matching issue
Udayraj123 Jul 20, 2024
450d1a0
feat: implement k_nearest_interpolation; refactor;
Udayraj123 Jul 21, 2024
b0c5247
fix: wip streak marking
Udayraj123 Jul 27, 2024
a25dc01
feat: working streak marking support
Udayraj123 Jul 27, 2024
5557daa
fix: issues during testing
Udayraj123 Jul 28, 2024
916039f
fix: minor fixes
Udayraj123 Jul 29, 2024
04b7a16
feat: support for output_mode==moderation
Udayraj123 Jul 30, 2024
406843d
feat: wip local scripts
Udayraj123 Aug 1, 2024
9eba5ab
fix: moderation mode issues
Udayraj123 Aug 1, 2024
f97d562
fix: wip handle non-utf paths in ascii chars in filenames
Udayraj123 Aug 1, 2024
c02fb88
fixed utf character issue in windows
palash018 Aug 1, 2024
eb5a601
fix: wip
Udayraj123 Aug 1, 2024
92243ff
feat: add coverage module
Udayraj123 Aug 3, 2024
4f86a9d
fix: wip
Udayraj123 Aug 4, 2024
6e86cee
fix: wip
Udayraj123 Aug 4, 2024
8b752a0
fix: starter code for ocr
Udayraj123 Jul 6, 2024
3da8a5c
add wiki to docs
nikki-noceps Aug 5, 2024
2a2781b
feat: support imports in pre-commit hooks; wip ocr setup
Udayraj123 Aug 8, 2024
67185db
fix: wip
Udayraj123 Aug 10, 2024
f0f1676
fix: conflicts
Udayraj123 Aug 10, 2024
3987cc1
fix: fail fast
Udayraj123 Aug 10, 2024
2a94da4
feat: introduce DirectoryHandler in template; refactor outputs and me…
Udayraj123 Aug 12, 2024
7f9e3bc
fix: wip; refactor top down; template detector with more clarity
Udayraj123 Aug 12, 2024
9c0bcad
fix: wip
Udayraj123 Aug 18, 2024
6a9ceb1
fix: add get_pre_processor_names
Udayraj123 Aug 24, 2024
2a632d1
feat: refactor and connect everything for detection
Udayraj123 Aug 24, 2024
13c959c
feat: refactor bubbleFieldType and fieldDetectionType and connect eve…
Udayraj123 Aug 25, 2024
0462b0e
feat: first sample working after refactor
Udayraj123 Aug 25, 2024
5bc8c73
fix: restructure; lift up common state and methods in FieldTypeDetector
Udayraj123 Sep 1, 2024
6c8c3ec
refactor: refine; add ocr foundation
Udayraj123 Sep 7, 2024
5dcdf2f
refactor: template drawing testing
Udayraj123 Sep 7, 2024
b056ecf
fix: wip scan zone thinking
Udayraj123 Sep 7, 2024
c2616b4
refactor: rename field_type
Udayraj123 Sep 7, 2024
37f6537
refactor: template level file type runner wip
Udayraj123 Sep 9, 2024
fd331b1
fix: testing issues
Udayraj123 Sep 9, 2024
09a07e1
fix: wip types; streamline variable names
Udayraj123 Sep 14, 2024
76f15fe
feat: working ocr code
Udayraj123 Sep 28, 2024
52907f9
Merge branch 'feature/refactor-dev' into dev
Udayraj123 Sep 29, 2024
7d5a4d2
Merge branch 'dev' of https://github.com/udayraj123/OMRChecker into f…
Udayraj123 Sep 29, 2024
54fce46
fix: conflicts
Udayraj123 Sep 29, 2024
d1169ef
fix: unrecognized arguments: -i
Udayraj123 Sep 29, 2024
e57faeb
fix: conflicts
Udayraj123 Sep 29, 2024
931e5ee
fix: move to run_single_test.sh
Udayraj123 Sep 29, 2024
b421f00
fix: conflicts
Udayraj123 Sep 29, 2024
44283e7
fix: readme
Udayraj123 Sep 29, 2024
e6b4d9f
Merge branch 'master' of https://github.com/udayraj123/OMRChecker int…
Udayraj123 Sep 29, 2024
c1b286b
[Feature] Run pre-commit hooks as part of GitHub actions (#222)
palash018 Oct 1, 2024
93e7496
Merge branch 'dev' of https://github.com/udayraj123/OMRChecker into dev
Udayraj123 Oct 2, 2024
001a7be
Added option to export explanation csv for all files (#228)
tushar-badlani Oct 8, 2024
ef86906
fix: wip aligment debugging; update packages;
Udayraj123 Jan 25, 2025
ccbd72f
fix: minor fixes for debugging; add white padding for dots in CropOnM…
Udayraj123 Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove whitespaces when reading csv
Udayraj123 committed Feb 18, 2024
commit 21052f7f9eab9ab72454ef9f81da46bc77894c69
7 changes: 6 additions & 1 deletion src/evaluation.py
Original file line number Diff line number Diff line change
@@ -207,7 +207,10 @@ def __init__(self, curr_dir, evaluation_path, template, tuning_config):
csv_path,
header=None,
names=["question", "answer"],
converters={"question": str, "answer": self.parse_answer_column},
converters={
"question": lambda question: question.strip(),
"answer": self.parse_answer_column,
},
)

self.questions_in_order = answer_key["question"].to_list()
@@ -361,6 +364,8 @@ def get_exclude_files(self):

@staticmethod
def parse_answer_column(answer_column):
# Remove all whitespaces
answer_column = answer_column.replace(" ", "")
if answer_column[0] == "[":
parsed_answer = ast.literal_eval(answer_column)
elif "," in answer_column: