Mainproject - Report - Done 2
Mainproject - Report - Done 2
SYSTEM
A PROJECT REPORT
Submitted by
SAHANA V (Reg.No.61781921110044)
UMA MAGESHWARI M (Reg.No.61781921110058)
supervision.
SIGNATURE SIGNATURE
LIST OF FIGURES v
ABSTRACT vii
1 INTRODUCTION 1
2 LITERATURE SURVEY 3
4 PROJECT DESCRIPTION 5
4.1 Aim 5
5 RESULTS 16
5.1 Predictions 16
5.2 Outputs 20
CHAPTER PAGE
TITLE
NO. NO.
6.1 Conclusion 44
REFERENCES 46
CONFERENCE DETAILS 47
FIG NO TITLE PAGE NO
AI Artificial Intelligence
ML Machine Learning
TP True Positives
FP False Positives
FN False Negatives
UI User Interface
vi
ABSTRACT
The integration of artificial intelligence (AI) and machine learning (ML) in the
accurate, and scalable automation. Central to the innovation is the dual use of
from scanned exam papers, regardless of handwriting style and image quality.
This system empowers educators with the ability to upload both student exam
responses and standard answer keys, allowing the platform to extract, analyze,
and evaluate content in real-time. Using the RapidFuzz library for semantic
with MySQL allows secure storage and retrieval of student data and results.
not only streamlines evaluation procedures but also paves the way for intelligent
viii
ACKNOWLEDGEMENT
First and foremost, we thank to power of almighty for showing us inner peace and
for all blessings. Special gratitude to our parents, for showing their support and love always.
Our gratitude thanks to our Vice Chairmen Sri. Chocko Valliappa and Sri. Thyagu
Valliappa who leads us in a narrow path towards success in all the way.
We are immensely grateful to our principal Dr.S.R.R.Senthilumar who has been our
constant source of inspiration.
We feel elated to keep on record our heartfelt thanks and gratitude to our project
guide Ms Sangeetha Priya R Professor/IT our steadfast inspiration, for his valuable
guidance, untiring patience and diligent encouragement during the entire span of this project.
We extend our heartfelt gratitude to Dr Suresh Y., Associate Professor/IT, for his
invaluable mentorship throughout this project journey. His insightful guidance, unwavering
support, and profound expertise have been instrumental in shaping our endeavors.
We feel proud in sharing this success with my staff members, non-teaching staffs and
friends who helped directly or indirectly in completing this project successfully.
ix
CHAPTER 1
INTRODUCTION
"AI-Driven Handwritten Paper Evaluation System" introduces a
revolutionary approach to academic assessment by integrating Artificial
Intelligence (AI), Machine Learning (ML), and Optical Character Recognition
(OCR) technologies. In an educational landscape that demands efficiency,
accuracy, and scalability, this project redefines how handwritten exam papers
are evaluated by automating the traditionally manual process with intelligent
systems.
The core objective of the system is to enhance the accuracy, speed, and
consistency of evaluating student answer scripts. It allows educators to upload
scanned handwritten exam sheets along with standard answer keys, after which
it automatically extracts, processes, and evaluates the responses using advanced
NLP and similarity analysis techniques. The system is built using a powerful
combination of EasyOCR and TrOCR for text recognition, RapidFuzz for
similarity comparison, and a Flask-based web application for intuitive
interaction and result presentation.
At the heart of this system lies the integration of Optical Character Recognition
(OCR) technologies such as EasyOCR and Microsoft’s TrOCR, which facilitate
the accurate conversion of handwritten text into machine-readable format. Once
1
the text is extracted from both the student’s answer script and the standard
answer key, it is analyzed using natural language processing and text similarity
algorithms—particularly the RapidFuzz library—to determine content
alignment and score allocation.
Designed with scalability and adaptability in mind, the project can be extended
to support multiple subjects, varied answer formats, and integration with
existing academic management systems. The AI-Driven Handwritten
Evaluation System is not just a tool for automation—it is a transformative
educational aid that ensures fairness, consistency, and efficiency in academic
evaluations.
2
CHAPTER 2
LITERATURE SURVEY
2.1. Integration of OCR in AI-Based Evaluation Systems
This study investigates the application of Optical Character Recognition (OCR)
technologies like EasyOCR and Microsoft's TrOCR in automating the
evaluation of handwritten academic responses. It highlights how OCR enables
the accurate extraction of textual data from scanned answer scripts, significantly
reducing manual work and improving evaluation consistency in educational
systems.
2.2. Role of Machine Learning in Handwritten Answer Assessment
This paper examines the use of machine learning algorithms in comparing
handwritten student responses with predefined answer keys. It emphasizes the
utilization of string similarity measures such as RapidFuzz and natural language
processing (NLP) models to assess the semantic and syntactic correctness of
student responses, thereby automating subjective answer evaluation.
2.3. Enhancing Accuracy with Fuzzy Matching Techniques
This research explores the effectiveness of fuzzy string matching algorithms
like Levenshtein Distance, RapidFuzz, and Jaccard Similarity in evaluating
student answers. These techniques allow for minor variations in wording and
spelling, making the automated system tolerant to common student errors while
still maintaining evaluation fairness.
2.4. Flask-Based Web Applications for AI Integration
The study presents how lightweight web frameworks such as Flask can be
employed to create robust frontends for AI-driven systems. It discusses the
benefits of integrating OCR models, image upload capabilities, and real-time
results visualization using Python Flask, offering educators an accessible and
interactive interface for automated assessments.
2.5. Future Directions in AI-Powered Educational Tools
This paper outlines the future advancements in AI-driven education systems,
including voice-based feedback generation, adaptive learning models, multi-
language OCR support, and integration with institutional Learning Management
Systems (LMS
3
CHAPTER 3
HARDWARE AND SOFTWARE REQUIREMENTS
HARDWARE REQUIREMENTS
Processor: Intel Core i5 or higher (64-bit architecture)
RAM: Minimum 8 GB (16 GB recommended for model training)
Hard Disk: 500 GB SSD (to support faster data read/write operations)
GPU: Minimum 4 GB dedicated graphics card (NVIDIA recommended
for deep learning tasks)
Scanner / Camera: High-resolution document scanner or camera for
capturing handwritten exam scripts
Internet Connectivity: Required for model updates, cloud integration, and
remote access
SOFTWARE REQUIREMENTS
Operating System: Windows 10/11, macOS, or Linux (Ubuntu
recommended for ML environments)
Programming Language: Python 3.8+
Frameworks & Libraries:
o EasyOCR / TrOCR (for handwritten text recognition)
o RapidFuzz / NLTK (for similarity matching and evaluation)
o Flask (for web application interface)
o OpenCV (for image preprocessing and manipulation)
o scikit-learn / TensorFlow / PyTorch (for ML model development)
Database: MySQL (for storing questions, answers, results, and user data)
Code Editor / IDE: Visual Studio Code (VS Code
4
CHAPTER 4
PROJECT DESCRIPTION
4.1 AIM
The aim of the AI-Driven Handwritten Evaluation System project is to develop
an intelligent and automated framework that can evaluate handwritten student
answer sheets by leveraging OCR, Artificial Intelligence (AI), and Machine
Learning (ML) techniques. The system is intended to:
Scan and extract handwritten text from uploaded exam scripts.
Compare student answers with predefined answer keys using similarity
matching.
Allocate marks based on the degree of similarity and key concept
matching.
Generate performance reports instantly through an interactive web
application.
5
The ultimate goal is to enhance evaluation accuracy, ensure transparency, and
reduce the workload on educators, thereby contributing to the digital
transformation of academic assessments.
6
At the heart of the system lies the integration of powerful Optical Character
Recognition (OCR) models, including EasyOCR and Microsoft’s TrOCR.
These models are specifically chosen for their high accuracy in recognizing
handwritten text across varied writing styles. By using a dual-model approach,
the system ensures that the text extracted from scanned exam papers is both
precise and reliable, which serves as the foundational input for the evaluation
process. This combination allows seamless text detection across different scripts
and page qualities.
7
4.2.2.1 OCR-Based Text Extraction Flowchart
9
The system employs advanced computer vision algorithms to analyze scanned
images of handwritten answer sheets. These algorithms process the input image,
detect text regions, and prepare the image for OCR (Optical Character
Recognition). Preprocessing techniques such as image binarization, noise
removal, and contour detection enhance the clarity of handwritten text and
isolate relevant answer regions. By incorporating computer vision pipelines, the
system ensures that even low-quality or poorly scanned documents are
accurately interpreted, paving the way for reliable text extraction and evaluation.
4.3.1.1 EasyOCR Text Recognition Output 4.3.2.1 TrOCR Processing Pipeline 4.3.3.1 RapidFuzz Similarity
Matching Workflow
10
4.3.3 CONVOLUTIONAL NEURAL NETWORK (CNN) FOR
HANDWRITING DETECTION
A Convolutional Neural Network (CNN) is employed to support handwritten
character classification and pattern recognition. The CNN model is trained on
large datasets of handwritten characters to recognize and differentiate between
letters, numbers, and symbols in varying styles. During training, the CNN learns
hierarchical features—such as edges, curves, and strokes—that characterize
handwriting patterns. Once trained, the CNN is capable of generalizing across
diverse handwriting samples and improving the robustness of OCR-based text
extraction.
4.3.4 YOLO v8 FOR REGION DETECTION
The system integrates YOLO v8 (You Only Look Once), a real-time object
detection algorithm, to identify and extract answer blocks and question
numbers from the scanned answer sheet. YOLO v8 divides the input image
into a grid and detects bounding boxes around relevant content areas—such as
handwritten answers, questions, or marks—along with confidence scores. This
ensures structured extraction, where each answer is isolated and mapped to
the corresponding question, enabling accurate comparison and evaluation.
During the training phase, YOLO v8 is trained on annotated datasets of answer
sheets containing labeled regions of interest. Once integrated, the model
operates on every uploaded image to segment answer areas, reject irrelevant
noise, and facilitate structured data flow into the OCR and evaluation pipelines.
In conclusion, the integration of Artificial Intelligence and Machine Learning in
the AI-Driven Handwritten Evaluation System significantly enhances the
accuracy, adaptability, and scalability of academic assessments. Through the
combination of CNN for handwritten character recognition, YOLO v8 for
region detection, computer vision .
12
4.4.2 TAILORED FEATURES FOR DIVERSE EDUCATIONAL
SETTINGS
To accommodate a broad range of use cases, the evaluation system provides
specific tailored features such as:
Flexible Answer Input Formats: Accepts multiple formats including
scanned handwritten papers, smartphone-captured images, and PDFs.
Multilingual Support (Upcoming): Future versions will support
regional language OCR for local curriculum compatibility.
Feedback Integration: Personalized feedback generation using NLP is
planned for students needing performance improvement.
Accessibility Enhancements: Incorporation of visual and audio cues,
progress loaders, and clear error messaging to help less-experienced users
navigate the interface.
These features are designed to ensure that all users — teachers, students, and
admins — can interact with the system effectively, regardless of ability level,
resource access, or infrastructure limitations.
4.5 SCOPE OF THE PROJECT
The scope of the AI-Driven Handwritten Evaluation System involves the
design, development, testing, and deployment of a fully automated handwritten
exam assessment platform. The system is intended for use in schools, colleges,
and competitive exam boards to modernize traditional evaluation systems using
AI technologies.
13
Implementation of fuzzy string similarity algorithms (e.g., RapidFuzz) for
intelligent comparison of student answers with answer keys.
Use of adjustable scoring logic to account for partial correctness and
keyword-based marking.
14
Deployment of a fully functional Flask server for local or cloud access.
15
CHAPTER 5
RESULTS
The AI-Driven Handwritten Evaluation System has demonstrated significant
advancements in transforming traditional examination assessment processes
into a more intelligent, efficient, and unbiased digital solution. Through the
successful integration of Optical Character Recognition (OCR), Artificial
Intelligence (AI), and Natural Language Processing (NLP), the project has
achieved high levels of automation and accuracy in evaluating student answer
sheets.
By leveraging OCR technologies such as EasyOCR and Microsoft’s TrOCR,
the system accurately extracts handwritten content from scanned images of
student exam papers. This extracted content is then analyzed using text
similarity algorithms (such as RapidFuzz) to compare against the predefined
model answer keys. The implementation of this AI-powered evaluation process
has resulted in significant time savings and improved consistency in grading,
while reducing human error and subjectivity.
Furthermore, the project includes a user-friendly Flask-based web interface that
allows teachers and administrators to upload documents, initiate evaluations,
and download result reports in PDF or CSV formats. The integration of a
MySQL database enables efficient result storage, retrieval, and filtering for
individual students or batches.
Initial pilot testing was conducted using real-world exam data to evaluate the
system’s performance. The results indicate that the system is capable of
providing timely, reliable, and scalable assessment support, particularly
valuable for institutions handling large volumes of exam papers. Feedback from
test users was largely positive, praising the speed, accessibility, and fairness of
the evaluation process.
These outcomes signal promising strides toward achieving the project's primary
goal of modernizing the exam evaluation system through AI, reducing faculty
workload, and enhancing educational feedback mechanisms.
5.1 PREDICTIONS
Predictions for the AI-Driven Handwritten Evaluation System are as follows:
16
Students:
The project is expected to significantly improve the speed and transparency of
exam result processing. Students will benefit from quicker access to their results
and consistent, unbiased grading. With future enhancements, the system may
also offer feedback on handwriting clarity and content quality, further assisting
students in their academic growth.
Prediction: Institutions using this system could expect a 30-40%
reduction in the time taken to evaluate handwritten exams, enabling
faster result announcements and quicker feedback loops for students.
Teachers:
Teachers will experience substantial reductions in manual workload, allowing
them to focus more on personalized instruction and content development rather
than time-consuming evaluations.
Prediction: Educators could see a 50-60% reduction in time spent on
exam correction, with accuracy and consistency improving by 15-20%
due to the system’s AI-driven evaluation.
Institutions:
Educational institutions adopting this system will not only enhance their
assessment standards but also modernize their academic operations, potentially
improving institutional reputation and efficiency.
Prediction: Widespread implementation could lead to overall
operational efficiency improvements of 25-30%, especially during
peak exam periods.
These predictions reflect the potential transformative impact of the AI-Driven
Handwritten Evaluation System on the educational sector. While actual
results may vary based on usage conditions and future upgrades, the project lays
the groundwork for a future-ready, AI-empowered academic evaluation process
that is fair, fast, and inclusive.
5.2 OUTPUTS
17
Fig 5.2.1 Login page for uploading
18
Fig 5.2.2 Uploading Student Answer Sheet
19
Fig 5.2.4 Text Extraction
20
Fig 5.2.5 Accuracy Calculation
File Structure:
cpp
CopyEdit
handwritten_eval/
│
├── app.py
├── templates/
│ └── index.html
│ └── result.html
├── static/
│ └── style.css
├── uploads/
│ └── exam_papers/
│ └── answer_keys/
21
└── requirements.txt
1. requirements.txt
text
CopyEdit
Flask==2.2.2
easyocr==1.5.0
torch==1.10.0
rapidfuzz==2.0.0
mysql-connector-python==8.0.29
Pillow==9.1.0
reportlab==3.6.1
app = Flask(__name__)
# Database connection
def get_db_connection():
conn = mysql.connector.connect(
host="localhost",
user="root",
password="your_password",
database="handwritten_eval"
)
return conn
# Home Route
@app.route('/')
def home():
return render_template('index.html')
23
# Process OCR for answer key
answer_key_text = extract_text_from_image(answer_key)
24
similarity = fuzz.ratio(exam_text, answer_text)
marks = calculate_marks(similarity)
return marks
# Generate PDF
pdf_filename = f"report_{result_id}.pdf"
25
packet = BytesIO()
can = canvas.Canvas(packet)
can.drawString(100, 800, f"Exam Paper: {result[1]}")
can.drawString(100, 780, f"Answer Key: {result[2]}")
can.drawString(100, 760, f"Marks: {result[3]}")
can.save()
packet.seek(0)
return send_file(packet, as_attachment=True, download_name=pdf_filename)
if __name__ == '__main__':
app.run(debug=True)
html
CopyEdit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Handwritten Evaluation System</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
26
<h1>AI Handwritten Evaluation System</h1>
<form action="/upload" method="POST" enctype="multipart/form-data">
<label for="exam_paper">Upload Exam Paper:</label>
<input type="file" name="exam_paper" required><br><br>
<label for="answer_key">Upload Answer Key:</label>
<input type="file" name="answer_key" required><br><br>
<button type="submit">Submit</button>
</form>
</body>
</html>
html
CopyEdit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Evaluation Result</title>
</head>
<body>
<h1>Evaluation Result</h1>
<p>Marks: {{ marks }}</p>
<a href="/download_report/{{ result_id }}">Download Report</a>
27
</body>
</html>
css
CopyEdit
body {
font-family: Arial, sans-serif;
text-align: center;
}
form {
margin-top: 20px;
}
input[type="file"] {
margin: 10px;
}
button {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
28
}
6. Database Setup
sql
CopyEdit
CREATE DATABASE handwritten_eval;
USE handwritten_eval;
python
CopyEdit
from flask import Flask, request, render_template
import easyocr
from rapidfuzz import fuzz
from PIL import Image
return extracted_text
# Extract text from the uploaded exam paper and answer key
exam_paper_text = extract_text_from_image(exam_paper)
answer_key_text = extract_text_from_image(answer_key)
if __name__ == '__main__':
app.run(debug=True)
# Display result
return render_template('result.html', marks=marks)
if __name__ == '__main__':
app.run(debug=True)
Graph Generation:
34
# Initialize Flask app
app = Flask(__name__)
return extracted_text
# Extract text from the uploaded exam paper and answer key
exam_paper_text = extract_text_from_image(exam_paper)
answer_key_text = extract_text_from_image(answer_key)
36
# Compare the extracted texts and calculate similarity
similarity = compare_text_accuracy(exam_paper_text, answer_key_text)
# Clear the current plot to free memory for the next graph
plt.clf()
if __name__ == '__main__':
app.run(debug=True)
Explanation of the Changes:
generate_marks_graph():
This function generates a simple bar chart showing the marks obtained by the
student.
38
The chart is saved as an image in the static folder (static/marks_graph.png).
The function get_graph() is added to serve the graph image on a URL endpoint
(/get_graph).
The generated graph is saved in the static/ folder. This folder is typically used
for serving static files in Flask, such as images, CSS, and JavaScript.
html
Copy
Edit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Evaluation Result</title>
39
</head>
<body>
<h1>Evaluation Result</h1>
<p>Marks: {{ marks }}</p>
<h2>Marks Distribution</h2>
<img src="{{ url_for('get_graph') }}" alt="Marks Graph" />
</body>
</html>
40
Explanation of Code:
1. Flask Routes:
o /: The home route where users can upload exam papers and answer
keys.
41
o /upload: This route processes the uploaded files, performs OCR on
both the exam paper and the answer key, and calcul
o ates marks based on text similarity.
o /download_report/<int:result_id>: This generates a downloadable
PDF report of the results.
2. OCR Integration (EasyOCR):
o The easyocr.Reader is used to extract text from the uploaded exam
papers and answer keys.
3. Text Comparison (RapidFuzz):
o The similarity between the exam paper's extracted text and the
answer key's text is calculated using RapidFuzz's fuzz.ratio method.
Marks are awarded based on the similarity percentage.
4. Database (MySQL):
o The results (exam paper name, answer key name, and marks) are
stored in a MySQL database.
5. Report Generation (PDF):
o The reportlab library is used to generate a PDF report with the
exam paper name, answer key name, and the obtained marks.
42
Component Purpose Library Used
Allocation similarity
Generate downloadable
PDF Report reportlab
evaluation result
43
CHAPTER 6
CONCLUSION AND FUTURE WORK
6.1 CONCLUSION
The AI-Driven Handwritten Evaluation System successfully demonstrates the
potential of integrating Artificial Intelligence, Optical Character Recognition
(OCR), and Machine Learning (ML) to automate and improve traditional
academic assessment methods. This project streamlines the evaluation process
of handwritten student answer sheets by extracting content using OCR tools
(EasyOCR and TrOCR), comparing the results using semantic similarity
measures (RapidFuzz), and presenting scores through a simple web interface
built with Flask.
The system reduces the time and effort required by educators, increases the
consistency of grading, and ensures unbiased evaluations. Teachers can upload
exams, view evaluated answers instantly, and export result reports in multiple
formats. The database integration ensures that results are safely stored and
easily retrieved.
44
6.2 FUTURE WORK
To expand the capabilities and adaptability of the system, the following areas
are proposed for future development:
✅ 4. Enhanced AI Models
Implementing deep learning-based models specifically trained on educational
datasets to improve handwriting interpretation and accuracy.
✅ 6. Mobile Compatibility
Creating a mobile-friendly version or dedicated app for teachers and students to
upload or view results on the go.
45
REFERENCES
46
47
48