This repository contains Telegram Bot implementation, that uses for Style Transfer. Style Transfer implementation entirely based on Pytorch Fast Neural Style implementation, shown below.
You can find this Telegram Bot after searching for @StatixX_StyleBot
.
This repo contains other styles, besides the standart ones, contains in Pytorch Fast Neural Style repository, that has been moved into artwork
directory.
- torch
- torchvision
- pyTelegramBotAPI
- pillow
- psychodelic
- abstraction
- artwork
- photo style
Available style photos store in the
style
folder, so you can find them there or use the bot, which will show you all styles it has.
- Click start
- Upload an image when the bot asks you
- Choose the style you want
- Wait for the stylized image
- Click "Finish" if you're done.
TransformerNet was taken from Pytorch Fast Neural Style github repo and was trained on COCO dataset with 2 epoch on (128 x 128) image size. The train_styles.py
trains models for all styles, contained in the style
folder iteratively.
Example 1:
Example 2:
For the purpose of make possible deploy this app on heroku, the image size of pictures will be decreased to 512 px in width. If it'll be a purpose to get better results, you can clone git and perform stylize on your own.
Config file was not added as it contains API key for TelegramBot