File size: 2,615 Bytes
d68704f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
---
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](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
|