How samarth6840/contextlens works
ADSCENE analyzes uploaded video to identify brands and context, then presents evidence and collaboration recommendations. Its principal workflow runs through the Flask job API into the multimodal pipeline: visual and audio evidence is extracted, resolved and fused, then used for recommendations and unknown-brand identification. A separate Streamlit interface also exposes pipeline analysis. The README is empty and the pipeline/server excerpts are partial, so several component links reflect documented layer responsibilities rather than inspected call sites; uncertain integrations are omitted.
Main entry points: pipeline.py Analysis pipeline · server.py Flask API · app.js ADSCENE frontend · app.py Streamlit interface
Components 23
User Interfaces
- ADSCENE frontend
static/app.js - Streamlit interface
app.py
Job Orchestration
- Flask API
server.py - Background jobs
server.py - Analysis pipeline
src/pipeline.py
Evidence Extraction
- Visual embeddings
src/layer1/visual_embeddings.py - Object detection
src/layer1/detector.py - Logo detection
src/layer1/logo_detector.py - Text recognition
src/layer1/ocr.py - Speech and audio
src/layer1/audio.py - Vision-language model
src/layer1/qwen3vl.py - Product index
src/layer1/product_index.py
Brand Reasoning
- Brand resolution
src/layer2/brand_resolver.py - Evidence fusion
src/layer2/fusion.py - Quality estimation
src/layer2/quality_estimator.py - Confidence scoring
src/layer2/confidence.py - Spatial labels
src/layer2/spatial_label.py - Brand catalog
src/brand_catalog.py - Unknown-brand search
src/openset.py - Brand knowledge graph
src/layer3/knowledge_graph.py - Brand recommendations
src/layer3/recommender.py
Other components
- Video creator
- Web browser
Connections 26
- Video creator → Web browser: selects video
- Web browser → ADSCENE frontend: uploads video
- ADSCENE frontend → Flask API: calls API
- Flask API → Background jobs: queues analysis
- Background jobs → Analysis pipeline: runs analysis
- Flask API → ADSCENE frontend: serves frontend
- Web browser → Streamlit interface: uploads video
- Streamlit interface → Analysis pipeline: runs analysis
- Analysis pipeline → Visual embeddings: extracts features
- Analysis pipeline → Object detection: detects objects
- Analysis pipeline → Logo detection: detects logos
- Analysis pipeline → Text recognition: extracts text
- Analysis pipeline → Speech and audio: analyzes audio
- Analysis pipeline → Vision-language model: analyzes frames
- Analysis pipeline → Product index: queries matches
- Analysis pipeline → Brand resolution: resolves brands
- Analysis pipeline → Evidence fusion: fuses evidence
- Analysis pipeline → Quality estimation: estimates quality
- Analysis pipeline → Confidence scoring: scores evidence
- Analysis pipeline → Spatial labels: labels spatial context
- Analysis pipeline → Brand catalog: builds text queries
- Flask API → Unknown-brand search: identifies unknowns
- Flask API → Brand recommendations: reads recommendations
- Brand recommendations → Brand knowledge graph: queries graph
- Flask API → Web browser: returns results
- Analysis pipeline → Flask API: returns analysis