RealDeal is an AI-powered authentication platform that verifies the authenticity of physical products, digital media, and information through advanced computer vision and natural language processing.
- ποΈ Physical Products - Authenticate luxury goods, sneakers, collectibles, electronics
- π€ AI-Generated Content - Detect deepfakes and synthetic media
- π° News & Information - Fact-check claims and verify sources
- π€ People - Research backgrounds and detect red flags
- Python
- Flask
- PyTorch
- NumPy
- Scikit-learn
- OpenCV
- Nuxt
- Vue.js
- TypeScript
- TailwindCSS
- Google Gemini
- Groq (LLaMA 3.1)
- Supabase
- SerpAPI
- Dynamic Criteria Generation - AI searches the web for brand-specific authentication markers
- Guided Photo Capture - Step-by-step instructions for capturing specific angles
- Multi-Criterion Analysis - Parallel scoring of stitching, logos, materials, hardware
- Image Similarity Scoring - SIFT, color histograms, SSIM, edge detection
- Trust-Scored References - Prioritizes official brand sites over resale platforms
- Real-Time Price Verification - Validates market value using web search
- Custom ResNet50 Model - Trained on extensive Real/Fake dataset
- Instant Pre-Check - Analyzes images before any other processing
- Configurable Threshold - Adjustable confidence levels (default: 60%)
- Multi-Model Support - Extensible architecture for additional models
- Claim Extraction - Automatically identifies factual statements
- Web Search Verification - Cross-references with reliable sources
- Source Credibility Rating - Evaluates trustworthiness of sources
- Evidence-Based Verdicts - TRUE/FALSE/PARTIALLY TRUE with explanations
- Background Investigation - Searches for controversies, crimes, records
- Fakeness Score (0-100) - Quantifies trustworthiness
- Red Flag Detection - Highlights serious concerns
- Source Citations - Verifies information reliability
graph TB
subgraph "Frontend (Nuxt 3 + Vue 3)"
UI[User Interface]
Camera[Camera System]
Upload[File Upload]
end
subgraph "Backend (Flask API)"
API[API Gateway]
ItemDetect[Item Detection]
DeepfakeCheck[Deepfake Detection]
Criteria[Criteria Generation]
Analysis[Counterfeit Analysis]
FactCheck[Fact Checking]
PersonResearch[Person Research]
end
subgraph "AI Services"
Gemini[Google Gemini 2.5 Pro]
GeminiFlash[Gemini Flash]
PyTorch[PyTorch ResNet50]
Groq[Groq LLaMA]
end
subgraph "External APIs"
SerpAPI[SerpAPI / Google Lens]
GoogleSearch[Google Search]
Supabase[Supabase Storage]
end
UI --> Camera
UI --> Upload
Camera --> API
Upload --> API
API --> ItemDetect
ItemDetect --> DeepfakeCheck
DeepfakeCheck --> Criteria
Criteria --> Analysis
API --> FactCheck
API --> PersonResearch
ItemDetect --> Gemini
DeepfakeCheck --> PyTorch
Criteria --> Gemini
Criteria --> GoogleSearch
Analysis --> GeminiFlash
FactCheck --> Gemini
FactCheck --> GoogleSearch
PersonResearch --> GeminiFlash
PersonResearch --> GoogleSearch
ItemDetect --> Groq
ItemDetect --> SerpAPI
API --> Supabase
style UI fill:#00DC82
style API fill:#3178C6
style Gemini fill:#4285F4
style PyTorch fill:#EE4C2C
graph LR
subgraph "API Layer"
Flask[Flask Server]
end
subgraph "Detection Modules"
Item[item_detection.py]
AIDetect[ai_detection/]
Counterfeit[counterfeit.py]
FactC[fact_check.py]
Person[person.py]
end
subgraph "Support Modules"
Criteria[criteria.py]
ReverseSearch[generate_real_images/]
Similarity[image_similarity_scores/]
Prompts[prompts/]
Parser[llm_parser.py]
end
subgraph "Data Layer"
Cache[(SQLite Cache)]
Uploads[(/uploads)]
end
Flask --> Item
Flask --> AIDetect
Flask --> Counterfeit
Flask --> FactC
Flask --> Person
Item --> Criteria
Item --> ReverseSearch
Counterfeit --> Criteria
Counterfeit --> Similarity
Item --> Prompts
Counterfeit --> Prompts
FactC --> Prompts
Person --> Prompts
Item --> Parser
Counterfeit --> Parser
Criteria --> Cache
Flask --> Uploads
sequenceDiagram
participant U as User
participant FE as Frontend
participant API as Flask API
participant DF as Deepfake Detector
participant ID as Item Detection
participant RS as Reverse Search
participant CG as Criteria Generator
participant CA as Counterfeit Analyzer
participant SS as Similarity Scorer
U->>FE: Upload/Capture Image
FE->>API: POST /detect
API->>DF: Check if AI-generated
alt Is Deepfake (β₯60%)
DF-->>API: Deepfake Detected
API-->>FE: Return Deepfake Warning
FE-->>U: Show AI Detection Alert
else Not Deepfake
DF-->>API: Authentic Image
API->>ID: Analyze Image
ID->>RS: Reverse Image Search
RS-->>ID: Reference Images + Trust Scores
ID->>ID: Extract Product Name
ID-->>API: Product Detected + References
API-->>FE: Detection Result + Product Info
FE-->>U: Show Product Modal
U->>FE: Confirm & Specify Brand (optional)
FE->>API: POST /criteria/:id
API->>CG: Generate Criteria
CG->>CG: Search Web for Auth Markers
CG-->>API: Criteria + Locations
API-->>FE: Guided Photo Instructions
FE-->>U: Show Step-by-Step Guide
loop For Each Criterion
U->>FE: Capture Angle Photo
FE->>FE: Store Image
end
FE->>API: POST /analyze/:id (all images)
API->>SS: Calculate Similarity Scores
SS-->>API: Similarity Results
par Parallel Analysis
API->>CA: Analyze Criterion 1
API->>CA: Analyze Criterion 2
API->>CA: Analyze Criterion N
end
CA-->>API: Aggregated Results
API->>API: Calculate Overall Score
API-->>FE: Authentication Report
FE-->>U: Show Results (Authentic/Counterfeit)
end
flowchart TD
Start([User Uploads Image]) --> Upload[Save Image to /uploads]
Upload --> DeepfakeCheck{Run Deepfake<br/>Detection Model}
DeepfakeCheck -->|Probability β₯ 0.6| Flagged[Flag as AI-Generated]
DeepfakeCheck -->|Probability < 0.6| Continue[Continue to<br/>Item Detection]
Flagged --> CalcConfidence[Calculate Confidence Level]
CalcConfidence --> ShowWarning[Return Deepfake Warning]
ShowWarning --> End1([End: Show Alert to User])
Continue --> ItemDetect[Detect Item Type]
ItemDetect --> TypeCheck{Item Type?}
TypeCheck -->|Product| ProductFlow[Product Authentication Flow]
TypeCheck -->|Person| PersonFlow[Person Research Flow]
TypeCheck -->|Text| FactCheckFlow[Fact-Check Flow]
TypeCheck -->|Other| GeminiAnalysis[General AI Analysis]
ProductFlow --> End2([Continue Product Auth])
PersonFlow --> End3([Research Person])
FactCheckFlow --> End4([Verify Claims])
GeminiAnalysis --> End5([Return Analysis])
style Flagged fill:#ff6b6b
style ShowWarning fill:#ff6b6b
style Continue fill:#51cf66
style DeepfakeCheck fill:#ffd43b
flowchart LR
A[Image with Text] --> B[Extract Claims via OCR + AI]
B --> C{Contains<br/>Factual Claims?}
C -->|No| D[Return: No Claims Found]
C -->|Yes| E[For Each Claim]
E --> F[Search Web for Evidence]
F --> G[Evaluate Sources]
G --> H[Cross-Reference Multiple Sources]
H --> I{Verdict}
I -->|Supported| J[TRUE]
I -->|Contradicted| K[FALSE]
I -->|Mixed| L[PARTIALLY TRUE]
I -->|Insufficient| M[UNVERIFIABLE]
J --> N[Compile Report]
K --> N
L --> N
M --> N
N --> O[Calculate Confidence Score]
O --> P[Return Results]
style J fill:#51cf66
style K fill:#ff6b6b
style L fill:#ffd43b
style M fill:#868e96
graph TD
URL[URL/Domain] --> Extract[Extract Domain]
Extract --> Known{Known Brand?}
Known -->|Yes| Official[Official Brand Site]
Known -->|No| Dynamic[Dynamic Scoring]
Official --> Score10[Trust Score: 1.0]
Dynamic --> HTTPS{HTTPS?}
HTTPS -->|Yes| Base1[Base: 0.4]
HTTPS -->|No| Base2[Base: 0.3]
Base1 --> Indicators
Base2 --> Indicators
Indicators[Check Indicators] --> Official2{Has 'official'<br/>'authorized'<br/>'certified'?}
Official2 -->|Yes| Plus1[+0.15]
Official2 -->|No| Plus2[+0.0]
Plus1 --> Platform
Plus2 --> Platform
Platform{E-commerce<br/>Platform?} -->|Yes| MinTrust[Min Trust: 0.5]
Platform -->|No| RedFlags
MinTrust --> RedFlags
RedFlags{Red Flags?<br/>'replica'<br/>'fake'<br/>'cheap'} -->|Yes| Penalty[-0.3]
RedFlags -->|No| Boost
Penalty --> Final
Boost[Frequency Boost] --> Final[Final Trust Score]
Final --> Clamp[Clamp to 0.0-1.0]
style Score10 fill:#51cf66
style Official fill:#51cf66
style Penalty fill:#ff6b6b
style RedFlags fill:#ffd43b
- Python 3.11+
- Node.js 18+
- API Keys (see below)
Create a .env file in the backend/ directory:
# AI Services
GEMINI_API_KEY=your_gemini_api_key
GROQ_API_KEY=your_groq_api_key
# Search & Storage
SERPAPI_API_KEY=your_serpapi_key
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_key# Navigate to backend
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run Flask server
python main.py# Navigate to frontend
cd frontend
# Install dependencies
npm install
# Run development server
npm run dev- Verify luxury goods before purchase (Poshmark, eBay, Grailed)
- Authenticate sneakers (StockX, GOAT validation)
- Check collectibles (trading cards, limited editions)
- Detect AI-generated profile pictures
- Fact-check viral claims and screenshots
- Verify news sources
- Research people before meetings (dating, business)
- Verify online identities
- Check backgrounds for hiring
- Monitor counterfeit products
- Protect intellectual property
- Maintain brand reputation
RealDeal/
βββ backend/
β βββ ai_detection/ # Deepfake detection module
β β βββ model.py # ResNet50 model architecture
β β βββ inference.py # Inference wrapper
β β βββ deepfake_model.pth # Trained model weights
β β βββ Dataset/ # Training data (Real/Fake)
β βββ generate_real_images/ # Reverse image search
β β βββ image_searcher.py # Google Lens integration
β β βββ trust_scorer.py # Domain trust scoring
β β βββ brand_detector.py # Brand identification
β β βββ utils.py # Helper functions
β βββ image_similarity_scores/ # Image comparison
β β βββ similarity_calculator.py # Multi-metric scoring
β β βββ feature_extractors.py # SIFT, color, edge
β β βββ comparison_analyzer.py # High-level API
β βββ prompts/ # AI prompt templates
β β βββ criteria.py
β β βββ counterfeit.py
β β βββ fact_check.py
β β βββ person.py
β βββ main.py # Flask API server
β βββ criteria.py # Criteria generation
β βββ counterfeit.py # Counterfeit analysis
β βββ fact_check.py # Fact checking
β βββ person.py # Person research
β βββ item_detection.py # Item classification
β βββ llm_parser.py # JSON parsing
β βββ upload_image.py # Supabase integration
β βββ requirements.txt # Python dependencies
β βββ criteria_cache.db # SQLite cache
β
βββ frontend/
β βββ pages/
β β βββ index.vue # Landing page
β β βββ detect.vue # Detection interface
β βββ components/
β β βββ CameraView.vue
β β βββ CriteriaCapture.vue
β β βββ DetectionResults.vue
β β βββ AnalysisResults.vue
β β βββ DeepfakeResults.vue
β β βββ PersonInput.vue
β β βββ PersonResults.vue
β β βββ FactCheckResults.vue
β βββ assets/
β β βββ css/
β β βββ images/
β βββ nuxt.config.ts # Nuxt configuration
β βββ package.json # Node dependencies
β βββ tsconfig.json # TypeScript config
β
βββ README.md # This file
1. Image Upload β Deepfake Pre-Check
ββ IF deepfake probability β₯ 60% β STOP, show warning
ββ ELSE β Continue
2. Item Detection (Gemini Vision)
ββ Classify: product/person/text/other
ββ Extract: product name, brand, description
3. Reverse Image Search (Google Lens)
ββ Find similar images
ββ Extract reference images from trusted sources
ββ Calculate trust scores (official brand = 1.0)
ββ Detect brand from search results
4. Criteria Generation (Gemini + Web Search)
ββ Search web for authentication guides
ββ Extract key features: logo, stitching, materials
ββ Generate photo instructions
ββ Cache with semantic similarity
5. Guided Photo Capture (Frontend)
ββ Show criterion 1 β Capture
ββ Show criterion 2 β Capture
ββ ... β Submit all images
6. Parallel Analysis (ThreadPoolExecutor)
ββ Criterion 1 β Gemini Flash β Score 1-5
ββ Criterion 2 β Gemini Flash β Score 1-5
ββ Criterion N β Gemini Flash β Score 1-5
7. Image Similarity (OpenCV)
ββ SIFT feature matching (25%)
ββ Color histogram (35%)
ββ SSIM structural (20%)
ββ Edge detection (15%)
ββ Shape analysis (5%)
8. Final Verdict
ββ Aggregate scores β Overall confidence
ββ Calculate risk level
ββ Generate recommendations
ββ Return report to user
base_score = 0.3 # Unknown domains
# Factors:
+ 1.0 if official brand domain (hardcoded)
+ 0.1 if HTTPS
+ 0.15 if 'official', 'authorized', 'certified' in domain
+ 0.5 if e-commerce platform (Amazon, eBay, etc.)
- 0.3 if 'replica', 'fake', 'cheap' in domain/path
+ 0.15 if domain appears 3+ times in results
+ 0.08 if domain appears 2 times
final_score = clamp(base_score + adjustments, 0.0, 1.0)cd backend
# Test reverse image search
python test_materials/test_reverse_search.py
# Test similarity scoring
python test_materials/example_similarity_usage.py
# Test item detection
python item_detection.py
# Test fact checking
python fact_check.py test_materials/fact_check.png# Test deepfake detection
cd backend/ai_detection
python inference.py path/to/image.jpg deepfake_model.pth









