點此下載程式(ZIP):https://github.com/Abieskawa/answer-sheet-studio/archive/refs/heads/main.zip
GitHub Releases(推薦):https://github.com/Abieskawa/answer-sheet-studio/releases/latest
線上文件(Read the Docs):https://answer-sheet-studio.readthedocs.io/zh-tw/latest/
Answer Sheet Studio 讓老師可以產生可列印的答案卡,並在本機進行影像辨識(不會上傳到雲端):
- 下載答案卡:輸入標題、科目、題數(最多 100 題)、每題選項(
ABC/ABCD/ABCDE),下載答案卡 PDF(給學生填答)。 - 下載老師答案檔:下載
answer_key.xlsx(Excel),填入correct/points之後到「上傳處理」上傳。 - 上傳處理(辨識+分析):上傳多頁 PDF(每頁一位學生)+老師答案檔
answer_key.xlsx。完成後會提供「開啟結果頁」按鈕(可用新分頁開啟),並輸出results.csv(題號為列、學生為欄)、ambiguity.csv(空白/模稜兩可/多選)、annotated.pdf(標註辨識結果)與分析報表/圖表(圖表會依介面語言顯示)。 - 啟動器:雙擊啟動器(
start_mac.command或start_windows.vbs)即可建立虛擬環境、安裝套件、啟動伺服器並開啟http://127.0.0.1:8000。- Windows 會把虛擬環境放在
%LOCALAPPDATA%\\AnswerSheetStudio\\venvs\\<requirements-hash>,即使重新下載/解壓縮專案也能重用,避免每次都重新安裝。 - macOS 會把虛擬環境放在
~/Library/Application Support/AnswerSheetStudio/venvs/<requirements-hash>,即使重新下載/解壓縮專案也能重用,避免每次都重新安裝。 - 如需自訂位置,可設定環境變數
ANSWER_SHEET_VENV_DIR(指向 venv 根目錄)。
- Windows 會把虛擬環境放在
- 網頁介面支援 English / 繁體中文,可用頁首的語言切換;目前不提供簡體中文版本。
- macOS 13+ 或 Windows 11
- Python 3.10+(建議 3.11;支援 3.10–3.13)。若尚未安裝 Python,啟動器可協助下載官方安裝程式。
- Windows 安裝 Python 時請勾選「Add python.exe to PATH」(並保留
pylauncher) - 第一次安裝需要網路下載 Python 套件(FastAPI、PyMuPDF、OpenCV、NumPy 等)
macOS
- 雙擊
start_mac.command(若提示權限,先執行一次chmod +x start_mac.command)。若尚未安裝 Python,會提示下載並開啟安裝程式。 - 第一次會建立虛擬環境並安裝依賴套件;之後會重用既有環境(除非
requirements.txt有變更)。 - 瀏覽器會自動開啟
http://127.0.0.1:8000。用完關閉瀏覽器即可;伺服器會在一段時間無操作後自動結束。若之後看到ERR_CONNECTION_REFUSED/「127.0.0.1 拒絕連線」,請再雙擊啟動器重新啟動。
Windows 11
- 雙擊
start_windows.vbs。若尚未安裝 Python,會提示自動下載/安裝 Python 3.11(建議)。- 若要做「一直按下一步」的安裝精靈(Setup.exe),見
installer/windows/README.md。
- 若要做「一直按下一步」的安裝精靈(Setup.exe),見
- 若你選擇手動安裝 Python,請勾選「Add python.exe to PATH」(並保留
pylauncher)。 - 第一次會安裝依賴套件;之後會重用既有環境(除非
requirements.txt有變更)。若 Windows Defender 詢問是否允許網路連線,請允許(只會綁定 localhost)。
- 進行辨識時,題數 與 每題選項(ABC/ABCD/ABCDE) 必須與答案卡一致。
- 想要結果更穩定:建議用較深的筆、掃描 300dpi,並避免歪斜/旋轉。
辨識完成後,檔案會寫入 outputs/<job_id>/:
results.csv(學生欄位預設為「年級-班級-座號」(班級支援 1–9;0 保留),例如8-1-01;重複會自動加_2/_3)ambiguity.csvroster.csv(從答案卡讀出的年級/班級/座號與頁碼)annotated.pdfinput.pdf(原始上傳檔)answer_key.xlsx(老師答案檔)showwrong.xlsx(只顯示錯題:題號為列、學生為欄;最後一列為每位學生總分)analysis_template.csv、analysis_scores.csv、analysis_item.csv、analysis_summary.csvanalysis_scores_by_class.xlsx(按班級分表的成績表)analysis_score_hist.png、analysis_item_plot.pnganalysis_showwrong.json(結果頁互動圖表用)試題分析整合檔.xlsx、試題分析整合報表.pdf- 若整合報表產生失敗,會回退輸出
analysis_report.pdf(舊版相容檔) - 若未來新增更多
analysis_*輸出(CSV/XLSX/圖片/日誌),結果頁的「試題分析檔案」會自動列出下載連結。
/result/<job_id>/charts會把互動式表格/圖表與「試題分析檔案」集中在同一頁。- 「試題分析檔案」會顯示核心下載項目:
學生資訊、全部學生分數、各班分數、試題分析、分數統計、試題分析整合報表(XLSX/PDF)(若對應檔案存在)。 - 互動功能:滑鼠移到表格/圖表可醒目提示題號,點一下可鎖定;支援學生篩選/排序、隱藏正確,以及鍵盤快捷鍵(←/→ 題號、↑/↓ 學生、Esc 清除、PgUp/PgDn 切換圖)。
- 可用頁面上的「列印/存成 PDF」按鈕,透過瀏覽器列印功能輸出成可列印的 PDF。
- 「試題分析數據(預覽)」為可展開的表格(預設收合);需要完整資料請下載
analysis_item.csv。
- 開啟
http://127.0.0.1:8000/update,上傳最新 ZIP(GitHub Releases 或main.zip)。更新後會自動重新啟動。
一般使用者不需要使用 Debug Mode。
- 開啟
http://127.0.0.1:8000/debug,輸入 Job ID(outputs/底下的資料夾名稱)。 - 下載
results.csv、ambiguity.csv、annotated.pdf(必要時再下載input.pdf),提供給開發者協助排查。
- pip install 失敗 – 檢查 launcher log;確認有網路、Python 版本為 3.10+。若你是 Python 3.14,建議改用 Python 3.10–3.13。
- Port 已被佔用 / permission denied – 啟動器會檢查 port;若 macOS 防火牆阻擋 Python,請到 System Settings > Network > Firewall 放行。
- 伺服器沒有自動開啟 – 先看 launcher log 找出錯誤;也可以在終端機執行
python run_app.py(需先在同一環境安裝 requirements)方便除錯。
本機建置文件:
macOS / Linux
python -m venv .venv && source .venv/bin/activatepip install -r docs/requirements.txtmake html
Windows(PowerShell)
py -3.11 -m venv .venv.\.venv\Scripts\Activate.ps1pip install -r docs/requirements.txt.\make.bat html
Sphinx 原始檔在 source/;Read the Docs 使用相同設定(source/conf.py),並依 RTD 語系建置 en / zh-tw。
會自動產生「假老師答案檔」並把所有輸出寫到 outputs/<job_id>/:
- 有範例掃描檔時:
python scripts/e2e_demo.py --input test/八年級期末掃描.pdf - 沒有掃描檔時:
python scripts/e2e_demo.py --synthetic-pages 8 - 依照程式輸出提示開啟
http://127.0.0.1:8000/result/<job_id>/charts(若伺服器已啟動)
Download (ZIP): https://github.com/Abieskawa/answer-sheet-studio/archive/refs/heads/main.zip
GitHub Releases (recommended): https://github.com/Abieskawa/answer-sheet-studio/releases/latest
Docs (Read the Docs): https://answer-sheet-studio.readthedocs.io/en/latest/
Answer Sheet Studio lets teachers generate printable answer sheets and run local OMR recognition (no cloud upload):
- Download page – choose title, subject, number of questions (up to 100), and choices per question (
ABC/ABCD/ABCDE). Download the answer sheet PDF (for students). - Teacher answer key – download
answer_key.xlsx(Excel), fillcorrect/points, then upload it on the Upload page. - Upload page (recognize + analyze) – upload a multi-page PDF scan (one student per page) plus
answer_key.xlsx. After processing, you’ll get an Open result page button (open in a new tab if desired). Exportsresults.csv(questions as rows, students as columns),ambiguity.csv(blank/ambiguous/multi picks),annotated.pdf, and analysis reports/plots (plots follow the selected UI language). - Launcher – double-click (
start_mac.commandorstart_windows.vbs) to create a virtual env, install dependencies, start the local server, and openhttp://127.0.0.1:8000. - The launcher reuses a stable venv across re-downloads/unzips:
- Windows:
%LOCALAPPDATA%\\AnswerSheetStudio\\venvs\\<requirements-hash> - macOS:
~/Library/Application Support/AnswerSheetStudio/venvs/<requirements-hash> - To override, set
ANSWER_SHEET_VENV_DIR(points to the venv root dir).
- Windows:
- The web UI supports English and Traditional Chinese. Use the language tabs in the header. Simplified Chinese is not provided.
- macOS ≥ 13 or Windows 11
- Python 3.10+ (3.11 recommended; 3.10–3.13 supported). If Python isn’t installed yet, the launcher can help download the official installer.
- On Windows, ensure “Add python.exe to PATH” during installation (and keep the
pylauncher enabled if offered). - Internet access the first time to download Python packages (FastAPI, PyMuPDF, OpenCV, NumPy, etc.).
macOS
- Double-click
start_mac.command(or runchmod +x start_mac.commandonce if prompted). If Python isn’t installed, it will offer to download and open the installer. - First run creates a virtual env and installs requirements; later runs reuse the existing env (unless requirements changed).
- Your browser opens
http://127.0.0.1:8000. Close the browser when you’re done; the server auto-exits after a period of inactivity. If you later seeERR_CONNECTION_REFUSED/ “127.0.0.1 refused to connect”, rerun the launcher to start the local server again.
Windows 11
- Double-click
start_windows.vbs. If Python isn’t installed, it will offer to download/install Python 3.11 automatically (recommended).- For a traditional “Next/Next/Finish” installer wizard (Setup.exe), see
installer/windows/README.md.
- For a traditional “Next/Next/Finish” installer wizard (Setup.exe), see
- If you install Python manually, ensure “Add python.exe to PATH” during installation (and keep the
pylauncher enabled if offered). - First run installs requirements; later runs reuse the existing environment (unless requirements changed). If Windows Defender prompts for network access, allow it so the server can bind to localhost.
- For recognition, the number of questions and choices per question must match the generated answer sheet.
- For more stable results: use a darker pen/pencil, scan at 300dpi, and avoid skew/rotation.
After recognition, files are written under outputs/<job_id>/:
results.csv(student columns default tograde-class-seat(class 1–9; 0 reserved), e.g.8-1-01; duplicates get_2/_3)ambiguity.csvroster.csv(grade/class/seat and page index extracted from the sheet)annotated.pdfinput.pdf(original upload)answer_key.xlsx(teacher answer key)showwrong.xlsx(wrong answers only; questions as rows, students as columns; last row is total score per student)analysis_template.csv,analysis_scores.csv,analysis_item.csv,analysis_summary.csvanalysis_scores_by_class.xlsx(scores split by class)analysis_score_hist.png,analysis_item_plot.pnganalysis_showwrong.json(interactive report data)試題分析整合檔.xlsx,試題分析整合報表.pdf- If integrated report generation fails, the app falls back to
analysis_report.pdf(legacy compatibility output) - If more
analysis_*outputs are added later (CSV/XLSX/images/logs), the result page’s “Item analysis files” section will auto-list them.
/result/<job_id>/chartsputs plots and “Item analysis files” on one page.- “Item analysis files” includes these core downloads when available:
Student info,All student scores,Class scores,Item analysis,Score statistics,Integrated report (XLSX/PDF). - Interactions: hover the table/charts to highlight a question, click to lock; filter/sort students, hide correct, and use keyboard shortcuts (←/→ question, ↑/↓ student, Esc clear, PgUp/PgDn switch chart).
- Use the “Print / Save as PDF” button to export a printable PDF via your browser’s print dialog.
- “Item analysis data (preview)” is a collapsible table (collapsed by default); download
analysis_item.csvfor full data.
- Open
http://127.0.0.1:8000/updateand upload the latest ZIP (from GitHub Releases ormain.zip). The app will restart automatically.
- Open
http://127.0.0.1:8000/debugand enter the Job ID (the folder name underoutputs/) to download diagnostic files (includingambiguity.csv).
- pip install failed – Check the launcher log; ensure network access and Python 3.10+. If you’re on Python 3.14, try Python 3.10–3.13.
- Port already in use / permission denied – The launcher checks port availability. If macOS firewall blocks Python, allow incoming connections in System Settings > Network > Firewall.
- Server not opening – Use the launcher log to identify crashes; you can also run
python run_app.pyafter installing requirements in the same environment for debugging.
Build the docs locally:
macOS / Linux
python -m venv .venv && source .venv/bin/activate(or your preferred venv)pip install -r docs/requirements.txtmake html
Windows (PowerShell)
py -3.11 -m venv .venv.\.venv\Scripts\Activate.ps1pip install -r docs/requirements.txt.\make.bat html
The Sphinx source lives in source/. Read the Docs uses the same config (source/conf.py) and builds en / zh-tw based on the RTD language setting.
Creates a fake teacher answer key and writes all outputs under outputs/<job_id>/:
- With a sample scan:
python scripts/e2e_demo.py --input test/八年級期末掃描.pdf - Without a scan:
python scripts/e2e_demo.py --synthetic-pages 8 - Open
http://127.0.0.1:8000/result/<job_id>/charts(if the server is running)