Update README.md
Browse files
README.md
CHANGED
|
@@ -1,89 +1,101 @@
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Camera Movement Detector
|
| 3 |
+
emoji: "π·"
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: pink
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
sdk_version: "1.25.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
# π· Camera Movement Detector
|
| 14 |
+
|
| 15 |
+
This project was developed as part of the **ATP Core Talent AI Coder Challenge 2025**.
|
| 16 |
+
It is a Streamlit-based web application that analyzes uploaded videos and detects **significant camera movements** such as panning, tilting, or shaking.
|
| 17 |
+
It does **not** focus on object motion β instead, it detects changes in the global scene indicating that the camera itself moved.
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## π· Screenshot
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+
## π Live App
|
| 26 |
+
|
| 27 |
+
π [Click here to try the app online](https://your-deployment-url.com)
|
| 28 |
+
(Replace this with your Streamlit or Hugging Face link after deployment)
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## π― Features
|
| 33 |
+
|
| 34 |
+
- πΌ Upload a video (MP4, AVI, MOV)
|
| 35 |
+
- ποΈ Extracts and analyzes frames
|
| 36 |
+
- π― Detects significant camera movement (not object motion)
|
| 37 |
+
- π‘ Clean, modern UI with ATP branding
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## π§ Approach
|
| 42 |
+
|
| 43 |
+
- **Frame Extraction:** Extracts all frames from the video using OpenCV.
|
| 44 |
+
- **Feature Detection & Matching:** ORB feature detector is used to compare consecutive frames.
|
| 45 |
+
- **Homography Transformation:** Calculates transformation matrix to estimate global scene shift.
|
| 46 |
+
- **Movement Decision:** If the transformation deviates above a threshold, it is classified as camera movement.
|
| 47 |
+
- **Bonus Logic:** Tries to filter out object motion by comparing matched keypoints and transformation consistency.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## π οΈ Tech Stack
|
| 52 |
+
|
| 53 |
+
- **Python 3.13**
|
| 54 |
+
- **OpenCV**
|
| 55 |
+
- **Streamlit** (for UI)
|
| 56 |
+
- **Datasets** from Hugging Face (for CameraBench demo data)
|
| 57 |
+
- **NumPy** for numerical processing
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## π¦ Installation
|
| 62 |
+
|
| 63 |
+
To run locally:
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
git clone https://github.com/yourusername/camera-detector.git
|
| 67 |
+
cd camera-detector
|
| 68 |
+
pip install -r requirements.txt
|
| 69 |
+
streamlit run app.py
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## π File Structure
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
camera-detector/
|
| 76 |
+
βββ app.py # Streamlit web UI
|
| 77 |
+
βββ movement_detector.py # Core detection logic
|
| 78 |
+
βββ requirements.txt # Dependencies
|
| 79 |
+
βββ README.md # This file
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### πΈ Example Output
|
| 83 |
+
|
| 84 |
+
Input: Sample video with camera shake
|
| 85 |
+
|
| 86 |
+
#### Output:
|
| 87 |
+
|
| 88 |
+
```bash
|
| 89 |
+
|
| 90 |
+
π Detected camera movement at frame indices: [6, 7, 8, 10, 15, 22, 23, 24]
|
| 91 |
+
```
|
| 92 |
+
## π¬ Acknowledgements
|
| 93 |
+
|
| 94 |
+
* Hugging Face CameraBench Dataset
|
| 95 |
+
* ATP Core Talent Team for organizing the challenge
|
| 96 |
+
|
| 97 |
+
## π§βπ» Developed by
|
| 98 |
+
|
| 99 |
+
* Saadet Elizaveta Babal
|
| 100 |
+
* Candidate β ATP Core Talent AI Coder Challenge 2025
|
| 101 |
+
|