A full-stack web application that automatically detects and masks Personally Identifiable Information (PII) from images.
- Image Upload: Drag and drop or click to upload images
- PII Detection: Automatically detects names, addresses, dates, phone numbers, emails, and ID numbers
- Real-time Masking: Masks detected PII with black rectangles
- Download Result: Download the masked image
- Modern UI: Clean, responsive interface built with React
- FastAPI: Modern Python web framework
- OpenCV: Image processing and masking
- Tesseract OCR: Text extraction from images
- Pandas: Data processing
- Pillow: Image manipulation
- Uvicorn: ASGI server
- React.js: Modern UI framework
- TypeScript: Type safety
- Tailwind CSS: Styling
- Axios: HTTP client
- React Dropzone: File upload handling
mindcraft/
├── backend/
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py
│ │ ├── models.py
│ │ ├── services/
│ │ │ ├── __init__.py
│ │ │ ├── ocr_service.py
│ │ │ ├── pii_detector.py
│ │ │ └── image_processor.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ └── helpers.py
│ ├── requirements.txt
│ └── uploads/
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── services/
│ │ ├── types/
│ │ └── App.tsx
│ ├── package.json
│ └── tailwind.config.js
└── README.md
- Navigate to backend directory
- Create virtual environment:
python -m venv venv - Activate virtual environment:
- Windows:
venv\Scripts\activate - Unix/MacOS:
source venv/bin/activate
- Windows:
- Install dependencies:
pip install -r requirements.txt - Run server:
uvicorn app.main:app --reload
- Navigate to frontend directory
- Install dependencies:
npm install - Start development server:
npm start
POST /upload-image: Upload and process image for PII detectionGET /health: Health check endpoint
- Names: Full names, first names, last names
- Addresses: Street addresses, cities, states
- Dates: Birth dates, issue dates, expiry dates
- Phone Numbers: Various formats (Indian and international)
- Email Addresses: Standard email format validation
- ID Numbers: Aadhaar numbers, PAN numbers, etc.
This project demonstrates:
- Full-stack development with Python and React
- Image processing and OCR techniques
- PII detection using regex and NLP
- Modern web development practices
- API design and integration
- File upload and processing
- Real-time image manipulation