End-to-end pipeline that turns business card images into structured, CRM-ready contact data.
Sales teams waste time manually entering contact information from business cards into CRM systems like Salesforce or HubSpot. A single mistyped phone number or duplicate record can cost a deal. This project automates that entire workflow.
card2contact takes a photo of a business card (or email signature) and returns a clean, validated, deduplicated contact record — enriched with an industry prediction.
[Business Card Image]
↓
OCR (Tesseract / EasyOCR)
↓
NLP Entity Extraction (spaCy + Transformers)
↓
Data Cleaning & Normalization
↓
Deduplication (fuzzy + embeddings)
↓
Industry Classification (ML model)
↓
[Structured CRM-Ready Contact]
card2contact/
├── data/
│ ├── raw_cards/ ← original business card images
│ ├── ground_truth/ ← manually annotated text for evaluation
│ └── companies_industries.csv
├── notebooks/
│ ├── 01_image_preprocessing.ipynb
│ ├── 02_ocr_baseline.ipynb
│ ├── 03_easyocr_comparison.ipynb
│ ├── 04_regex_extractors.ipynb
│ ├── 05_spacy_ner.ipynb
│ ├── 06_transformer_ner.ipynb
│ ├── 07_phone_email_cleaning.ipynb
│ ├── 08_company_normalization.ipynb
│ ├── 09_fuzzy_matching.ipynb
│ ├── 10_embedding_similarity.ipynb
│ ├── 11_eda_industry.ipynb
│ ├── 12_baseline_model.ipynb
│ └── 13_improved_model.ipynb
├── src/
│ ├── ocr.py ← extract_text(image_path) → str
│ ├── extractor.py ← parse_card(raw_text) → dict
│ ├── cleaner.py ← standardize_record(record) → record
│ ├── dedupe.py ← find_duplicates(records) → pairs
│ └── classifier.py ← predict_industry(company_name) → (label, conf)
├── models/
│ └── industry_classifier.pkl
├── app/
│ └── streamlit_app.py
├── tests/
│ └── test_extractor.py
└── docs/
├── architecture.png
└── demo.gif
| Layer | Tools |
|---|---|
| Image Processing | OpenCV, Pillow |
| OCR | Tesseract, EasyOCR |
| NLP / NER | spaCy, Hugging Face Transformers |
| Data Cleaning | pandas, phonenumbers, RapidFuzz |
| Deduplication | sentence-transformers, dedupe |
| ML Modeling | scikit-learn, LightGBM |
| Demo | Streamlit |
| Versioning | Git, GitHub |
# 1. Clone the repo
git clone https://github.com/YOUR_USERNAME/card2contact.git
cd card2contact
# 2. Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run the Streamlit demo
streamlit run app/streamlit_app.py(Will be updated as modules are completed)
| Module | Metric | Score |
|---|---|---|
| OCR | Character Error Rate (CER) | — |
| NER | Field-level Precision / Recall | — |
| Deduplication | Precision / Recall | — |
| Industry Classifier | Macro F1 | — |
- Week 0 — Environment setup, repo structure
- Module 1 — OCR & image preprocessing
- Module 2 — NLP entity extraction (NER)
- Module 3 — Data cleaning & deduplication
- Module 4 — ML industry classifier
- Module 5 — Streamlit demo & deployment
(Each decision is documented as modules are completed)
Example format: "I chose EasyOCR over Tesseract for multilingual cards because..."
MIT — see LICENSE for details.
Built as a portfolio project to explore end-to-end data science: from raw image pixels to production-ready ML inference.