Skip to content

๐ŸŽจ Transform photos into artistic masterpieces using AI-powered Neural Style Transfer. Built with Streamlit & TensorFlow. 10 unique styles included! โœจ

Notifications You must be signed in to change notification settings

HackWGaveesh/Neural-Style-Transfer-Studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽจโœจ Neural Style Transfer Studio ๐Ÿ–ผ๏ธ๐Ÿš€

Python TensorFlow Contributions welcome License


๐ŸŒŸ Overview

Neural Style Transfer Studio is a revolutionary Streamlit web application that transforms your ordinary photos into extraordinary artistic masterpieces! ๐ŸŽญ Leveraging the power of deep learning and Neural Style Transfer, this app combines the content of one image with the artistic style of another, creating unique and visually stunning results that look like they were painted by famous artists.


โœจ Features

๐Ÿ–ผ๏ธ Flexible Image Processing

  • ๐Ÿ“ค Content Image Upload: Easily upload any photograph you wish to transform
  • ๐ŸŽจ Multiple Style Options: Choose from predefined artistic styles or upload custom ones
  • ๐Ÿ‘๏ธ Real-time Preview: See your content and style images instantly in the app

๐ŸŽฏ Smart Style Selection

  • ๐Ÿ–Œ๏ธ Predefined Gallery: Curated collection of famous artistic styles
  • ๐ŸŽช Custom Style Upload: Use your own images as artistic styles
  • ๐Ÿ”„ Single or Multiple: Apply one style or experiment with multiple styles simultaneously

โš™๏ธ Advanced Controls

  • ๐ŸŽ›๏ธ Quality Settings: Adjust output resolution for optimal results
  • ๐ŸŒˆ Color Preservation: Experimental feature to maintain original colors (beta)
  • โฑ๏ธ Progress Tracking: Visual feedback during the transformation process

๐Ÿ’พ Export & Download

  • ๐Ÿ–ผ๏ธ Individual Downloads: Save each styled image as high-quality PNG
  • ๐Ÿ“ฆ Batch Download: Download all generated images as a convenient ZIP file
  • ๐Ÿ“Š Organized Naming: Automatically timestamped and labeled files

๐ŸŽจ User Experience

  • ๐Ÿ–ฅ๏ธ Responsive Design: Works beautifully on desktop, tablet, and mobile
  • ๐ŸŒŸ Professional UI: Modern, intuitive interface with smooth animations
  • โ„น๏ธ Informative Sections: Built-in guide explaining Neural Style Transfer

๐Ÿ› ๏ธ Technology Stack

Technology Purpose Version Badge
Streamlit Interactive Web Interface 1.45.1 Streamlit
TensorFlow Deep Learning Framework 2.18.0 TensorFlow
TensorFlow Hub Pre-trained Models 0.16.1 TensorFlow
NumPy Numerical Computing 2.0.2 NumPy
Pillow Image Processing 11.2.1 Pillow

๐Ÿš€ How Neural Style Transfer Works

graph TD
    A[๐Ÿ“ท Content Image] --> C[๐Ÿง  Neural Network]
    B[๐ŸŽจ Style Image] --> C
    C --> D[๐Ÿ”„ Feature Extraction]
    D --> E[๐ŸŽญ Style Transfer Process]
    E --> F[โœจ Artistic Masterpiece]
    F --> G[๐Ÿ’พ Download Result]
Loading

๐Ÿ”ฌ The Science Behind the Magic

  1. ๐Ÿง  Content Analysis: The neural network analyzes the structural content of your photo
  2. ๐ŸŽจ Style Extraction: Artistic patterns and textures are extracted from the style image
  3. ๐Ÿ”„ Feature Mixing: Deep learning algorithms blend content structure with artistic style
  4. โœจ Reconstruction: A new image is generated combining both elements seamlessly

๐Ÿ’ป Setup and Installation

๐Ÿ“‹ Prerequisites

  • Python 3.8 or higher ๐Ÿ
  • pip package manager ๐Ÿ“ฆ
  • Internet connection (for model downloads) ๐ŸŒ

