Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

TrendTracer

TrendTracer is a web-based AI media fingerprinting system built for a hackathon setting. It helps a creator or rights-holder upload original videos, generate fingerprints from both the visual and audio content, and then simulate a web-wide scan to detect suspicious reuploads.

The core idea is simple: if someone uploads an original video, the system should be able to recognize similar versions of that content elsewhere, estimate how strong the match is, classify whether the upload appears authorized, and present the result in a clean, understandable dashboard.

The Problem

Creators lose visibility and revenue when their videos are reposted across platforms without permission. In the real world, tracking this manually is slow, fragmented, and hard to scale.

TrendTracer demonstrates a lightweight version of that workflow:

  • Upload an original video
  • Generate visual and audio fingerprints
  • Compare that fingerprint against a simulated “internet”
  • Classify suspicious matches as authorized or unauthorized
  • Assign a risk level based on similarity and repeat occurrences
  • Show trend-style metadata to simulate how copied content spreads over time

What The Demo Does

The current prototype supports three main flows:

  1. Your Videos

    • Upload a video from the frontend
    • The backend stores the file and generates:
      • a visual embedding from extracted frames
      • an audio fingerprint from MFCC features
    • Fingerprints are saved in SQLite
  2. Check Web

    • Runs a local scan against videos inside backend/videos
    • This folder acts as a mock version of the internet
    • Each video in that folder is fingerprinted and compared to uploaded videos
    • Matching results are returned with similarity scores and metadata
    • Metadata is grouped into a trend-style view so the UI can simulate how videos spread across platforms over time
  3. Copyright Strike

    • Converts scan results into violations
    • Marks each result as:
      • authorized if uploaded by official_account
      • unauthorized otherwise
    • Assigns a risk level:
      • high for strong matches or repeated occurrences
      • medium/low otherwise
    • Stores these results in the database for review

Why This Is Interesting

This project is more than a static dashboard. The core backend logic is functional:

  • real video upload handling
  • real frame extraction with OpenCV
  • real feature embedding with a pretrained ResNet model in PyTorch
  • real audio fingerprint extraction with Librosa
  • real similarity comparison using vector math
  • real persistence using SQLite
  • deterministic mock-web scanning for demo reliability

For a hackathon, that balance matters: the project shows an AI-powered media protection workflow, but keeps the “internet scan” local and reproducible so the demo stays stable.

How It Works

1. Video Fingerprinting

When a user uploads a video:

  • the backend saves the file
  • OpenCV extracts frames at intervals
  • PyTorch + torchvision use a pretrained ResNet backbone to generate frame embeddings
  • frame embeddings are averaged into a single visual representation
  • ffmpeg extracts the video’s audio
  • Librosa computes MFCC-based audio features
  • both fingerprints are stored in the database

2. Similarity Matching

During a scan:

  • each mock-web video is fingerprinted using the same pipeline
  • cosine similarity is used to compare visual embeddings
  • only matches above the threshold are returned
  • audio distance is also computed for debugging and internal comparison

3. Violation Analysis

Each scan result is classified by a separate analysis layer:

  • authorization status
  • similarity-based risk
  • repeated occurrence escalation

This makes it easy to change the logic later without rewriting the scanner.

Tech Stack

Frontend

  • React
  • Vite
  • Tailwind CSS

The frontend provides a simple 3-page workflow:

  • upload source videos
  • run scan simulation
  • review violations and trend activity

Backend

  • FastAPI
  • SQLAlchemy
  • SQLite

The backend exposes the API, stores video records and violation records, and orchestrates the fingerprinting and scan logic.

AI / Media Processing

  • OpenCV for video frame extraction
  • PyTorch + torchvision for pretrained visual embeddings
  • Librosa for MFCC-based audio fingerprinting
  • NumPy for aggregation and similarity math
  • ffmpeg for audio extraction from video files

Project Structure

TrendTracer/
├── frontend/
│   ├── src/
│   │   ├── components/
│   │   ├── App.jsx
│   │   └── index.css
├── backend/
│   ├── database/
│   │   ├── db.py
│   │   └── models.py
│   ├── services/
│   │   ├── analysis.py
│   │   ├── audio_processing.py
│   │   ├── embedding.py
│   │   ├── fingerprinting.py
│   │   ├── scanner.py
│   │   └── video_processing.py
│   ├── videos/
│   │   └── metadata.json
│   └── main.py
└── README.md

Main API Endpoints

  • POST /upload-video

    • uploads a video
    • generates visual and audio fingerprints
    • stores the result
  • GET /videos

    • lists uploaded videos and stored fingerprint sizes
  • POST /scan

    • scans the local mock-internet folder
    • returns:
      • summary stats
      • matching results
      • trend data
      • metadata used in the simulation
    • also stores classified violations
  • GET /violations

    • returns stored violation records for the frontend

Demo Story For Judges

A good way to present TrendTracer in a hackathon demo:

  1. Upload an original video in Your Videos
  2. Explain that the system fingerprints both visuals and audio
  3. Move to Check Web
  4. Trigger the scan and explain that backend/videos is acting as a controlled simulation of the web
  5. Show similarity scores and metadata
  6. Highlight the trend chart as a simulation of how reposted content appears over time across platforms
  7. Move to Copyright Strike
  8. Show how the system turns raw matches into actionable risk and authorization insights

That tells a full story: ingestion, AI analysis, match detection, and decision support.

Why The “Web Scan” Is Simulated

Real web scraping is noisy, rate-limited, and unreliable for a hackathon demo. Instead of pretending to scrape live platforms, TrendTracer uses a local folder as a mock internet.

This gives three benefits:

  • deterministic results
  • faster demos
  • easier debugging and testing

The important part is that the fingerprinting and comparison pipeline is real, even if the external source is simulated.

Current Status

This prototype already supports:

  • working frontend upload flow
  • working backend fingerprint generation
  • stored video records
  • local scan simulation
  • violation classification
  • trend-style metadata visualization

Possible future upgrades:

  • CLIP-based multimodal embeddings
  • approximate nearest-neighbor search for larger datasets
  • real platform integrations
  • takedown workflow automation
  • creator analytics and reporting exports

Summary

TrendTracer is a practical demo of AI-assisted copyright monitoring. It combines media fingerprinting, similarity search, metadata-driven trend simulation, and violation scoring into one clean experience.

For a hackathon, it shows a believable product direction with real technical substance behind the interface.

About

AI platform fingerprinting digital media via visual & audio analysis to detect and track unauthorized content usage.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages