https://github.com/negarhonarvar/equation-solving-ocr
An Equation Solving Model for hand written equations, enahned by Tesseract
https://github.com/negarhonarvar/equation-solving-ocr
cv2 pil pytorch tesseract-ocr torchvision
Last synced: 6 months ago
JSON representation
An Equation Solving Model for hand written equations, enahned by Tesseract
- Host: GitHub
- URL: https://github.com/negarhonarvar/equation-solving-ocr
- Owner: negarhonarvar
- License: mit
- Created: 2025-04-12T20:22:06.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-12T21:58:14.000Z (6 months ago)
- Last Synced: 2025-04-13T11:14:27.738Z (6 months ago)
- Topics: cv2, pil, pytorch, tesseract-ocr, torchvision
- Language: Jupyter Notebook
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Equation Solver with OCR
This repository implements a full pipeline to classify and solve equations from images using deep learning and OCR techniques. It supports both **handwritten** and **typed** expressions and reconstructs them into solvable strings.
## Overview ๐
The system processes input equation images by:
- Classifying the equation as handwritten or typed
- Segmenting and recognizing characters using:
- CNN trained on MNIST and a custom symbol dataset
- Tesseract and EasyOCR for OCR-based recognition
- Reconstructing the equation
- Solving the expression and saving results## Dataset ๐
All training and test data are available in this shared Google Drive folder:
[Equation Dataset - Google Drive](https://drive.google.com/drive/folders/13nICjIQg57NhPn5eYJwZp1jCpJwk4vjp)
## How to Use ๐
### 1. Clone the Repository
git clone https://github.com/yourusername/equation-ocr-solver.git
cd equation-ocr-solver
### 2. Install Dependenciespip install -r requirements.txt
If you're running in Google Colab, also install Tesseract with:!apt-get install tesseract-ocr
### 3. Run the Notebook
Open and run the following notebook in Google Colab:EquationSolving-OCR.ipynb
### 4. Output
After running the full pipeline, a file named submission.csv will be generated containing:- The predicted type of each equation image (typed or handwritten)
- The evaluated result of the expression
## Project Structure ๐ฆ
โโโ README.md
โโโ requirements.txt
โโโ EquationSolving-OCR.ipynb # Original notebook (Colab)
โโโ equationsolving_ocr.py # Exported script version of the notebook
โโโ drive/
โ โโโ train/ # Training images
โ โโโ test/ # Test images
โ โโโ train_info.csv # Labels for training
โ โโโ submission.csv # Generated predictions## License ๐งพ
This project is licensed under the MIT License. See the LICENSE file for details.