Spaces:
Sleeping
Sleeping
Lovish Singla
commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,8 +11,34 @@ sdk_version: 1.41.1
|
|
| 11 |
|
| 12 |
This is a Streamlit app that allows users to upload a 60-second video and extract the best 20 frames using three methods:
|
| 13 |
1. **Motion-Based Selection**: Frames with the most motion.
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
The app first converts the video to 15 FPS and then applies the frame selection methods.
|
| 18 |
|
|
|
|
| 11 |
|
| 12 |
This is a Streamlit app that allows users to upload a 60-second video and extract the best 20 frames using three methods:
|
| 13 |
1. **Motion-Based Selection**: Frames with the most motion.
|
| 14 |
+
|
| 15 |
+
Compute the absolute difference between consecutive frames.
|
| 16 |
+
|
| 17 |
+
Frames with higher differences indicate more motion.
|
| 18 |
+
|
| 19 |
+
Select the top 5 frames with the highest motion scores.
|
| 20 |
+
|
| 21 |
+
3. **Scene Change-Based Selection**: Frames where significant scene changes occur.
|
| 22 |
+
Select frames where significant scene changes occur.
|
| 23 |
+
|
| 24 |
+
How It Works:
|
| 25 |
+
|
| 26 |
+
Compare histograms of consecutive frames.
|
| 27 |
+
|
| 28 |
+
If the histogram difference exceeds a threshold, consider it a scene change.
|
| 29 |
+
|
| 30 |
+
Select the top 20 frames where scene changes are detected.
|
| 31 |
+
|
| 32 |
+
5. **Clustering-Based Selection**: Representative frames from different clusters.
|
| 33 |
+
Select diverse and representative frames by grouping similar frames.
|
| 34 |
+
|
| 35 |
+
How It Works:
|
| 36 |
+
|
| 37 |
+
Extract features from each frame using a pre-trained model (e.g., VGG16).
|
| 38 |
+
|
| 39 |
+
Use K-Means clustering to group similar frames into clusters.
|
| 40 |
+
|
| 41 |
+
Select one representative frame from each cluster.
|
| 42 |
|
| 43 |
The app first converts the video to 15 FPS and then applies the frame selection methods.
|
| 44 |
|