A beautiful and interactive Streamlit web application that applies Arbitrary Neural Style Transfer to any uploaded image using the pre-trained Magenta model from TensorFlow Hub.
Transform your photos into stunning artworks inspired by 9 different artistic styles in seconds — powered entirely by deep learning!
Run it locally and experience the magic!
- Upload any image (PNG, JPG, JPEG)
- Choose from 9 unique pre-defined artistic styles
- Real-time style transfer using Google's Magenta Arbitrary Image Stylization model
- Side-by-side comparison: Original → Style → Stylized Result
- High-resolution downloadable output (1024×1024 PNG)
- Clean, responsive, and user-friendly interface
- Fast inference with cached model and image loading
(Add your own screenshots later by replacing this section)
Neural-Style-Transfer/
├── nst.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── README.md # This file
├── Style 1.jpg # Pre-defined style images (1 to 9)
├── Style 2.jpg
├── ...
└── Style 9.jpg
- Python 3.8+
- Streamlit
- TensorFlow (2.x)
- TensorFlow Hub
- Pillow (PIL)
- NumPy
Install all dependencies easily with:
pip install -r requirements.txtstreamlit
tensorflow
tensorflow-hub
Pillow
numpy
- Clone or download this repository
- Navigate to the project folder:
cd Neural-Style-Transfer - Install dependencies:
pip install -r requirements.txt
- Run the app:
streamlit run nst.py
- Open your browser (usually at
http://localhost:8501) - Upload an image, select a style, and watch the AI create art!
- Uses the official Magenta Arbitrary Image Stylization v1-256 model from TensorFlow Hub
- Automatically crops input to square, resizes to 256×256 for optimal processing
- Applies fast style transfer combining content and selected style image
- Upscales final result to 1024×1024 for high-quality downloads
- Model: Magenta Team @ Google
- Neural Style Transfer Research: Gatys et al., and fast arbitrary stylization by Google
- Built with ❤️ using Streamlit and TensorFlow
Agaba_Embedded
Transforming pixels into art, one upload at a time.
Enjoy creating AI art! 🖼✨
Feel free to fork, star ⭐, and customize with your own styles!