轻量、离线、保护学生隐私的 Windows 与 Android 教师批改统计工具。 A lightweight, offline worksheet-mark analysis tool for teachers on Windows and Android.
“练习批改统计”用于统计同一批练习中每道题和每位学生的正确率、错误率。教师可导入最多 150 张照片、扫描图片或 PDF;软件在本地完成页面校正、题号定位、逐题批改符号判断、人工复核和 Excel 导出,不上传学生数据。
本项目同时包含:
- Windows 10/11 桌面版:WPF + .NET Framework 4.8;
- Android 8.0 及以上手机版:原生 Java + Android 系统 API;
- Windows 安装版、绿色版和 Android APK 均在 Releases 下载。
| 版本 | 文件 | 适用情况 |
|---|---|---|
| Windows 安装版 | ExerciseMarkAnalyzer-Windows-Setup.exe | 推荐普通教师电脑使用,可一键安装和卸载 |
| Windows 绿色版 | ExerciseMarkAnalyzer-Windows-Portable.exe | 无需安装,直接运行 |
| Android APK | ExerciseMarkAnalyzer-Android.apk | Android 8.0 及以上手机 |
- 单批最多 150 个学生页,支持 JPG、JPEG、PNG 和 PDF;Windows 版另支持 BMP、TIFF。
- 批量选择、拖放、文件夹导入;Android 可直接调用系统相机拍照或从相册多选。
- 不强制准备空白标准卷:当前批次首张练习作为参考页,同时仍计入学生统计。
- 识别“一、”“1、”“(1)”等题号,自动生成按阅读顺序排列的题区;蓝框可增删、拖动和缩放。
- 自动处理 EXIF 方向、横竖方向、轻微歪斜、缩放、纸张四角和透视变化。
- 填空题一题有多个空格时按整个题区判断;任一空出现错误标记,该题判错。
- 画图题、解决问题和大题按完整题区判断;范围内出现明确错误标记即判错。
- 每题统计、学生统计、错误率 TOP10、低置信异常、逐题切片预览和人工改判。
- 导出四个工作表的
.xlsx:每题统计、学生统计、错误率排序、识别异常。 - 一键清空当前成绩、相机原图、预览图和后台缓存;不会删除相册原图或已经导出的 Excel。
默认判为正确:
- 没有检测到教师批改符号;
- 检测到形态完整的勾或对号。
默认判为错误并优先复核:
- 叉、半叉、半勾、斜杠;
- 圈、双圈、问号;
- 题区内其他明显批改痕迹。
Android 版会比较同批页面,尽量保留新增的红、蓝和深色细笔迹,同时抑制固定印刷内容。Windows 版重点识别红色批改痕迹。钢笔、圆珠笔的细线、拍照压缩、阴影和印刷彩色图案仍可能造成误判,因此软件保留低置信异常和快速人工改判,不宣称真实课堂场景可以达到 100% 自动准确。
- 建议统一竖版拍摄,整张纸和四角尽量完整入镜;轻微歪斜可以自动校正。
- A3 试卷可竖版拍摄;若文字过小,建议分区拍摄后分批统计。
- 同一批应是同一份练习,或至少题号与题目顺序可以一一对应。不同练习不能只因题号相同就合并统计。
- 没有空白卷时,印刷红色图案与相同位置、相近形状的教师红笔仅凭像素可能无法可靠区分,应重点检查异常记录。
两端均不依赖云端,Android APK 不申请网络权限。Windows 数据保存在 %LOCALAPPDATA%\ExerciseMarkAnalyzer;Android 数据保存在应用私有目录。仓库不包含任何学生照片、用户成绩、APK 签名私钥或本机构建缓存。
Windows 端使用用户提供的两张练习样张生成固定随机种子的拍照扰动集:
| 测试 | 完成情况 | 自动判定 | 用时 | 峰值内存 |
|---|---|---|---|---|
| 100 张 × 9 题 | 100 / 100 | 706 / 900(78.44%) | 12.29 秒 | 175.5 MB |
| 150 张 × 10 题 | 150 / 150 | 1,384 / 1,500(92.27%) | 17.24 秒 | 179.5 MB |
Android 核心算法的主机端合成回归完成 150 张 × 10 题、1,500 项确定性判定;该测试用于容量和算法回归,不等同于真实手机速度或真实课堂准确率。详细方法见 150 张压力测试报告。
Windows(Windows 10/11,系统需有 .NET Framework 4.8 编译器):
powershell -ExecutionPolicy Bypass -File .\build.ps1 -RunTests输出位于 dist\:绿色版 练习批改统计.exe 和安装版 练习批改统计-安装版.exe。
Android 需要 JDK 17、Android SDK Platform 35 和 Build Tools 35.0.0:
powershell -ExecutionPolicy Bypass -File .\android\build-apk.ps1 `
-ToolRoot D:\AndroidBuildTools `
-SdkRoot D:\AndroidBuildTools\android-sdk `
-JavaHome D:\AndroidBuildTools\jdk\jdk-17未配置发布签名时,脚本只在本机构建目录生成开发签名。正式签名请在本机设置以下环境变量,绝不要把密钥提交到 Git:
$env:EXERCISEMARK_KEYSTORE = 'C:\private\release.jks'
$env:EXERCISEMARK_KEY_ALIAS = 'your-key-alias'
$env:EXERCISEMARK_STORE_PASSWORD = 'your-store-password'
$env:EXERCISEMARK_KEY_PASSWORD = 'your-key-password'更多 Android 说明见 android/README.md。
src/ Windows 应用源码
installer/ Windows 一键安装程序源码
tests/ Windows 离线回归与压力测试
android/ Android 原生应用、构建脚本和主机测试
docs/ 架构、使用说明和压力测试报告
本项目采用 GNU General Public License v3.0。公开发布修改版或衍生版时,也必须按 GPL-3.0 提供对应源代码。第三方试卷、教材页面和学生照片不属于本项目许可证范围,请仅在获得授权的情况下使用。
Exercise Mark Analyzer calculates per-question and per-student accuracy for a batch of the same worksheet. Teachers can import up to 150 photos, scans, or PDF pages. Page correction, question-region detection, mark classification, review, and Excel export all run locally; student data is never uploaded.
This repository contains:
- A Windows 10/11 desktop app built with WPF and .NET Framework 4.8;
- A native Android app for Android 8.0+ built with Java and Android system APIs;
- Windows installer, portable EXE, and Android APK downloads in GitHub Releases.
| Edition | File | Use case |
|---|---|---|
| Windows installer | ExerciseMarkAnalyzer-Windows-Setup.exe | Recommended for normal installation and uninstall support |
| Windows portable | ExerciseMarkAnalyzer-Windows-Portable.exe | Run directly without installation |
| Android APK | ExerciseMarkAnalyzer-Android.apk | Android 8.0 and newer |
- Up to 150 student pages per batch; JPG/JPEG/PNG/PDF on both platforms, plus BMP/TIFF on Windows.
- Multi-select, drag-and-drop, folder import, Android camera capture, and gallery import.
- No mandatory blank master sheet: the first imported page becomes the batch reference and still counts as a student page.
- Detects numbering patterns such as Chinese section numbers,
1, and(1), then creates editable question regions in reading order. - Corrects EXIF orientation, portrait/landscape orientation, mild skew, scale, page corners, and perspective distortion.
- Multiple blanks are evaluated as one question region; any clear error mark makes the whole question incorrect.
- Drawing and word-problem questions are evaluated over the complete configured region.
- Per-question and per-student statistics, top-10 error rates, low-confidence anomalies, crop review, and instant manual correction.
- Exports an
.xlsxworkbook with four sheets: question statistics, student statistics, error-rate ranking, and anomalies. - One-tap cleanup removes the current results, app-camera originals, previews, and cache without deleting gallery originals or exported workbooks.
No detected teacher mark or a complete tick is treated as correct. Crosses, partial crosses, partial ticks, slashes, circles, question marks, and other clear correction marks are treated as incorrect and prioritized for review.
The Android implementation compares pages within the batch to preserve newly added red, blue, and dark thin strokes while suppressing stable printed content. The Windows implementation focuses on red correction marks. Thin ballpoint/fountain-pen strokes, compression artifacts, shadows, and printed colored artwork can still be ambiguous, so the product provides low-confidence review and manual correction instead of claiming 100% real-classroom accuracy.
- Use portrait capture and keep the whole page, especially all four corners, in frame. Mild skew is supported.
- A3 pages can be captured in portrait; if text becomes too small, capture sections and analyze them as separate batches.
- Pages in one batch must be the same worksheet, or at least have a one-to-one question-number and ordering correspondence.
- Without a blank master, printed red artwork can be visually indistinguishable from teacher ink at the same position and shape. Review flagged results carefully.
Both apps work offline. The Android APK requests no network permission. Windows data lives under %LOCALAPPDATA%\ExerciseMarkAnalyzer; Android data stays in the app-private directory. The repository excludes student photos, grades, signing keys, and local build caches.
The Windows synthetic stress suites completed 100/100 and 150/150 pages. The 150-page suite processed 1,500 question decisions in 17.24 seconds with a peak working set of 179.5 MB on the documented test PC. These deterministic synthetic tests verify capacity and known-mark regression; they are not a claim of real-classroom accuracy or phone performance. See the 150-page stress report.
Build and test the Windows app on Windows 10/11:
powershell -ExecutionPolicy Bypass -File .\build.ps1 -RunTestsBuild Android with JDK 17, Android SDK Platform 35, and Build Tools 35.0.0:
powershell -ExecutionPolicy Bypass -File .\android\build-apk.ps1 `
-ToolRoot D:\AndroidBuildTools `
-SdkRoot D:\AndroidBuildTools\android-sdk `
-JavaHome D:\AndroidBuildTools\jdk\jdk-17Without release-signing environment variables, the script creates a local development key outside the repository. For a release build, set EXERCISEMARK_KEYSTORE, EXERCISEMARK_KEY_ALIAS, EXERCISEMARK_STORE_PASSWORD, and EXERCISEMARK_KEY_PASSWORD locally. Never commit a signing key.
Licensed under the GNU General Public License v3.0. If you distribute a modified or derivative version, you must make its corresponding source available under GPL-3.0. Third-party worksheet pages, textbook content, and student photos are not covered by this project license.