To implement this in a user friendly manner, we have created an application using Tkinter module in Python. The user has choice to either select his/her own image by specifying a directory path and then selecting any given style. Also, they can select to capture a real time video with their desired style using the same application. We also implemented a small web application for the same (https://github.com/raghav275/Neural_Style_Transfer_Website)
Here is a view of the application developed using Tkinter:
The user has to copy the directory to the path of the image along with it's image name and insert in, and click on submit:
The results are like below:
We implemented a real time neural style transfer that captures both image and video. The existing products work only on static images. We have extended the idea to different platforms like Desktop and Website (linked above).
Due to limited computational power we have tried to incorporate maximum smoothness as possible by normalizing the image, compressing it, resizing it and also by making sure that only the previous frame gets processed so that the buffer is least and frames per second increases.
We aim to extend this implementation to many styles and further do better optimizations to increase the frame rate as well as the resolution. We also aim to make the GUI more user friendly and robust. We want to deploy this on Android using TensorFlow Lite in future, so that it becomes more wide spread and more easily accessible by the general public.- OpenCV (opencv-python==3.4.2.17)
- Tkinter
IMPORTANT: To use the pre-defined weights you need to run the shell file (.sh) inside the models folder to download the .h5 files for different styles.
Then, to run the script from terminal just use:
python3 tkinterProgram.py
`