
LookingGlass is a production-grade distributed face recognition system that combines state-of-the-art computer vision techniques with efficient vector search capabilities. It's designed to process, analyze, and match faces across large datasets with high accuracy and performance.
It features an intelligent web crawler with advanced anti-detection capabilities, asynchronous processing pipeline, graph analytics for entity relationships, and a modern web interface for both face recognition and text search functionality.
graph TB
%% User Interface Layer
WebUI["๐ Web UI<br/>Lookup Interface"]
User["๐ค User"]
%% Data Collection Layer
Crawler1["๐ท๏ธ Crawler 1<br/>Anti-Detection"]
Crawler2["๐ท๏ธ Crawler 2<br/>Playwright"]
%% Storage Layer
MinIO["๐พ MinIO<br/>Object Storage"]
Redis["๐จ Redis<br/>Message Queue"]
Qdrant["๐ Qdrant<br/>Vector Database"]
Neo4j["๐ธ๏ธ Neo4j<br/>Knowledge Graph"]
%% Processing Layer
RQWorker1["โ๏ธ RQ Worker 1<br/>GPU Processing"]
RQWorker2["โ๏ธ RQ Worker 2<br/>GPU Processing"]
GPUService["๐ฏ GPU Service<br/>Face Recognition"]
GraphWorker["๐ Graph Worker<br/>NER & Relations"]
Analytics["๐ Analytics<br/>Daily Scheduling"]
%% Data Types
Images["๐ผ๏ธ Images"]
Videos["๐ฌ Videos"]
HTMLPages["๐ HTML Pages"]
Faces["๐ค Face Embeddings"]
Audio["๐ต Audio/Transcripts"]
Entities["๐ข Entities & Relations"]
%% User Interactions
User -->|"Upload Image"| WebUI
User -->|"Search Text"| WebUI
WebUI -->|"Face Recognition"| GPUService
%% Crawling Flow
Crawler1 --> MinIO
Crawler2 --> MinIO
%% Data Storage
MinIO --> Images
MinIO --> Videos
MinIO --> HTMLPages
MinIO --> Audio
%% Event-Driven Processing
MinIO -->|"Bucket Notifications"| Redis
Redis --> RQWorker1
Redis --> RQWorker2
%% Face Processing Pipeline
RQWorker1 -->|"Process Media"| GPUService
RQWorker2 -->|"Process Media"| GPUService
GPUService -->|"Store Embeddings"| Qdrant
%% Graph Processing Pipeline
HTMLPages -->|"NER Processing"| GraphWorker
GraphWorker -->|"Extract Entities"| Entities
Entities --> Neo4j
%% Analytics Pipeline
Neo4j --> Analytics
Analytics -->|"PageRank & Communities"| Neo4j
%% Search Results
Qdrant -->|"Similar Faces"| WebUI
Neo4j -->|"Entity Search"| WebUI
%% Styling
classDef userLayer fill:#e1f5fe,stroke:#01579b,stroke-width:2px
classDef storageLayer fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
classDef processingLayer fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px
classDef dataLayer fill:#fff3e0,stroke:#e65100,stroke-width:2px
class User,WebUI userLayer
class MinIO,Redis,Qdrant,Neo4j storageLayer
class RQWorker1,RQWorker2,GPUService,GraphWorker,Analytics,Crawler1,Crawler2 processingLayer
class Images,Videos,HTMLPages,Faces,Audio,Entities dataLayer
# Clone the repository
git clone https://github.com/yourusername/lookingglass.git
cd lookingglass
# Build and start all services
docker compose up --build
# Or use the Makefile
make all
QDRANT_HOST: Qdrant server hostname (default: "qdrant")QDRANT_PORT: Qdrant server port (default: 6333)QDRANT_API_KEY: Qdrant API key (default: "qdrantapikey")MINIO_ROOT_USER: MinIO access key (default: "miniouser")MINIO_ROOT_PASSWORD: MinIO secret key (default: "miniopassword")MINIO_BUCKET: Storage bucket name (default: "scraped")REDIS_URL: Redis connection URL (default: "redis://redis:6379")CUDA_VISIBLE_DEVICES: GPU assignment for workersSTART_URL: Starting URL for crawlingCRAWL_MODE: Crawling mode (default: "image")NEO4J_AUTH: Neo4j credentials (default: "neo4j/password")NEO4J_HOST: Neo4j server hostname (default: "neo4j")Access the lookup interface at http://localhost:5000
POST /lookup
Content-Type: multipart/form-data
Response includes:
GET /queue/stats # Queue statistics
GET /health # Service health check
# Start specific services
make crawler # Start crawlers only
make ui # Start lookup interface
make page # Start graph analytics
# Monitor services
docker compose logs -f rq-worker-1
docker compose logs -f gpu-service
# Scale RQ workers
docker compose up -d --scale rq-worker-1=2 --scale rq-worker-2=2
# Assign specific GPUs to workers
environment:
- CUDA_VISIBLE_DEVICES=0,1,2
# Multiple crawler instances
environment:
- START_URL=https://example.com
- CRAWL_MODE=image
curl http://localhost:5002/queue/stats
Access at http://localhost:7474
Access at http://localhost:9001
Access at http://localhost:6333/dashboard
GPU Memory Issues
Queue Backlog
docker compose up -d --scale rq-worker-1=4curl http://localhost:5002/queue/statsCrawler Blocking
Database Connection Issues
# Check resource usage
docker stats
# Monitor queue processing
docker compose logs -f rq-worker-1
# Verify GPU utilization
nvidia-smi
Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.

LookingGlass is a production-grade distributed face recognition system that combines state-of-the-art computer vision techniques with efficient vector search capabilities. It's designed to process, analyze, and match faces across large datasets with high accuracy and performance.
It features an intelligent web crawler with advanced anti-detection capabilities, asynchronous processing pipeline, graph analytics for entity relationships, and a modern web interface for both face recognition and text search functionality.
graph TB
%% User Interface Layer
WebUI["๐ Web UI<br/>Lookup Interface"]
User["๐ค User"]
%% Data Collection Layer
Crawler1["๐ท๏ธ Crawler 1<br/>Anti-Detection"]
Crawler2["๐ท๏ธ Crawler 2<br/>Playwright"]
%% Storage Layer
MinIO["๐พ MinIO<br/>Object Storage"]
Redis["๐จ Redis<br/>Message Queue"]
Qdrant["๐ Qdrant<br/>Vector Database"]
Neo4j["๐ธ๏ธ Neo4j<br/>Knowledge Graph"]
%% Processing Layer
RQWorker1["โ๏ธ RQ Worker 1<br/>GPU Processing"]
RQWorker2["โ๏ธ RQ Worker 2<br/>GPU Processing"]
GPUService["๐ฏ GPU Service<br/>Face Recognition"]
GraphWorker["๐ Graph Worker<br/>NER & Relations"]
Analytics["๐ Analytics<br/>Daily Scheduling"]
%% Data Types
Images["๐ผ๏ธ Images"]
Videos["๐ฌ Videos"]
HTMLPages["๐ HTML Pages"]
Faces["๐ค Face Embeddings"]
Audio["๐ต Audio/Transcripts"]
Entities["๐ข Entities & Relations"]
%% User Interactions
User -->|"Upload Image"| WebUI
User -->|"Search Text"| WebUI
WebUI -->|"Face Recognition"| GPUService
%% Crawling Flow
Crawler1 --> MinIO
Crawler2 --> MinIO
%% Data Storage
MinIO --> Images
MinIO --> Videos
MinIO --> HTMLPages
MinIO --> Audio
%% Event-Driven Processing
MinIO -->|"Bucket Notifications"| Redis
Redis --> RQWorker1
Redis --> RQWorker2
%% Face Processing Pipeline
RQWorker1 -->|"Process Media"| GPUService
RQWorker2 -->|"Process Media"| GPUService
GPUService -->|"Store Embeddings"| Qdrant
%% Graph Processing Pipeline
HTMLPages -->|"NER Processing"| GraphWorker
GraphWorker -->|"Extract Entities"| Entities
Entities --> Neo4j
%% Analytics Pipeline
Neo4j --> Analytics
Analytics -->|"PageRank & Communities"| Neo4j
%% Search Results
Qdrant -->|"Similar Faces"| WebUI
Neo4j -->|"Entity Search"| WebUI
%% Styling
classDef userLayer fill:#e1f5fe,stroke:#01579b,stroke-width:2px
classDef storageLayer fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
classDef processingLayer fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px
classDef dataLayer fill:#fff3e0,stroke:#e65100,stroke-width:2px
class User,WebUI userLayer
class MinIO,Redis,Qdrant,Neo4j storageLayer
class RQWorker1,RQWorker2,GPUService,GraphWorker,Analytics,Crawler1,Crawler2 processingLayer
class Images,Videos,HTMLPages,Faces,Audio,Entities dataLayer
# Clone the repository
git clone https://github.com/yourusername/lookingglass.git
cd lookingglass
# Build and start all services
docker compose up --build
# Or use the Makefile
make all
QDRANT_HOST: Qdrant server hostname (default: "qdrant")QDRANT_PORT: Qdrant server port (default: 6333)QDRANT_API_KEY: Qdrant API key (default: "qdrantapikey")MINIO_ROOT_USER: MinIO access key (default: "miniouser")MINIO_ROOT_PASSWORD: MinIO secret key (default: "miniopassword")MINIO_BUCKET: Storage bucket name (default: "scraped")REDIS_URL: Redis connection URL (default: "redis://redis:6379")CUDA_VISIBLE_DEVICES: GPU assignment for workersSTART_URL: Starting URL for crawlingCRAWL_MODE: Crawling mode (default: "image")NEO4J_AUTH: Neo4j credentials (default: "neo4j/password")NEO4J_HOST: Neo4j server hostname (default: "neo4j")Access the lookup interface at http://localhost:5000
POST /lookup
Content-Type: multipart/form-data
Response includes:
GET /queue/stats # Queue statistics
GET /health # Service health check
# Start specific services
make crawler # Start crawlers only
make ui # Start lookup interface
make page # Start graph analytics
# Monitor services
docker compose logs -f rq-worker-1
docker compose logs -f gpu-service
# Scale RQ workers
docker compose up -d --scale rq-worker-1=2 --scale rq-worker-2=2
# Assign specific GPUs to workers
environment:
- CUDA_VISIBLE_DEVICES=0,1,2
# Multiple crawler instances
environment:
- START_URL=https://example.com
- CRAWL_MODE=image
curl http://localhost:5002/queue/stats
Access at http://localhost:7474
Access at http://localhost:9001
Access at http://localhost:6333/dashboard
GPU Memory Issues
Queue Backlog
docker compose up -d --scale rq-worker-1=4curl http://localhost:5002/queue/statsCrawler Blocking
Database Connection Issues
# Check resource usage
docker stats
# Monitor queue processing
docker compose logs -f rq-worker-1
# Verify GPU utilization
nvidia-smi
Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.