Skip to content
/ artify Public

Artify is an AI-powered image style transfer bot that transforms ordinary photos into stunning artworks inspired by famous artists, from classical masters to modern visionaries.

License

Notifications You must be signed in to change notification settings

Klus3kk/artify

Repository files navigation

Artify

License Platform

Artify is a versatile and user-friendly tool that applies artistic styles to images using cutting-edge AI. It supports both CLI and UI-based interfaces and integrates seamlessly with Hugging Face, Docker, and Kubernetes for scalability and ease of deployment.

Key Features

  • 🎨 AI-Powered Style Transfer: Transform your images using pre-trained style models (e.g., Impressionism, Abstract, Surrealism).
  • 💻 Command-Line Interface (CLI): Automate your workflows with a robust CLI.
  • 🌐 Streamlit UI: Upload images, choose styles, and generate styled results interactively.
  • 🔧 Logging: Transparent and detailed logging for all operations.
  • 🚀 Hugging Face Integration: Automatically download required models for styles.
  • 🐳 Docker & Kubernetes (in the future): Containerized for easy deployment and scalability.

Table of Contents

  1. Overview
  2. Setup Instructions
  3. Usage
  4. Architecture
  5. Examples
  6. Deployment
  7. License

Overview

Artify is designed for users and developers who want to quickly apply artistic styles to images. It combines the power of deep learning (via PyTorch and Transformers) with a streamlined user experience.

Setup Instructions

Prerequisites

  • Python 3.8+
  • Miniconda or pip (preferred for environment setup)
  • NVIDIA GPU with CUDA (optional but recommended)
  • Docker and Kubernetes (in progress)

Installation

  1. Clone the repository:

    git clone https://github.com/ClueSec/artify.git
    cd artify
  2. Install dependencies:

    conda create -n artify python=3.10 -y
    conda activate artify
    pip install -r requirements.txt
  3. Set up the environment variables:

    • Add your Hugging Face token to .env:
      HF_TOKEN=your_huggingface_api_token
      

Usage

CLI Usage

The CLI provides automation for style transfer:

python interface/CLIHandler.py --content <path_to_content_image> \
    --style_category <style_category> \
    --output <path_to_output_image>

Example:

python interface/CLIHandler.py --content images/content/sample_content.jpg \
    --style_category impressionism \
    --output images/output/styled_image.jpg

UI Usage

Start the interactive Streamlit UI:

streamlit run interface/UIHandler.py
  1. Upload your content image.
  2. Select a style category (e.g., Impressionism).
  3. Generate the styled image and download it.

Architecture

High-Level Workflow

  1. Input: User uploads a content image and selects a style.
  2. Preprocessing:
    • Image resizing and normalization.
    • Pre-trained VGG-19 is used for feature extraction.
  3. Style Transfer:
    • Models trained on specific artistic styles.
    • Gram matrices for style features.
  4. Output: Styled image is generated and saved.

Examples

Input Image

Input Image

Output Image

Output Image

Deployment

Docker

Build the Docker image:

docker build -t artify .

Run the container:

docker run -p 8501:8501 artify

Kubernetes (in the future)

License

This project is licensed under the MIT License. See LICENSE for details.

About

Artify is an AI-powered image style transfer bot that transforms ordinary photos into stunning artworks inspired by famous artists, from classical masters to modern visionaries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published