Capstone: Pokemon Card Border Detection
Automated Pokemon Card Border Detection using Computer Vision
Real-World Problem Statement
Pokemon card collectors, grading services, and digital archiving platforms face a common challenge: accurately detecting card boundaries in images taken under varying conditions. Cards may be photographed at angles, in protective sleeves/holders, with different backgrounds, or under inconsistent lighting.
Manual identification of card borders is:
- Time-consuming for large collections
- Error-prone and inconsistent
- Not scalable for commercial grading services
This project builds an automated Pokemon card border detection system that:
- Locates the outer border (physical card edges)
- Identifies the inner border (where artwork/content begins)
- Performs perspective correction to flatten angled cards
- Returns precise corner coordinates for downstream applications (centering analysis, grading automation, digital archiving)
Target Users
- Card grading companies automating quality assessment
- Collectors digitizing and cataloging their collections
- Marketplaces needing standardized card images
- Researchers studying card condition/authenticity
Project Scope
In Scope (What You Will Build)
- Image preprocessing pipeline for card images
- Card localization within an image
- Outer border (physical edge) detection
- Inner border (artwork boundary) detection
- Perspective correction for angled cards
- Coordinate transformation tracking
- Web UI for uploading images and viewing detection results (main interface)
Out of Scope (Not Required)
- Training custom ML models (use pre-trained models)
- Card grading score calculation
- Multi-card detection in single image
- Video processing / real-time detection
- Cloud deployment (local Docker is sufficient)
- Database integration for results storage
Expected Time to Complete
Total Duration: 10-14 days (~1.5-2 weeks)
| Phase | Duration | Activities |
|---|---|---|
| Phase 1: Research & Setup | 2-3 days | Environment setup, research approaches, understand the problem |
| Phase 2: Card Localization | 3-4 days | Implement card detection and isolation from background |
| Phase 3: Border Detection | 3-4 days | Detect outer and inner borders, calculate corners |
| Phase 4: UI & Integration | 2-3 days | Build web UI, testing, documentation |
| Total | 10-14 days | ~1.5-2 weeks |
Prerequisites
Required Knowledge
- Python programming (intermediate level)
- Familiarity with NumPy arrays
- Basic linear algebra (matrices, transformations)
- OpenCV experience
- Deep learning concepts
- Docker basics
- Web UI basics (HTML, CSS, or Python web frameworks like Streamlit/Gradio)
- Git version control basics
Hardware Requirements
- GPU Recommended: NVIDIA GPU with 8GB+ VRAM
- CPU Fallback: Possible but significantly slower
- RAM: 16GB minimum
- Storage: ~5GB for models
Deliverables
Important: Your code must be tracked on GitHub throughout the project. Commit frequently with meaningful messages from day one. Your commit history will be reviewed as part of the evaluation - it demonstrates your development process and professional practices.
1. Working Codebase
A well-organized Python project that:
- Accepts Pokemon card images as input
- Detects outer and inner border corners
- Returns perspective-corrected card image
- Web UI for image upload and result visualization (main interface)
- Runs in Docker container
- Hosted on GitHub with clear commit history
2. README Documentation
Must include:
- Project overview and problem statement
- Installation instructions (local + Docker)
- API usage examples with curl/Python
- Configuration options explained
- Architecture diagram showing your approach
- Sample input/output images
3. Short Write-Up (1-2 pages)
Document your learning journey:
- Technical Decisions: Why you chose specific approaches
- Challenges Faced: Problems encountered and how you solved them
- Key Learnings: New concepts/techniques you mastered
- Future Improvements: What you would add with more time
4. Demo Materials
- 10+ test images with detection results
Evaluation Rubric
Sufficient (Pass)
| Criteria | Requirements |
|---|---|
| Functionality | Detects outer borders on clean, front-facing card images |
| Web UI | Upload image and view detected corners |
| Code Quality | Code runs without errors, basic organization |
| Documentation | README with installation and basic usage |
| Testing | Works on 3+ provided test images |
Good (Competent)
| Criteria | Requirements |
|---|---|
| Functionality | Detects both outer AND inner borders; handles slight angles |
| Web UI | Clear visualization of borders, displays perspective-corrected image |
| Code Quality | Modular design, configuration via environment variables |
| Documentation | Comprehensive README with architecture explanation |
| Testing | Works on 5+ images including some challenging cases |
| Extras | Clean REST API exposing detection functionality |
Excellent (Exceptional)
| Criteria | Requirements |
|---|---|
| Functionality | Robust detection across varied conditions (angles, holders, lighting) |
| Web UI | Polished interface with error handling and loading states |
| Code Quality | Clean architecture, type hints, error handling, logging |
| Documentation | Full docs with diagrams, usage examples, troubleshooting guide |
| Testing | Comprehensive test suite; works on 10+ diverse images |
| Extras | Docker deployment, REST API with health checks, performance metrics |
| Innovation | Novel improvements or additional features beyond requirements |
Checkpoint Milestones
Use these checkpoints to track your progress: