Code for deploying a demo of real-time webcam video super-resolution. See the Enhance repo for training the network. The following figure shows the pipeline.
We use getUserMedia
to stream the webcam video. The video is downsampled by a factor of 4x,
and the downsized frames are sent to the server for GPU processing.
Tensorflow uses the GPU to upsampled the frames, and we serve the upsampled stream
using Flask and Javascript.
Requires nvidia-docker.
Generate a self-signed certificate, and save the cert as server.crt
and the key as server.key
.
Run
./deploy.sh
To record a video with your webcam, go to
https://[localhost]/webcam
and you can watch a comparison of the original video (upsampled with Nearest Neighbor), a video upsampled with bicubic interpolation, and a high-resolution video upsampled with a generative Neural Network.