A 100% offline, privacy-first local workflow for AI-assisted marking, personalized feedback drafting, teacher review & approval, printable report generation, and student performance tracking.
-
๐ 100% Local & Private (Zero Cloud Dependencies):
- Integrates directly with your local Ollama instance (
http://localhost:11434). - Uses local multimodal vision models (e.g.,
qwen2.5-vl/qwen3.8) for handwriting OCR, visual layout analysis, and rubric evaluation. - All student scans, extracted handwriting, scores, and personal records remain strictly on your local machine with zero external telemetry.
- Integrates directly with your local Ollama instance (
-
๐งฉ Pluggable Subject Marker Architecture & Registry:
- Central Marker Registry (
app/markers/registry.py): Extensible registry mapping assignments to specialized subject markers via theBaseMarkerlifecycle interface. - Lower Secondary Science Marker (
app/markers/lower_sec_science.py):- Handles multi-part questions (e.g., Q1(a), Q1(b)(i)), experimental setups, data tables, and apparatus diagrams.
- Advanced criteria grounding across horizontal and vertical marking rubrics.
- Detects partially unfilled or empty student answer boxes by scanning the entire diagram width.
- Cross-page question stitching for multi-page science problems.
- Chinese Composition / Essay Marker (
app/markers/chinese_essay.py):- Purpose-built for standard 20ร20 composition grid paper (็ฐๅญๆ ผ / ๆนๆ ผ็บธ).
- Automated character counting, paragraph indent validation, and punctuation placement verification.
- Dual-criterion assessment: ๅ ๅฎน (Content, 20 marks) and ่กจ่พพ (Language & Expression, 20 marks).
- Paragraph-by-paragraph feedback, vocabulary highlights, and sentence refinement suggestions.
- General Subject Marker (
app/markers/general.py): Fallback engine for standard question-and-answer worksheets and exams.
- Central Marker Registry (
-
๐ Advanced Layout Analysis & Paper Engines:
- Layout Boundary Engine (
app/core/layout_engine.py): Computer vision delineation for question blocks, student answer zones, tables, and bounding boxes. - Lined Paper Engine (
app/core/lined_paper_engine.py): Baseline finding, ruling line detection, and paragraph line grouping on lined exam sheets. - Grid Paper Transcriptions (
app/core/grid_paper_transcriptions.py): Maps OCR character tokens into precise 20ร20 grid cell coordinates for Chinese essays. - Direct Visual Marker (
app/core/direct_marker.py): Burns criteria checklists, ticks, crosses, and callout annotations directly onto the scanned student papers at ink-grounded coordinates. - Resilient Fallback Tracking (
app/core/fallback_tracker.py): Tracks heuristic or LLM fallbacks during OCR and layout parsing, recording diagnostic notices for teachers.
- Layout Boundary Engine (
-
๐ซ Google Classroom 2-Way Synchronization:
- Course & Roster Sync: Seamless OAuth2 integration to import classes, active coursework, and enrolled student rosters directly into Tallus.
- Submission Ingestion: Sync student submission attachments (PDFs and image scans) straight into the local marking pipeline.
- Grade & Feedback Return: Push evaluated marks, rubric breakdowns, and generated PDF reports back to Google Classroom as assignment grades and private teacher comments.
-
โ๏ธ Bulk Ingestion, Auto-Splitting & Incremental Pipeline:
- Ingest multi-page scanned class PDFs; auto-splits into individual student documents and extracts student names via OCR.
- Support for reverse-order page scanning and per-page rotation (90ยฐ, 180ยฐ, 270ยฐ).
- Incremental Step Re-running: Re-run grading and visual annotation burning (Steps 2 & 3) without repeating the expensive OCR step (Step 1).
- Bulk Cleanup: Cascade deletion of assignments and submissions with automatic removal of local files, processed images, and database records.
-
๐งโ๐ซ Assignment-Level Review Station & Human-in-the-Loop Approval:
- Queue Navigation: Continuous review workflow ("Submission X of Y") allowing teachers to grade an entire class batch without returning to the main dashboard.
- Split-Screen Workspace: High-resolution scanned script on the left with zoom and pan; AI rubric scoring, editable marks, and drafted feedback on the right.
- Quick Approvals & Hotkeys: One-click score overrides, quick status transitions (Pending Review, Approved, Flagged), and immediate next-submission jumps.
-
๐ Printable Personal Student Reports:
- Generates publication-ready A4 PDF reports (and printable web views) with score badges, personalized feedback, mastered skills, focus areas, and question-by-question breakdowns.
-
๐ Longitudinal Student Database & Batch Editing:
- SQLite persistent database tracking student cohorts across assignments and terms.
- Batch-edit capabilities (update classes and subjects in bulk).
- Visual performance trajectories and score progression charts across assignments.
In the upcoming phases, Tallus will expand its capabilities to include deep student analytics and automated resource generation:
- ๐ Granular Skill & Topic Monitoring: Go beyond assignment-level scores to track student competency at a micro-level. The system will map individual questions to specific learning objectives, topics, and skills.
- ๐ Personalized Revision Worksheets: Leverage the granular monitoring data to automatically generate custom-tailored revision materials.
Ensure Ollama is installed and running with a compatible vision model (e.g., qwen3.8:latest or qwen2.5-vl):
ollama run qwen3.8:latestTallus operates locally on port 8250 by default.
- Native Desktop Mode (Recommended โ Zero-Console Clean Window):
- Double-click
Tallus.lnk(located on your Desktop or project folder) or runtallus.bat. - Or execute:
python tallus_desktop.py(orpython run.py --desktop). - Runs FastAPI silently in the background with zero command prompt window.
- Opens in a dedicated, native desktop window powered by Microsoft Edge WebView2.
- Bound to the Windows Taskbar and Start Menu with the monochrome Tallus icon (
AppUserModelID: Tallus.AIMarker.App). - Automatically and cleanly terminates background servers when the window is closed.
- Double-click
- Classic Browser / Terminal Mode:
- Run
python run.py. - Access
http://localhost:8250in your web browser.
- Run
- Mobile HTTPS Mode (Cloudflare Tunnel + QR Code):
- Run
start_mobile_https.bat(orpython run.py --tunnel). - Automatically provisions a trusted
https://*.trycloudflare.comURL. - Displays a scannable ASCII QR code in the terminal for instant mobile phone access and camera uploads.
- Run
- Local Network / Wi-Fi Access:
- Run
allow_firewall_port_8250.batas Administrator if accessing Tallus from tablets or other computers on the school network.
- Run
+-------------------------------------------------------------+
| 1. Ingestion & Setup |
| - Import student roster (CSV/Excel) OR Google Classroom |
| - Select specialized marker: Science, Chinese Essay, etc.|
| - Upload marking scheme (DOCX/PDF/Text) |
+-------------------------------------------------------------+
|
v
+-------------------------------------------------------------+
| 2. Document Processing & Auto-Splitting |
| - Upload multi-page class PDF |
| - Auto-split into individual student scripts via OCR |
| - Layout engine detects lined/grid paper & answer zones |
+-------------------------------------------------------------+
|
v
+-------------------------------------------------------------+
| 3. Local AI Spatial Marking & Grounding |
| - Dispatches to specialized marker (Science/Essay/etc.) |
| - Evaluates student handwriting against rubrics |
| - Burns ink-grounded ticks, crosses & callouts directly |
+-------------------------------------------------------------+
|
v
+-------------------------------------------------------------+
| 4. Assignment-Level Review Station |
| - Side-by-side verification: Scanned script vs. rubric |
| - Continuous queue navigation ("Submission X of Y") |
| - Adjust marks, edit drafted feedback, and approve |
+-------------------------------------------------------------+
|
v
+-------------------------------------------------------------+
| 5. Publication, Reports & Grade Return |
| - Generate publication-ready A4 PDF reports |
| - Sync grades & feedback comments to Google Classroom |
| - Update longitudinal performance analytics |
+-------------------------------------------------------------+
Unlike traditional AI grading systems that output detached feedback in a side panel, Tallus burns corrections directly onto the student script using the visual language of a teacher's traditional red pen.
[Teacher's Red Pen Visual Language]
โ Tick -> Directly after correct working / keyword
โ Cross -> After incorrect phrase or centered in empty answer line
โญ Circle -> Tightly surrounding erroneous numbers, units, or points
[โ Axes labelled] -> Stacked criteria checklists in clean margins near graphs
ๅฐๆน: [Refined phrase] -> Inline collocation upgrades and character corrections
โ
[Margin remark] -> Pedagogical guidance in gutter with non-colliding leader lines
- Normalized 0..1000 Coordinate System:
- Every bounding box
[ymin, xmin, ymax, xmax]is normalized to a universal1000ร1000grid, allowing seamless scaling across any scanning resolution (72 to 300+ DPI).
- Every bounding box
- Ink-Aware Anchoring (
evidence&target):- Annotations bind directly to extracted handwriting tokens and physical ink coordinates rather than guessing bounding boxes, preventing spatial drift.
- Smart Collision Avoidance & Gutter Pinned Alignment:
- Right-margin pedagogical commentary (
margin_star) sorts by vertical position (target_y) and enforces dynamic minimum spacing (line_height,curr_bottom_y + 12). - Connecting leader lines with anchor dots (
draw.ellipse,draw.line) visually tether margin comments back to the exact handwritten phrase on the script.
- Right-margin pedagogical commentary (
- Graph & Diagram Checklists:
- For graphs and visual drawings, marks are not scattered randomly across the grid. Tallus neatly stacks criteria items (Axes, Scale, Points, Line of Best Fit) into a compact vertical checklist in adjacent whitespace.
- Sub-Pixel High-DPI Rendering:
- PyMuPDF and PIL vector drawing engine renders crisp red marks (
#dc2626), rounded score badges, and anti-aliased arcs directly onto high-resolution page bitmaps.
- PyMuPDF and PIL vector drawing engine renders crisp red marks (
Tallus uses an extensible marker architecture (BaseSubjectMarker) where each subject runs on specialized prompt engineering, layout algorithms, and grading rules tailored to its domain:
- Domain: Multi-question worksheets, standard test papers, general humanities, and mathematics.
- Key Methodologies:
- Step 1A (Transcription): Verbatim OCR extraction of question numbers (
Q1, Q2...) and student handwriting. - Step 1B (Rubric Scoring): Evaluates extracted answers independently against expected answers, computing mark totals, criteria breakdowns, and question-level feedback.
- Step 1A (Transcription): Verbatim OCR extraction of question numbers (
- Domain: Lower Secondary & O-Level Science (Physics, Chemistry, Biology) structured questions, apparatus diagrams, experimental setups, and graph analysis.
-
Key Methodologies:
- Cross-Page Question Stitching: Detects when multi-part questions (e.g., Q1(a) on Page 1 and Q1(b) on Page 2) span page breaks, consolidating them into a unified evaluation context.
- Dual-Axis Criteria Grounding: Supports both vertical question rubrics and horizontal mark distribution tables.
-
Full-Width Unfilled Box Discovery:
- When students only fill some parts of a multi-box diagram (e.g., filling 2 out of 6 organelle boxes), standard OCR only detects ink on the filled side.
- Tallus sweeps the full diagram width and applies ink-density heuristics to locate empty answer boxes, placing zero-score crosses without coordinate collapse.
-
Rigorous 4-Criteria Graph Analysis Protocol:
-
Axes & Scale: Validates correct variable labels, units, and linear scale covering
$\ge 50%$ of the grid area. -
Plotting Accuracy: Coordinate verification within
$\pm 0.5$ small square tolerance; circles specific misplaced points. - Line / Curve Quality (Strict Ruler Test): Checks whether a straight line of best fit was drawn using a physical ruler. Wavy, freehand, sagging, or dot-to-dot lines are awarded 0 marks with explicit feedback.
-
Gradient / Intercept: Validates coordinate substitution using large slope triangles (
$\ge 50%$ ).
-
Axes & Scale: Validates correct variable labels, units, and linear scale covering
- Independent Table Column Evaluation: For multi-column observation tables (e.g., Instrument column + Unit column), evaluates every cell independently so unit marks are never omitted.
- Domain: Continuous Chinese narrative and expository compositions (่ฎฐๅๆ / ่ฎฎ่ฎบๆ) written on standard grid sheets.
- Key Methodologies:
- 20ร20 Composition Grid Paper Engine (
app/core/grid_paper_transcriptions.py):- Detects grid geometry across standard 400-character composition sheets (็ฐๅญๆ ผ / ๆนๆ ผ็บธ).
- Maps OCR character tokens into a discrete 20ร20 coordinate matrix.
- Exact Character Counting: Excludes empty lines, titles, and standard 2-space paragraph indentations.
- Punctuation Compliance: Detects illegal punctuation at line beginnings (ๆ ็น้กถๆ ผ), and handles multi-grid punctuation (็ ดๆๅท
โโ, ็็ฅๅทโฆโฆ).
- Dual-Criterion Holistic Rubrics:
- ๅ ๅฎน (Content - 20 or 30 marks): Theme relevance, plot conflict, emotional resonance, and pacing.
- ่กจ่พพ (Language & Structure - 20 or 30 marks): Vocabulary richness, sentence fluency, rhetorical devices, and paragraph transitions.
- Applies center-compressed band scaling to align with realistic senior examiner grading standards.
- In-Situ Fine-Grained Annotations (้ๆ็ป่ดๆนๆณจ):
char_replace: Circles wrong characters (้ๅซๅญ) and places the correct glyph directly adjacent to the grid cell.clause_rewrite: Highlights awkward syntax and suggests elevated phrasing (โ ๆน๏ผ...).descriptive_caret: Recommends insertions of sensory, psychological, or environmental detail (^...).block_prune: Marks redundant or off-topic paragraphs with red wavy strikethrough.margin_star: Generates pinned margin remarks on thematic climaxes and narrative structure.
- 20ร20 Composition Grid Paper Engine (
Tallus includes a comprehensive suite of 24 specialized test modules covering API routes, document splitting, layout detection, subject markers, and pipeline resilience:
# Run entire test suite using virtual environment
.venv\Scripts\pytest tests/
# Or run specific test suites
.venv\Scripts\pytest tests/test_essay_marker.py
.venv\Scripts\pytest tests/test_marker_registry.py
.venv\Scripts\pytest tests/test_google_classroom.py
.venv\Scripts\pytest tests/test_batch_pipeline_resilience.pyTallus/
โโโ app/
โ โโโ api/
โ โ โโโ assignments.py # Assignment & rubric management endpoints
โ โ โโโ google_classroom.py # Google Classroom OAuth2 & sync endpoints
โ โ โโโ grading.py # Review station, grade overrides & approval
โ โ โโโ reports.py # Printable PDF & HTML report endpoints
โ โ โโโ students.py # Student roster, cohort trends & bulk edits
โ โ โโโ submissions.py # PDF upload, auto-split & pipeline triggers
โ โโโ core/
โ โ โโโ config.py # App configuration, directories & port 8250
โ โ โโโ db.py # SQLite database operations, schemas & queries
โ โ โโโ direct_marker.py # Visual annotation overlay engine (ticks, crosses)
โ โ โโโ doc_parser.py # Combined PDF splitter & DOCX/PDF rubric parser
โ โ โโโ essay_marker.py # Dedicated essay evaluation & rubric scoring engine
โ โ โโโ fallback_tracker.py # Diagnostic logging for parsing/grounding fallbacks
โ โ โโโ google_classroom.py # Google Classroom API client & sync service
โ โ โโโ grid_paper_transcriptions.py # 20x20 composition grid mapping & alignment
โ โ โโโ layout_engine.py # Vision layout analysis (question blocks, diagrams)
โ โ โโโ lined_paper_engine.py # Lined paper baseline detection & line grouping
โ โ โโโ marker_engine.py # General rubric prompt engine & scoring logic
โ โ โโโ ollama_client.py # Local Ollama client with retry & error handling
โ โ โโโ pdf_processor.py # High-res PDF rendering, page rotation & deskew
โ โ โโโ report_generator.py # ReportLab A4 printable report builder
โ โ โโโ roster_parser.py # CSV/Excel roster import processing
โ โโโ markers/
โ โ โโโ __init__.py # Marker package initialization
โ โ โโโ base.py # Abstract BaseMarker lifecycle interface
โ โ โโโ chinese_essay.py # Specialized Chinese composition marker
โ โ โโโ general.py # Standard multi-question general marker
โ โ โโโ lower_sec_science.py # Lower Secondary Science marker
โ โ โโโ registry.py # Marker registry & dynamic subject dispatching
โ โโโ static/
โ โ โโโ css/
โ โ โ โโโ style.css # Dashboard, review drawer & responsive layouts
โ โ โโโ js/
โ โ โ โโโ app.js # Frontend SPA controller, review queue & Chart.js
โ โ โโโ apple-touch-icon.png # Mobile touch icon
โ โ โโโ favicon-16x16.png # 16px favicon
โ โ โโโ favicon-32x32.png # 32px favicon
โ โ โโโ favicon.ico # Multi-resolution favicon
โ โ โโโ index.html # Single-page app dashboard & review station
โ โ โโโ logo.png # Tallus monochrome logo
โ โ โโโ logo_white.png # White variant logo
โ โ โโโ tallus.ico # Win32 taskbar application icon
โ โโโ main.py # FastAPI application entrypoint & lifespan events
โโโ Markers/
โ โโโ chinese_essay_marker.md # Prompt specification for Chinese composition marking
โ โโโ lower_sec_science_marker.md # Prompt specification for Lower Sec Science marking
โโโ tests/ # Comprehensive test suite (24 test modules)
โ โโโ test_api_endpoints.py # API endpoint integration tests
โ โโโ test_auto_extraction.py # OCR name extraction tests
โ โโโ test_batch_pipeline_resilience.py # Fault-tolerant batch processing tests
โ โโโ test_bulk_delete.py # Bulk deletion & cascade cleanup tests
โ โโโ test_concise_direct_marking.py # Concise visual feedback overlay tests
โ โโโ test_criteria_grounding_horizontal.py # Horizontal criteria table detection tests
โ โโโ test_cross_page_science_questions.py # Multi-page question stitching tests
โ โโโ test_direct_marking.py # Direct visual marking tests
โ โโโ test_docx_parser.py # DOCX marking scheme parsing tests
โ โโโ test_essay_marker.py # Essay scoring, character count & grid tests
โ โโโ test_fallback_notices.py # Pipeline fallback notice tests
โ โโโ test_google_classroom.py # Google Classroom client & OAuth mock tests
โ โโโ test_grounded_pipeline.py # Grounded end-to-end marking pipeline tests
โ โโโ test_marker_registry.py # Marker registration & dispatch tests
โ โโโ test_marker_system.py # Core marker system integration tests
โ โโโ test_page_coding.py # Page numbering, barcodes & reverse scan tests
โ โโโ test_pdf_split.py # PDF splitting & student boundary tests
โ โโโ test_pipeline_skipping.py # Incremental step re-running tests
โ โโโ test_real_sample_rendering.py # High-fidelity visual annotation rendering tests
โ โโโ test_report_generation.py # ReportLab PDF report generation tests
โ โโโ test_rerun_pipeline_steps2_3.py # Step 2/3 re-run tests
โ โโโ test_roster_upload.py # Student roster CSV/XLSX import tests
โ โโโ test_rubric_parser.py # Structured rubric parser tests
โ โโโ test_unfilled_box_grounding.py # Unfilled answer box discovery tests
โโโ allow_firewall_port_8250.bat # Windows firewall rule configuration script for port 8250
โโโ create_shortcut.py # C# .NET compiler utility for windowless Tallus.lnk
โโโ format_artifact.py # Helper utility script
โโโ requirements.txt # Python dependencies
โโโ run.py # Unified CLI launcher (--desktop & --tunnel)
โโโ start_mobile_https.bat # Quick mobile HTTPS Cloudflare tunnel launcher
โโโ tallus.bat # One-click Windows desktop launcher
โโโ tallus.exe # Native compiled GUI launcher executable
โโโ tallus.ico # Multi-resolution monochrome application icon
โโโ Tallus.lnk # Configured Windows shortcut with AppUserModelID
โโโ tallus_desktop.py # Microsoft Edge WebView2 native window wrapper
โโโ test_ollama.py # Local Ollama connection verification script
โโโ tunnel_launcher.py # Cloudflare quick tunnel & ASCII QR code generator
โโโ update_ui.py # UI styling sync script