camera-detector / README.md
SaadetElizavetaBabal's picture
Update README.md
d68704f verified
---
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
![Camera Detector Screenshot](https://github.com/user-attachments/assets/90a2831b-2218-42a6-8172-f3ee63661157)
## πŸš€ Live App
πŸ”— [Click here to try the app online](https://your-deployment-url.com)
(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:
```bash
git clone https://github.com/yourusername/camera-detector.git
cd camera-detector
pip install -r requirements.txt
streamlit run app.py
```
## πŸ“ File Structure
```bash
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:
```bash
πŸ“Œ 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