English | ็ฎไฝไธญๆ
AI Exam Grader is an intelligent grading assistant powered by Large Language Models (LLMs), designed for teachers and educators. It leverages the visual understanding capabilities of OpenAI (GPT-4o) or Google Gemini (Pro) to automatically grade handwritten exam papers and generate detailed reports.
Important
License Notice
This project is licensed under the NCEL-Strict License (Version 2.0). This is a Source Available but Strictly Limited non-commercial license.
๐ซ Commercial Use Strictly Prohibited: Includes sale, subscription, sponsorship, Internal Use, SaaS services, and AI model training.
๐ซ Distribution of Modified Versions Prohibited: You may NOT directly distribute modified source code or binaries (only Patch/Diff files are allowed).
๐ซ Fork Restriction: Public Forks are allowed ONLY for submitting PRs and must be deleted within 14 days after the PR is closed.
โ
Non-Commercial Only: Personal study, academic research, and non-commercial use must retain the full copyright notice and license file.
๐ผ Commercial License: For commercial use or custom development, please contact the author for licensing: nicofiela@outlook.com
-
๐ค Intelligent Grading Engine
- Multi-Model Support:
- Supports OpenAI (GPT-4o, etc.) and compatible APIs (Custom Base URL)
- Supports Google Gemini (gemini-3.0-pro, etc.)
- Smart OCR Recognition: Automatically extracts handwritten student names, IDs, and class information
- Flexible Grading Rubrics: Supports custom rubrics for precise subjective question grading
- Batch Concurrent Processing: Multi-threaded architecture for high-speed grading of large batches
[!NOTE] This application relies heavily on the model's visual understanding and reasoning capabilities. For best results, we recommend using more powerful models (e.g., GPT-4o, Gemini 3.0 Pro).
- Multi-Model Support:
-
๐ Smart Data Management
- Chain auto-validation (Answer Key โ Layout โ CSV)
- Automatic CSV rebuild when missing
- Incremental processing with resume capability
- Seamless CN/EN directory support
-
๐ Manual Review System
- Three-step review process (Info โ Objective โ Subjective)
- Dual-mode viewing (Text/Image)
- Smart navigation and search
- Complete review history tracking
-
๐ Comprehensive Reports + ๐ Internationalization
- Markdown reports + Enhanced CSV + Structured JSON
- Full Chinese-English support
- Quick-switch configuration profiles
- macOS (Recommended) / Windows / Linux
- Python 3.10+
pip install -r requirements.txtMethod 1: Using Configuration Profiles (Recommended)
Copy the example configuration file:
cp config_example.json config.jsonEdit config.json with your actual API keys and file paths.
Method 2: Manual Configuration
You can also configure settings directly in the application interface.
See README_CONFIG.md for detailed configuration guide.
python AutoGrader.pymacOS:
python build.pyThe .app bundle will be generated in the dist/ folder.
Windows:
python build_windows.pyThe executable (.exe) will be generated in the dist/ folder.
API Settings
โโ API Key: Enter your API key
โโ Service Provider: OpenAI / Gemini
โโ Model Name: gpt-4o / gemini-1.5-pro
โโ Base URL: (Optional)
Resource Files
โโ ๐ Rubric: Upload exam questions and answers document
โโ ๐ Answer Sheets Folder: Select folder containing scanned images
โโ ๐ฅ Student List: (Optional) Upload Excel/CSV student roster
Click "Start Grading" button
Automated Flow:
Check Answer Key โ Confirm Answers โ Detect Layout โ Confirm Layout โ Generate CSV โ Start Grading
User Interaction Points:
- ๐ Answer Key Confirmation: Confirm AI-extracted answers on first run
- ๐ Layout Description Confirmation: Confirm answer sheet structure on first run
After grading completes, click "Review" button
Three-Step Review Process:
Step 1: Verify Student Information
Step 2: Verify Objective Questions
Step 3: Verify Subjective Question Scores
Quick Actions:
- ๐/๐ผ Toggle Text/Image Mode
- โฌ ๏ธ/โก๏ธ Previous/Next Student
- ๐ Search Student (Name/ID)
- โ Confirm and Continue
Output File Locations
โโ ๐ Grade_Summary.csv (in grading_data/ folder)
โโ ๐ Grading_Report.md (in reports/ folder, one per student)
โโ ๐ Student_Data.json (in reports/ folder, one per student)
When you start grading, the application automatically creates:
Answer Sheets Folder/
โโ grading_data/ # Configuration and summary data
โ โโ answer_key.json # Standard answers
โ โโ layout_config.json # Answer sheet layout
โ โโ Grade_Summary.csv # Grade summary table
โ
โโ reports/ # Grading results
โ โโ 01-01.json # Student grade data
โ โโ 01-01.md # Student grading report
โ โโ ...
โ
โโ original_files/ # Original answer sheet backups
โ โโ *.jpg/png
โ
โโ success/ # Successfully graded sheets
โ โโ *.jpg/png
โ
โโ failed/ # Failed grading attempts
โโ *.jpg/png
Start Grading โ Answer Key โ Layout Config โ CSV File โ File Integrity โ Begin Grading
โ โ โ โ โ โ
Basic Check Smart Extract Auto-Detect Smart Recovery Incremental Batch Process
Key Features:
- โ Chain Validation: Answer Key โ Layout โ CSV โ Grading
- โ Smart Recovery: Automatically rebuilds CSV from JSON if missing
- โ Incremental Processing: Only grades incomplete files
- โ Auto Migration: Legacy files automatically moved to new structure
- โ User Confirmation: Answer key and layout require user approval
- โ Data Consistency: Rebuilds CSV after grading to ensure accuracy
Grade Summary (CSV)
Contains complete grades and information for all students
- Basic Info: Room, Seat, Name, ID, Class
- Scores: Total, Objective, Subjective, Individual Questions
- OCR Info: Recognized name, ID, etc.
- Review Status: Unreviewed/Reviewed/Second Review
Grading Report (Markdown)
Detailed grading report for each student
- Student information verification
- Objective question answer comparison table
- Subjective question analysis for each question
- Total score statistics
Grade Data (JSON)
Structured data containing all grading details
- Used for data recovery
- Supports secondary development
- Review history records
Before Grading
- โ Prepare high-resolution scanned answer sheets
- โ Prepare complete rubric document
- โ Check API quota is sufficient
During Grading
- โ Maintain stable network connection
- โ Do not close the application window
- โ Monitor progress and logs
During Review
- โ Verify each student's information individually
- โ Focus on checking subjective question scores
- โ Use search function to quickly locate students
After Completion
- โ Export CSV to a safe location
- โ Backup the grading data folder
- โ Verify CSV row count matches student count
AIExamGrader/
โโโ AutoGrader.py # Main application
โโโ config_manager.py # Configuration management
โโโ student_manager.py # Student database management
โโโ grader_engine.py # AI grading engine
โโโ review_window.py # Manual review interface
โโโ standard_answer_dialog.py # Standard answer configuration
โโโ splash_screen.py # Application splash screen
โโโ translations.py # Internationalization
โโโ utils.py # Helper functions
โโโ tooltip.py # Tooltip widget
โโโ theme.py # UI Theme definitions
โโโ generate_icon.py # Icon generation script
โโโ config_example.json # Example configuration
โโโ README_CONFIG.md # Configuration guide
โโโ requirements.txt # Dependencies
โโโ rthook_google.py # PyInstaller runtime hook
โโโ build.py # macOS build script
โโโ build_windows.py # Windows build script
โโโ test_core.py # Core functionality tests
โโโ test_review_logs.py # Review log tests
config.json: Main configuration file (created fromconfig_example.json)config_example.json: Example configuration with sample profiles- See README_CONFIG.md for detailed configuration documentation
Contributions are welcome! Please read CONTRIBUTING.md for details.
This project is licensed under the NCEL-Strict License (Version 2.0) - see the LICENSE file for details.
For commercial use, please contact the project author for licensing options: nicofiela@outlook.com
Made with โค๏ธ for educators worldwide