🌃 Reimagine any image in the style of Van Gogh's The Starry Night! 🌕
This is a twitterbot that performs the following steps in order once initialized:
- listen for tweets targeted at a given twitter account
- pull the image from the tweet
- perform neural style transfer on the input image
- reply to the tweeter with the output image in a reply tweet (also saves output to local disk)
Here are examples from my own bot, implemented with this code as-is. To see more examples, you can visit the bot @StarryNightBot.
note Due to recent changes in the Twitter dev API 😞, my bot is no longer live, so tweets to it won't return anything. Sorry!
- For Ubuntu,
$ pip install Pillow
in place of PIL. No changes to import necessary. - For Ubuntu,
$ chmod a+x style_transfer.sh
to allow the shell script to run
$ python twitterbot.py
Uses the starry_night.t7
weights file found in the fast-neural-style repo from the paper Perceptual Losses for Real-Time Style Transfer and Super-Resolution