Skip to content

itsakki10/NeuralCanvas

Repository files navigation

🧠 NeuralCanvas

Transform Reality Into Art with AI

NeuralCanvas is a Dockerized AI-powered artistic style transfer platform built using Adaptive Instance Normalization (AdaIN) and PyTorch. The application allows users to blend the content of one image with the artistic style of another, generating unique AI artwork in seconds through an intuitive web interface.


πŸš€ Live Demo

Web Application: https://neuralcanvas-cpk1.onrender.com

GitHub Repository: https://github.com/itsakki10/NeuralCanvas


✨ Key Features

  • 🎨 AI-powered Neural Style Transfer
  • 🧠 Adaptive Instance Normalization (AdaIN)
  • πŸ“€ Upload custom content and style images
  • 🎚 Adjustable style intensity control
  • ⚑ Real-time image generation
  • πŸ‘€ Live image preview
  • πŸ“₯ Download generated artwork
  • πŸ–Ό Interactive example gallery
  • πŸ“± Fully responsive user interface
  • 🐳 Docker container support
  • 🌐 Production-ready deployment with Gunicorn

πŸ–Ό How It Works

Content Image
      ↓
Style Image
      ↓
AdaIN Encoder
      ↓
Feature Alignment
      ↓
Decoder Network
      ↓
Stylized Artwork

πŸ“Έ Screenshots

Homepage

Homepage

Style Transfer Studio

Upload Studio

Generated Artwork

Generated Result


πŸ— System Architecture

User Uploads Images
          ↓
      Flask App
          ↓
     Image Preprocessing
          ↓
      AdaIN Network
     (PyTorch Model)
          ↓
    Style Transfer Engine
          ↓
   Generated Artwork
          ↓
      Browser Output

πŸ›  Tech Stack

Frontend

  • HTML5
  • CSS3
  • Bootstrap
  • JavaScript

Backend

  • Flask
  • Flask-WTF
  • Gunicorn

Artificial Intelligence

  • PyTorch
  • Adaptive Instance Normalization (AdaIN)
  • VGG Encoder
  • Decoder Network

DevOps & Deployment

  • Docker
  • Render

πŸ“‚ Project Structure

NeuralCanvas/
β”‚
β”œβ”€β”€ AdaIN/
β”œβ”€β”€ assets/
β”œβ”€β”€ content_data/
β”œβ”€β”€ experiment/
β”‚   └── big_dataset/
β”œβ”€β”€ static/
β”œβ”€β”€ style_data/
β”œβ”€β”€ templates/
β”œβ”€β”€ utils/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ train.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ Procfile
β”œβ”€β”€ runtime.txt
β”œβ”€β”€ README.md
└── vgg_normalised.pth

βš™ Local Installation

Clone Repository

git clone https://github.com/itsakki10/NeuralCanvas.git
cd NeuralCanvas

Create Virtual Environment

python -m venv env

Activate Environment

Windows:

env\Scripts\activate

Linux / macOS:

source env/bin/activate

Install Dependencies

pip install -r requirements.txt

Run Application

python app.py

Open:

http://localhost:5000

🐳 Docker Deployment

Build Docker Image

docker build -t neuralcanvas .

Run Docker Container

docker run -p 5000:5000 neuralcanvas

Open:

http://localhost:5000

πŸ“ˆ Future Enhancements

  • Multiple artistic style blending
  • Batch image processing
  • User authentication
  • Artwork history management
  • Cloud storage integration
  • GPU acceleration support

πŸ‘¨β€πŸ’» Author

Akash Mehra

B.Tech Artificial Intelligence & Machine Learning

Connect With Me

GitHub: https://github.com/itsakki10


About

AI-powered Neural Style Transfer application using AdaIN, PyTorch, Flask and Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages