floe / backscrub

Virtual Video Device for Background Replacement with Deep Semantic Segmentation
Apache License 2.0
730 stars 84 forks source link

Recommendation: Release this to work with video file input and output #43

Open richardpickett opened 3 years ago

richardpickett commented 3 years ago

It'd be nice to feed an already-recorded video through this to remove the background.

BenBE commented 3 years ago

While the current code structure is quite fixed on reading the video stream from the V4L video device it shouldn't be too hard, implementing a different processing mode for the input/output, once Something like #38 and #41 are implemented (amongst some other code structure changes).

phlash commented 3 years ago

This is a similar need to the one I had for animated backgrounds, the separated input module I have (https://github.com/phlash/deepbacksub/blob/65c7f4a8f0f5ddd1cfc6305fef825690fc1a1931/capture.cc#L59) allows local files to be used as source material for either input stream. This supports @BenBE's statement that it's not too hard, and for me points towards doing one thing well (segmentation and mask generation), with other features (background substitution, offline processing, etc.) perhaps delegated to existing machinery (eg: ffmpeg, obs)?