Video-Summary/README.md

56 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2020-10-07 12:32:41 +00:00
2020-12-29 16:29:13 +00:00
# Video Summary and Classification
2020-12-22 12:58:47 +00:00
## Example:
2022-10-07 21:12:16 +00:00
usage:
2022-10-19 07:29:08 +00:00
main.py input_video.mp4 output_dir ?config_file.json
2022-10-07 21:12:16 +00:00
2020-12-22 12:58:47 +00:00
![docs/demo.gif](./docs/demo.gif)
2020-12-27 20:44:40 +00:00
What you see above is a 15 second excerpt of a 2 minute overlayed synopsis of a 2.5h video from an on campus web cam.
2020-12-22 12:58:47 +00:00
The synopsis took 40 minutes from start to finish on a 8 core machine and used a maximum of 6Gb of RAM.
2020-12-22 13:17:21 +00:00
However since the contour extraction could be performed on a video stream, the benchmark results show that a single core would be enough to process a video faster than real time.
2022-01-09 11:28:05 +00:00
## Heatmap
![](./docs/heatmap_x23.png)
2020-12-22 12:58:47 +00:00
## Benchmark
2020-12-22 13:09:40 +00:00
Below you can find the benchmark results for a 10 minutes clip, with the stacked time per component on the x-axis.
The tests were done on a machine with a Ryzen 3700X with 8 cores 16 threads and 32 Gb of RAM.
2020-12-22 13:17:21 +00:00
On my configuration 1 minutes of of the original Video can be processed in about 20 seconds, the expected processing time is about 1/3 of the orignial video length.
2020-12-22 13:09:40 +00:00
- CE = Contour Extractor
- LE = LayerFactory
- LM = LayerManager
- EX = Exporter
2020-12-22 12:58:47 +00:00
![docs/demo.gif](./docs/bm.jpg)
2020-11-18 15:28:16 +00:00
2022-05-03 08:57:19 +00:00
### Configuration
2022-05-07 10:32:08 +00:00
./Application/Config.py
2022-05-03 08:57:19 +00:00
2022-10-06 08:30:25 +00:00
"min_area": 100, min area in pixels, of a single contour, smaller is ignored
"max_area": 9000000, max area in pixels, of a single contour, larger is ignored
2022-10-11 19:35:37 +00:00
"threshold": 6, luminance difference threshold, sensitivity of movement detection
2022-10-06 08:30:25 +00:00
"resizeWidth": 600, video is scaled down internally
2022-05-03 08:57:19 +00:00
"inputPath": None, overwritten in main.py
"outputPath": None, overwritten in main.py
2022-10-06 08:30:25 +00:00
"maxLayerLength": 5000, max length of Layer in frames
"minLayerLength": 10, min length of Layer in frames
"tolerance": 100, max distance (in pixels) between contours to be aggragated into layer
2022-05-03 08:57:19 +00:00
"maxLength": None,
"ttolerance": 60, number of frames movement can be apart until a new layer is created
"videoBufferLength": 100, Buffer Length of Video Reader Componenent
2022-10-06 08:30:25 +00:00
"LayersPerContour": 2, number of layers a single contour can belong to
"avgNum": 10, number of images that should be averaged before calculating the difference
(computationally expensive, needed in outdoor scenarios due to clouds, leaves moving in the wind ...)
2022-05-03 08:57:19 +00:00
2020-12-22 12:58:47 +00:00
2022-01-09 11:28:05 +00:00
### notes:
optional:
2020-11-01 20:50:24 +00:00
2020-11-18 15:28:16 +00:00
install tensorflow==1.15.0 and tensorflow-gpu==1.15.0, cuda 10.2 and 10.0, copy missing files from 10.0 to 10.2, restart computer, set maximum vram