A newer version of the Streamlit SDK is available:
1.48.0
metadata
title: Camera Movement Detector
emoji: π·
colorFrom: red
colorTo: pink
sdk: streamlit
sdk_version: 1.25.0
app_file: app.py
pinned: false
π· Camera Movement Detector
This project was developed as part of the ATP Core Talent AI Coder Challenge 2025.
It is a Streamlit-based web application that analyzes uploaded videos and detects significant camera movements such as panning, tilting, or shaking.
It does not focus on object motion β instead, it detects changes in the global scene indicating that the camera itself moved.
π· Screenshot
π Live App
π Click here to try the app online
(Replace this with your Streamlit or Hugging Face link after deployment)
π― Features
- πΌ Upload a video (MP4, AVI, MOV)
- ποΈ Extracts and analyzes frames
- π― Detects significant camera movement (not object motion)
- π‘ Clean, modern UI with ATP branding
π§ Approach
- Frame Extraction: Extracts all frames from the video using OpenCV.
- Feature Detection & Matching: ORB feature detector is used to compare consecutive frames.
- Homography Transformation: Calculates transformation matrix to estimate global scene shift.
- Movement Decision: If the transformation deviates above a threshold, it is classified as camera movement.
- Bonus Logic: Tries to filter out object motion by comparing matched keypoints and transformation consistency.
π οΈ Tech Stack
- Python 3.13
- OpenCV
- Streamlit (for UI)
- Datasets from Hugging Face (for CameraBench demo data)
- NumPy for numerical processing
π¦ Installation
To run locally:
git clone https://github.com/yourusername/camera-detector.git
cd camera-detector
pip install -r requirements.txt
streamlit run app.py
π File Structure
camera-detector/
βββ app.py # Streamlit web UI
βββ movement_detector.py # Core detection logic
βββ requirements.txt # Dependencies
βββ README.md # This file
πΈ Example Output
Input: Sample video with camera shake
Output:
π Detected camera movement at frame indices: [6, 7, 8, 10, 15, 22, 23, 24]
π¬ Acknowledgements
- Hugging Face CameraBench Dataset
- ATP Core Talent Team for organizing the challenge
π§βπ» Developed by
- Saadet Elizaveta Babal
- Candidate β ATP Core Talent AI Coder Challenge 2025