A full-stack web application that extracts text from images using OCR and detects emails, phone numbers, and URLs from the extracted text.
Live Demo: https://chimerical-kangaroo-e33df4.netlify.app
- User uploads an image (PNG, JPG, JPEG, WEBP)
- Backend extracts text using Tesseract OCR
- Regex patterns detect emails, phone numbers, and URLs
- Results are displayed in a clean, interactive UI
Image-Scanner-API/
├── backend/
│ ├── main.py # FastAPI app with /scan endpoint
│ ├── scanner.py # Tesseract OCR logic
│ ├── extractor.py # Regex pattern extraction
│ ├── requirements.txt # Python dependencies
│ └── Dockerfile # Docker config for deployment
├── frontend/
│ ├── index.html # Main UI
│ ├── styles.css # Styling
│ └── script.js # API calls and UI logic
└── README.md
| Layer | Technology |
|---|---|
| Backend | Python, FastAPI |
| OCR Engine | Tesseract OCR (pytesseract) |
| Frontend | HTML, CSS, JavaScript |
| Containerization | Docker |
| Backend Hosting | Render (free tier) |
| Frontend Hosting | Netlify (free tier) |
Accepts an image file and returns extracted contact information.
Request
Content-Type: multipart/form-data
Field: file (image/*)
Response
{
"Email": ["example@gmail.com"],
"Phone": ["9876543210"],
"URLs": ["https://example.com"]
}- Python 3.8+
- Tesseract OCR installed at
C:/Program Files/Tesseract-OCR/tesseract.exe
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reloadBackend runs at: http://localhost:8000
API docs at: http://localhost:8000/docs
cd frontend
python -m http.server 5500Frontend runs at: http://localhost:5500
| Service | Platform | URL |
|---|---|---|
| Frontend | Netlify | chimerical-kangaroo-e33df4.netlify.app |
| Backend | Render | Auto-deployed via Docker |
- Frontend is connected to GitHub — auto-deploys on every
git push - Backend runs in a Docker container on Render with Tesseract pre-installed
fastapi
uvicorn
pillow
pytesseract
python-multipart