๐Ÿš€ Quick Start Guide

  1. ๐Ÿ“ฅ Clone the Repository

    git clone https://github.com/HackWGaveesh/Neural-Style-Transfer-Studio.git
    cd Neural-Style-Transfer-Studio
  2. ๐Ÿ Create Virtual Environment (Recommended)

    python -m venv venv
    
    # Windows
    venv\Scripts\activate
    
    # macOS/Linux
    source venv/bin/activate
  3. ๐Ÿ“ฆ Install Dependencies

    pip install -r requirements.txt
  4. ๐ŸŽจ Prepare Style Images

    # Create the Styles directory and add your style images
    mkdir Styles
    # Add your style images (vangogh.jpg, monet.jpg, etc.) to this folder
  5. ๐Ÿš€ Launch the Application

    streamlit run StyleGan_Main.py
  6. ๐ŸŽ‰ Open in Browser

    • The app will automatically open at http://localhost:8501
    • Start creating your artistic masterpieces!

๐Ÿ“ Project Structure

๐ŸŽจ Neural-Style-Transfer-Studio/
โ”œโ”€โ”€ ๐Ÿš€ StyleGan_Main.py           # Main Streamlit application
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt           # Python dependencies
โ”œโ”€โ”€ ๐ŸŽจ Styles/                    # Predefined style images directory
โ”‚   โ”œโ”€โ”€ BW.jpg                   # Black & White style
โ”‚   โ”œโ”€โ”€ Fauvism.jpg              # Fauvism artistic style
โ”‚   โ”œโ”€โ”€ Ghibli.jpg               # Studio Ghibli animation style
โ”‚   โ”œโ”€โ”€ Impressionism.jpg        # Impressionist painting style
โ”‚   โ”œโ”€โ”€ Landscape.jpg            # Natural landscape style
โ”‚   โ”œโ”€โ”€ PopArt.jpg               # Pop Art movement style
โ”‚   โ”œโ”€โ”€ PsychedelicArt.jpg       # Psychedelic art style
โ”‚   โ”œโ”€โ”€ Ukiyoe.jpg               # Japanese woodblock print
โ”‚   โ”œโ”€โ”€ Vintage.jpg              # Vintage/retro style
โ”‚   โ””โ”€โ”€ anime.jpg                # Anime/manga style
โ”œโ”€โ”€ ๐Ÿ“– README.md                 # This file
โ”œโ”€โ”€ ๐Ÿ™ˆ .gitignore               # Git ignore rules
โ””โ”€โ”€ ๐Ÿ“„ LICENSE                  # License file

๐ŸŽฎ Usage Guide

๐Ÿ“ธ Step 1: Upload Content Image

  1. Navigate to the "๐Ÿ“ธ Upload & Create" tab
  2. Click "Choose a content image" to upload your photo
  3. Supported formats: JPG, JPEG, PNG, WebP
  4. Preview appears instantly with image dimensions

๐ŸŽจ Step 2: Select Artistic Style

Option A: Predefined Styles ๐Ÿ–ผ๏ธ

  1. Choose "๐ŸŽจ Predefined Styles"
  2. Select "Single Style" or "Multiple Styles" mode
  3. Click on style thumbnails to select/deselect
  4. See real-time selection feedback

Option B: Custom Style ๐Ÿ–Œ๏ธ

  1. Choose "๐Ÿ–Œ๏ธ Custom Style"
  2. Upload your own artistic reference image
  3. Any image can become a style template!

โš™๏ธ Step 3: Advanced Settings (Optional)

  • ๐ŸŽ›๏ธ Output Quality: Adjust from 1-10 (higher = better quality, larger files)
  • ๐ŸŒˆ Color Preservation: Experimental feature to maintain original colors

๐Ÿ–Œ๏ธ Step 4: Generate Artwork

  1. Click "๐Ÿ–Œ๏ธ Generate Artwork" button
  2. Watch the progress bar as your masterpiece is created
  3. Processing time varies by image complexity

๐Ÿ’พ Step 5: Download Results

  • Individual Download: Save each styled image separately
  • ๐Ÿ“ฆ Batch Download: Get all images in one ZIP file
  • ๐Ÿท๏ธ Auto-naming: Files include style name and timestamp

๐ŸŽจ Available Style Gallery

Style Description Artistic Movement
๐ŸŽจ BW Classic black and white artistic style Monochrome Art
๐ŸŽญ Fauvism Bold, non-naturalistic colors Early 20th Century
๐Ÿ›๏ธ Ghibli Studio Ghibli animation style Japanese Animation
๐ŸŒธ Impressionism Soft brushstrokes and light effects 19th Century Movement
๐Ÿž๏ธ Landscape Natural scenery artistic interpretation Landscape Art
๐ŸŽช Pop Art Bold colors and commercial imagery 1950s Pop Culture
๐ŸŒˆ Psychedelic Art Vibrant, surreal visual effects 1960s Counterculture
๐ŸŒŠ Ukiyoe Traditional Japanese woodblock prints Edo Period Japan
๐Ÿ“ฐ Vintage Retro and classic artistic styling Vintage Aesthetics
๐ŸŽŒ Anime Japanese anime and manga style Modern Japanese Art

๐Ÿ”ง Advanced Configuration

๐ŸŽจ Adding Custom Styles

  1. Add your style images to the Styles/ directory
  2. Supported formats: JPG, JPEG, PNG, WebP
  3. Recommended resolution: 512x512 pixels or higher
  4. Restart the app to see new styles in the gallery

โšก Performance Optimization

  • GPU Acceleration: TensorFlow automatically uses GPU if available
  • Memory Management: Large images are automatically resized for processing
  • Batch Processing: Multiple styles processed efficiently

๐Ÿ”ง Troubleshooting

  • Model Loading Issues: Ensure stable internet connection for initial model download
  • Memory Errors: Try reducing image size or output quality
  • Style Not Appearing: Check image format and restart application

๐Ÿค Contributing

We welcome contributions from the community! ๐ŸŽ‰ Here's how you can help:

๐ŸŒŸ Ways to Contribute

  • ๐Ÿ› Bug Reports: Found an issue? Open an issue with details
  • โœจ Feature Requests: Suggest new features or improvements
  • ๐ŸŽจ Style Gallery: Share interesting style images
  • ๐Ÿ“š Documentation: Help improve our guides and tutorials
  • ๐Ÿ’ป Code Contributions: Submit pull requests with enhancements

๐Ÿš€ Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and test thoroughly
  4. Commit changes: git commit -m 'Add amazing feature'
  5. Push to branch: git push origin feature/amazing-feature
  6. Open a Pull Request with detailed description

๐Ÿ’ก Ideas for Contributions

  • ๐ŸŽญ Additional neural style transfer models
  • ๐ŸŽจ Style mixing and blending features
  • ๐Ÿ“ฑ Mobile app version
  • ๐Ÿ”„ Video style transfer capabilities
  • ๐Ÿ–ผ๏ธ Batch processing for multiple images
  • ๐ŸŽ›๏ธ More advanced parameter controls

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • ๐Ÿง  Google Research for the Arbitrary Image Stylization model
  • ๐ŸŽจ TensorFlow Hub for providing pre-trained models
  • ๐Ÿš€ Streamlit team for the amazing web framework
  • ๐ŸŽญ Art Community for inspiring styles and creativity
  • ๐Ÿ‘จโ€๐Ÿ’ป Open Source Community for continuous inspiration

๐Ÿ“Š Performance Metrics

Metric Value
โšก Average Processing Time 15-30 seconds
๐Ÿ–ผ๏ธ Supported Image Formats JPG, PNG, WebP
๐Ÿ“ Max Image Resolution 4K (4096x4096)
๐ŸŽจ Available Styles 10 predefined styles
๐Ÿ’พ Output Format High-quality PNG

๐Ÿ”— Useful Links


๐Ÿ“ Notes & Tips

๐ŸŽฏ For Best Results

  • ๐Ÿ“ธ Use high-resolution, well-lit content images
  • ๐ŸŽจ Choose style images with distinct artistic characteristics
  • โš™๏ธ Experiment with different quality settings
  • ๐Ÿ”„ Try multiple styles to find your favorite combination

โš ๏ธ Known Limitations

  • ๐Ÿ•’ Processing time increases with image size
  • ๐Ÿ’พ Large images may require more memory
  • ๐ŸŒˆ Color preservation is experimental and may not work perfectly
  • ๐Ÿ–ฅ๏ธ GPU acceleration recommended for large batches

๐Ÿ’ฌ Get in Touch

Questions? Suggestions? Just want to share your amazing creations?

GitHub Email


โญ If this project inspired you to create amazing art, please give it a star! โญ

Transform your world through the lens of artificial intelligence and artistic creativity ๐ŸŒˆโœจ


Created with โค๏ธ by HackWGaveesh

About

๐ŸŽจ Transform photos into artistic masterpieces using AI-powered Neural Style Transfer. Built with Streamlit & TensorFlow. 10 unique styles included! โœจ

Topics

Resources

Stars

Watchers

Forks

Languages