Inspiration

Modern cities rely heavily on CCTV surveillance, but reviewing footage is extremely time-consuming. Investigators and security teams often need to watch hours of video to find a few important moments. We wanted to solve this problem by building an AI system that can automatically analyze long CCTV videos and highlight key events in minutes instead of hours.


What it does

AI CCTV Intelligence System transforms long surveillance footage into a structured and searchable timeline of events. Users can upload CCTV videos, and the system automatically extracts frames, analyzes them with AI, detects people, vehicles, objects, and suspicious activities, and generates a concise event timeline. The dashboard allows users to filter events, view summaries, and search the timeline using natural language queries.


How we built it

We built the system using a modular AI pipeline:

  • OpenCV for video processing and frame extraction
  • Gemini 2.5 Flash Vision API for analyzing frames and detecting events
  • FastAPI as the backend service handling video processing and AI requests
  • Streamlit for an interactive dashboard interface
  • Python-based timeline engine to merge, deduplicate, and structure detected events into a clean JSON timeline
  • Natural language search module that allows users to query the timeline easily

This architecture allows efficient processing and scalable analysis of long CCTV footage.


Challenges we ran into

One major challenge was efficiently processing long videos without excessive computation time. Extracting meaningful frames while avoiding redundant analysis required careful frame sampling and optimization. Another challenge was merging AI-detected events into a clean timeline without duplicates. Integrating the AI analysis with the real-time Streamlit dashboard while maintaining smooth performance was also tricky.


Accomplishments that we're proud of

We successfully built a working AI pipeline that can transform hours of CCTV footage into a concise event timeline. The system automatically detects activities and presents them in a searchable interface, making investigation significantly faster. We are especially proud of integrating AI vision analysis with a real-time dashboard and natural language search capability.


What we learned

Through this project we learned how to integrate AI vision models with traditional video processing pipelines. We gained experience building scalable backend systems with FastAPI and creating user-friendly AI dashboards with Streamlit. We also learned how important data structuring and event deduplication are when working with AI-generated insights.


What's next for AI CCTV Intelligence System

We plan to expand the system with real-time CCTV stream analysis instead of only uploaded videos. Future improvements include anomaly detection, facial recognition integration, multi-camera event correlation, and advanced AI models for more accurate activity detection. We also want to deploy the platform on the cloud so it can scale for smart city surveillance and security operations.

Built With

  • fastapi
  • gemini-2.5-flash-vision-api
  • google-genai-sdk
  • json
  • opencv
  • python
  • streamlit
  • uvicorn
Share this project:

Updates