- Overview
- Features
- Architecture
- Tech Stack
- Installation
- Usage
- API Documentation
- Project Structure
- Scoring Algorithm
- Screenshots
- Contributors
AssessIQ is an intelligent system designed to automate the evaluation of student answer sheets. It combines:
- OCR Technology for extracting text from handwritten answers
- NLP Processing for text normalization and keyword extraction
- Semantic Analysis using Sentence-BERT for meaning-based comparison
- Diagram Evaluation using structural similarity metrics
- Hybrid Scoring algorithm for accurate grading
This project is developed as part of the 6th Semester B.Tech Computer Science Engineering curriculum.
- Multi-Engine Support:
- β EasyOCR (balanced, ~5s)
- β Ensemble (90-95% accuracy, ~12s)
- β Tesseract (fast, ~3s)
- β PaddleOCR (layouts, ~8s)
- β Sarvam AI Cloud API (cloud, 90-95% accuracy, NEW!)
- Image preprocessing: Noise removal, skew correction, thresholding
- PDF and image file support (PNG, JPG, TIFF, BMP)
- User-selectable OCR engine via API
- Text cleaning and normalization
- Tokenization and lemmatization
- Stopword removal
- Keyword extraction
- Sentence-BERT embeddings (all-MiniLM-L6-v2)
- Cosine similarity calculation
- TF-IDF vectorization
- Jaccard similarity
- SSIM (Structural Similarity Index)
- ORB feature matching
- Contour analysis
- Shape comparison
- Hybrid scoring with dynamic weights
- Keyword coverage analysis
- Length penalty for incomplete answers
- Detailed feedback generation
- Modern React dashboard
- Material-UI components
- Responsive design
- Animated visualizations
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ASSESSIQ SYSTEM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Frontend βββββΆβ Backend βββββΆβ Database β β
β β (React) ββββββ (FastAPI) ββββββ (SQLite) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β β
β ββββββββββββββββββββββ΄ββββββββββββββββββββ β
β βΌ βΌ βΌ β
β βββββββββββββββ βββββββββββββββββββ ββββββββββββββββ β
β β OCR Service β β Semantic Service β βDiagram Serviceβ β
β β (EasyOCR) β β(Sentence-BERT) β β (OpenCV) β β
β βββββββββββββββ βββββββββββββββββββ ββββββββββββββββ β
β β β β β
β ββββββββββββββββββββββ΄ββββββββββββββββββββ β
β β β
β βΌ β
β βββββββββββββββββββ β
β β Scoring Service β β
β β(Hybrid Algorithm)β β
β βββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Input (Image/PDF/Text)
β
βΌ
βββββββββββββββββ
β OCR Extractionβ βββΆ Extract text from images
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
β NLP Processingβ βββΆ Clean, tokenize, normalize text
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
βSemantic Analysisβ βββΆ Generate embeddings, calculate similarity
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
βDiagram Analysisβ βββΆ Compare visual elements (if applicable)
βββββββββββββββββ
β
βΌ
βββββββββββββββββ
βHybrid Scoring β βββΆ Combine scores, apply weights
βββββββββββββββββ
β
βΌ
Final Result
| Technology | Purpose |
|---|---|
| Python 3.9+ | Core programming language |
| FastAPI | REST API framework |
| Pydantic | Data validation |
| SQLAlchemy | ORM for database |
| Technology | Purpose |
|---|---|
| EasyOCR | Optical Character Recognition |
| spaCy | NLP processing |
| Sentence-Transformers | Semantic embeddings |
| OpenCV | Image processing |
| scikit-image | SSIM calculation |
| Technology | Purpose |
|---|---|
| React 18 | UI framework |
| Material-UI | Component library |
| Framer Motion | Animations |
| Axios | HTTP client |
| Recharts | Data visualization |
- Python 3.9 or higher
- Node.js 16+ and npm
- Git
git clone https://github.com/your-username/answer-evaluation.git
cd Answer_Evaluation# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Download spaCy model
python -m spacy download en_core_web_sm
# Download NLTK data
python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('wordnet')"# Copy example environment file
copy .env.example .env
# Edit .env with your settings (optional)cd frontend
# Install dependencies
npm install
# Return to root
cd ..python -c "from database.models import init_db; init_db()"# From project root
uvicorn api.main:app --reload --host 0.0.0.0 --port 8000Backend will be available at: http://localhost:8000
cd frontend
npm startFrontend will be available at: http://localhost:3000
# Test API health
curl http://localhost:8000/
# Test with sample evaluation
curl -X POST http://localhost:8000/api/v1/evaluate/text \
-H "Content-Type: application/json" \
-d '{
"model_answer": "Photosynthesis is the process by which plants convert sunlight into energy.",
"student_answer": "Plants use photosynthesis to make food using sunlight.",
"question_type": "descriptive",
"max_marks": 10
}'| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check |
POST |
/api/v1/upload |
Upload files for evaluation |
POST |
/api/v1/evaluate |
Evaluate uploaded files |
POST |
/api/v1/evaluate/text |
Evaluate text directly |
GET |
/api/v1/results |
Get all evaluation results |
GET |
/api/v1/results/{id} |
Get specific result |
DELETE |
/api/v1/results/{id} |
Delete result |
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Request:
POST /api/v1/evaluate/text
{
"model_answer": "DNA is deoxyribonucleic acid, which carries genetic information.",
"student_answer": "DNA stands for deoxyribonucleic acid and contains genetic info.",
"question_type": "factual",
"max_marks": 5
}Response:
{
"evaluation_id": "abc123",
"final_score": 85.5,
"obtained_marks": 4.3,
"grade": "excellent",
"score_breakdown": {
"semantic_score": 0.89,
"keyword_score": 0.78,
"diagram_score": null,
"length_penalty": 0.02
},
"concepts": {
"matched": ["DNA", "deoxyribonucleic acid", "genetic"],
"missing": ["information", "carries"],
"coverage_percentage": 75.0
},
"explanation": "Good understanding of DNA basics...",
"suggestions": ["Include more detail about DNA's function"]
}Answer_Evaluation/
βββ api/ # Backend API
β βββ main.py # FastAPI application
β βββ routes/ # API endpoints
β β βββ upload.py # File upload handling
β β βββ evaluation.py # Evaluation logic
β β βββ results.py # Results retrieval
β βββ services/ # Core services
β βββ ocr_service.py # OCR processing
β βββ nlp_service.py # NLP operations
β βββ semantic_service.py # Semantic analysis
β βββ diagram_service.py # Diagram comparison
β βββ scoring_service.py # Hybrid scoring
β
βββ config/ # Configuration
β βββ settings.py # Application settings
β
βββ database/ # Database layer
β βββ models.py # SQLAlchemy models
β
βββ frontend/ # React frontend
β βββ public/ # Static assets
β βββ src/
β βββ components/ # Reusable components
β β βββ Layout.jsx # Main layout
β βββ pages/ # Page components
β β βββ Dashboard.jsx # Home dashboard
β β βββ Evaluate.jsx # Evaluation form
β β βββ Results.jsx # Results display
β β βββ History.jsx # Past evaluations
β βββ services/
β βββ api.js # API client
β
βββ uploads/ # Uploaded files (gitignored)
βββ results/ # Evaluation results
βββ requirements.txt # Python dependencies
βββ .env.example # Environment template
βββ README.md # This file
Final_Score = (Semantic Γ Wβ) + (Keyword Γ Wβ) + (Diagram Γ Wβ) - Length_Penalty
| Question Type | Semantic (Wβ) | Keyword (Wβ) | Diagram (Wβ) |
|---|---|---|---|
| Factual | 0.50 | 0.40 | 0.10 |
| Descriptive | 0.60 | 0.30 | 0.10 |
| Diagram | 0.30 | 0.20 | 0.50 |
| Mixed | 0.45 | 0.25 | 0.30 |
- Semantic Score (0-1): Cosine similarity of Sentence-BERT embeddings
- Keyword Score (0-1): Percentage of important keywords matched
- Diagram Score (0-1): SSIM + ORB feature matching
- Length Penalty (0-0.1): Deduction for too short/long answers
| Grade | Percentage Range |
|---|---|
| Excellent | β₯ 85% |
| Good | 70% - 84% |
| Average | 50% - 69% |
| Poor | < 50% |
Modern dashboard with statistics and quick actions
Step-by-step evaluation wizard with file upload
Detailed results with animated score visualization
| Name | Role | Contact |
|---|---|---|
| [Kunal Ekare] | Developer | [kunalekare02@gmail.com] |
| [Soumya Dhole] | Full Stack Developer | [dholesm@rknec.edu] |
This project is licensed under the MIT License - see the LICENSE file for details.
- EasyOCR for OCR capabilities
- Sentence-Transformers for semantic embeddings
- FastAPI for the amazing framework
- Material-UI for beautiful React components
Made with β€οΈ for Academic Excellence
Β© 2024 AssessIQ - All Rights Reserved