Skip to content

Matnit02/GradeWave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Builder & Auto Grader (Paper Exams)

Web application for creating paper-based tests (generated from LaTeX templates) and automatically grading scanned answer sheets using image processing and ML.

The project was built to keep the practical advantages of paper exams while reducing the time cost and human error of manual grading.


Key features

Template creation

  • Create and manage LaTeX templates used to generate exam PDFs.
  • Templates must include required placeholders:
    • {HEADER} - header with encoded unique test identifier + student index
    • {ANSWER_FORM} - answer sheet area
    • {QUESTIONS} - questions content

Test generation

  • Manage the question bank:
    • create / edit / delete questions
    • organize them with labels / categories for easier filtering and reuse
  • Configure test parameters, including:
    • template used
    • number of questions
    • question selection rules (e.g. by label or category)
    • layout settings (e.g. visible date or question grouping)
  • Generate sets of exam PDFs. Download a .zip containing:
    • generated_tests/ (PDFs of generated exams)
    • answer sheet PDF(s)
    • optional blank "backup" answer sheet

Custom grading

  • Configure marking strategy per test:
    • All-or-nothing - full points only if all correct answers are selected and no incorrect answers
    • Partially correct - points based on correct answers; incorrect answers reduce the score
  • Define your own grade thresholds per test

Automatic grading from scans

  • Upload completed tests as:
    • individual images
    • archives where each folder corresponds to one filled test
    • PDFs with pages of filled tests
  • Automatic grading pipeline includes:
    • orientation correction
    • reading the encoded test identifier
    • recognizing handwritten student index number using a trained neural network
    • extracting marked answers and checking correctness (2 available methods):
      • Canny edge-based detection
      • pixel-intensity analysis
  • UI supports results visualization and manual grading adjustments
  • Exports an annotated PDF of each graded answer sheet (detected answers & per-question score and flags)
  • Optional scan denoising using a trained Restormer model

UI Preview

Test parameters configuration

Tests overview & Questions management

Custom grading configuration & Example results plot

Test Grading Modals


Test sheets preview (clean & marked)

Example clean test sheet

Example marked test sheet


Tech stack

Backend

  • Python - single-language architecture
  • Django - auth, ORM, admin, signals, class-based view mixins

Frontend

  • Bootstrap 5 - responsive layout and UI components
  • JavaScript - interactive UI (dynamic forms, validation, DataTables views, Chart.js results, upload UX)

Document generation

  • LaTeX - template-driven PDF exam generation

Computer vision

  • OpenCV - scan preprocessing (rotation/orientation correction, region detection, extraction)

Machine learning

  • InceptionResNetV2 - handwritten digit recognition (student index)
  • Restormer - optional scan denoising

Getting started (dev)

Prerequisites

  • Python 3.x + pip
  • A LaTeX distribution (for PDF generation; pdflatex/xelatex depending on your implementation)
  • System packages needed by OpenCV (varies by OS)

Run locally

# Create venv
python -m venv .venv
# (Windows: .venv\Scripts\activate)
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Migrate DB
python manage.py migrate

#  Create admin superuser (optional)
python manage.py createsuperuser

# Run server
python manage.py runserver

Acknowledgements

About

Web application for creating paper-based tests (generated from LaTeX templates) and automatically grading scanned answer sheets using image processing and ML.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors