Skip to content

Amey-Thakur/WHITE-BOX-CARTOONIZATION

Repository files navigation

White-Box Cartoonization

License: MIT Status Backend Research Developed by Amey Thakur, Hasan Rizvi & Mega Satish

An AI-powered web application that transforms photographs into cartoon-style images using deep learning, utilizing a white-box representation framework and Generative Adversarial Networks (GANs).

Source Code  ·  Research Paper  ·  Live Demo  ·  Video Demo

White Box Cartoonization Demo


Authors  ·  Overview  ·  Features  ·  Structure  ·  Results  ·  Quick Start  ·  Usage Guidelines  ·  License  ·  About  ·  Acknowledgments


Authors

Terna Engineering College | Computer Engineering | Batch of 2022

Amey Thakur
Amey Thakur


ORCID
Hasan Rizvi
Hasan Rizvi


GitHub
Mega Satish
Mega Satish


ORCID

Special thanks to Hasan Rizvi and Mega Satish for their meaningful contributions, guidance, and support that helped shape this work.


Overview

White-Box Cartoonization is an advanced AI implementation designed to bridge the gap between real-world imagery and artistic cartoon representations. Unlike black-box models, this system decomposes images into several representations (surface, structure, and texture) to achieve high-quality stylization while maintaining the structural integrity of the input.

Developed as a mini-project for the Machine Learning Laboratory curriculum, this project integrates cutting-edge deep learning research with a production-ready Flask web gateway, demonstrating the end-to-end lifecycle of an AI application.

GAN Learning Progression

Important

Research Impact

This project was published as a research paper in the International Journal of Engineering Applied Sciences and Technology (IJEAST) (Volume 5, Issue 12) and is also available as a preprint on arXiv. The project received an official Publication Certificate for its research contribution to machine learning education.

Resources

# Resource Description Date Link
1 Project Repository Complete source code and production weights View
2 Technical Report Comprehensive archival project documentation 2021 View
3 Technical Presentation Visual overview of the model architecture 2021 View
4 Project Demo (YouTube) Real-time demonstration of the web portal View
5 Scholarly Preprint Formal research manuscript (arXiv version) 2021 View

Tip

Optimized Model Inference

For faster inference on high-resolution images, consider enabling GPU acceleration via TensorFlow-GPU. Ensure CUDA and cuDNN are correctly installed and configured to leverage parallel processing for the GAN's forward pass.


Features

Feature Description
White-Box Logic Decomposition-based cartoonization for superior edge and texture control.
GAN Framework Extended Generative Adversarial Network for realistic artistic textures.
Optimized Inference Efficient model execution via TensorFlow with Guided Filter refinement.
Cinematic Web UI Modern HTML/JS interface featuring clapper animations and soundscapes.
Cross-Platform Fully responsive design supporting both desktop and mobile web environments.
Archival Quality Production-ready code with comprehensive scholarly documentation.

Tech Stack

  • Framework: TensorFlow 2.x
  • Backend: Python 3.8+, Flask 3.1.2
  • Frontend: Vanilla JS, CSS3 (Custom Theme System)
  • Utilities: OpenCV, NumPy, Guided Filter algorithm

Project Structure

WHITE-BOX-CARTOONIZATION/
│
├── docs/                                          # Formal Documentation
│   └── SPECIFICATION.md                           # Technical Architecture & Spec
│
├── Mega/                                          # Archival Attribution Assets
│   └── Mega.png                                   # Author Profile Image (Mega Satish)
│
├── Mini-Project/                                  # Research, Demos & Training Materials
│   ├── Demo/                                      # Functional System Demonstrations
│   ├── Draft/                                     # Early Manuscripts & Design Drafts
│   ├── Experimental-Implementations/              # Node.js & TF.js Research
│   ├── Figures/                                   # System Diagrams & Architecture
│   ├── Files/                                     # Visualization & Research Data
│   │   └── GAN-Tree.gif                           # GAN Learning Progression
│   ├── Group - B11 [Amey, Mega & Hasan]/          # Official Academic Submission
│   ├── WBC/                                       # Core Training Script Manifest
│   ├── IJEAST-V5I12 - White-Box Cartoonization... # Published Research Paper (IJEAST)
│   ├── Preprint - White-Box Cartoonization...     # Formal Research Manuscript (arXiv)
│   ├── MINI-PROJECT_PRESENTATION...               # Technical Presentation (PPTX)
│   └── WHITE-BOX CARTOONIZATION REPORT.pdf        # Comprehensive Project Report
│
├── Source Code/                                   # Real-Time Web Application (Flask)
│   ├── src/                                       # Core Inference Framework
│   ├── static/                                    # Frontend Presentation Assets
│   ├── app.py                                     # Flask Web Entry Gateway
│   ├── backend.py                                 # GAN Processing Liaison
│   └── index.html                                 # Application Frontend Blueprint
│
├── .gitattributes                                 # Global Git LFS & Config
├── .gitignore                                     # Asset Exclusion Manifest
├── requirements.txt                               # Dependency Manifest
├── CITATION.cff                                   # Scholarly Citation Metadata
├── codemeta.json                                  # Software Metadata Manifest
├── LICENSE                                        # MIT License Terms
├── README.md                                      # Comprehensive Archival Entrance
└── SECURITY.md                                    # Vulnerability Exposure Policy

Results Gallery

Result 1

Result 2

Result 3

Result 4

Result 5

Result 6

Result 7


Quick Start

1. Prerequisites

Ensure your environment meets the minimum specifications:

  • Python: Version 3.8 or higher.
  • Hardware: 4GB Minimum RAM (8GB recommended for inference).
  • Environment: Virtual environment (venv) is highly recommended.

Warning

Technical Dependencies & Environment

This system is built using TensorFlow 2.x and Python 3.8+. For stable execution and educational reference, it is recommended to run this in an isolated virtual environment to align with the baseline deep learning framework requirements and avoid dependency conflicts.

2. Setup & Deployment

  1. Clone the Repository:
    git clone https://github.com/Amey-Thakur/WHITE-BOX-CARTOONIZATION.git
    cd WHITE-BOX-CARTOONIZATION
  2. Install Dependencies:
    pip install flask flask-cors tensorflow opencv-python numpy tf-slim

3. Launch Application

  1. Start the Server:
    cd "Source Code"
    python app.py
  2. Access Web Gateway:
    • Navigate to: http://localhost:5002

Usage Guidelines

This repository is openly shared to support learning and knowledge exchange across the academic community.

For Students
Use this mini-project as a reference for understanding Generative Adversarial Networks (GANs), white-box image representations, and the deployment of AI models via web-based gateways. The research assets and production scripts are documented to support self-paced learning and exploration of computer vision applications.

For Educators
This project may serve as a practical example or supplementary teaching resource for Machine Learning curriculum or Mini-Project modules (CSM605). Attribution is appreciated when utilizing content.

For Researchers
The published paper and preprint provide insights into image decomposition techniques, high-quality artistic stylization using GANs, and the refinement of edge/texture control in generative models.


License

This repository and all linked academic content are made available under the MIT License. See the LICENSE file for complete terms.

Note

Summary: You are free to share and adapt this content for any purpose, even commercially, as long as you provide appropriate attribution to the original author.

Copyright © 2021 Amey Thakur, Hasan Rizvi, Mega Satish


About This Repository

Created & Maintained by: Amey Thakur, Hasan Rizvi & Mega Satish
Academic Journey: Bachelor of Engineering in Computer Engineering (2018-2022)
Institution: Terna Engineering College, Navi Mumbai
University: University of Mumbai

This repository serves as a permanent technical record for White-Box Cartoonization, developed as a 6th Semester Mini-Project. It highlights the practical application of GANs in artistic rendering and the deployment of AI models via modern web interfaces.

Connect: GitHub · LinkedIn · ORCID

Acknowledgments

Grateful acknowledgment to Hasan Rizvi and Mega Satish for their pivotal roles and collaborative excellence during the development of this project. Their intellectual contributions, technical insights, and dedicated commitment to software quality were fundamental in achieving the system's analytical and functional objectives. This technical record serves as a testament to their scholarly partnership and significant impact on the final implementation.

Special thanks to the authors of "Learning to Cartoonize Using White-box Cartoon Representations" (Xinrui Wang and Jinze Yu, CVPR 2020) for their foundational research.


↑ Back to Top

Authors  ·  Overview  ·  Features  ·  Structure  ·  Results  ·  Quick Start  ·  Usage Guidelines  ·  License  ·  About  ·  Acknowledgments


🎬 White Box Cartoonization


Presented as part of the 6th Semester Mini-Project @ Terna Engineering College

Computer Engineering (B.E.) - University of Mumbai

Semester-wise curriculum, laboratories, projects, and academic notes.