How phoenix1854/ai-detector-videos-extention works
The product is a browser extension backed by a local Flask service that classifies videos from their URLs. Its main workflow detects supported video-page URLs, downloads a video, samples frames for model inference, and displays the returned verdict. The source shows the API and inference implementation; broader platform support is documented in the README.
Main entry points: app.py Flask API · detector_logic.py Model Loading · content.js URL Detection and Overlay · content.css Overlay Styles
Components 16
Browser Extension
- URL Detection and Overlay
extention-server/frontend/content.js - Overlay Styles
extention-server/frontend/content.css
API and Download
- Flask API
extention-server/backend/app.py - yt-dlp Downloader
- Temporary Video
extention-server/backend/app.py
Video Inference
- Model Loading
extention-server/backend/detector_logic.py - CLIP Image Encoder
extention-server/backend/detector_logic.py - CLIP Processor
extention-server/backend/detector_logic.py - MLP Classifier
extention-server/backend/detector_logic.py - Classifier Weights
extention-server/backend/best_nn_classifier_FINAL.pth - Video Analysis
extention-server/backend/detector_logic.py - Frame Sampling
extention-server/backend/detector_logic.py - Frame Inference
extention-server/backend/detector_logic.py - Image Analysis
extention-server/backend/detector_logic.py - Aggregated Verdict
extention-server/backend/detector_logic.py
Other components
- Video Page
Connections 18
- Video Page → URL Detection and Overlay: exposes URL
- URL Detection and Overlay → Flask API: POSTs URL
- Flask API → yt-dlp Downloader: downloads video
- yt-dlp Downloader → Temporary Video: writes file
- Flask API → Video Analysis: processes file
- Flask API → Model Loading: loads at startup
- Model Loading → Classifier Weights: reads weights
- Model Loading → CLIP Image Encoder: loads model
- Model Loading → CLIP Processor: loads processor
- Model Loading → MLP Classifier: creates classifier
- Video Analysis → Frame Sampling: samples frames
- Frame Sampling → Frame Inference: infers on frames
- Frame Inference → CLIP Processor: prepares images
- Frame Inference → CLIP Image Encoder: extracts features
- Frame Inference → MLP Classifier: scores features
- Video Analysis → Aggregated Verdict: aggregates scores
- Flask API → URL Detection and Overlay: returns JSON
- URL Detection and Overlay → Overlay Styles: styles overlay