Skip to content

bintangyow/isekAI

Repository files navigation

title IsekA.I
emoji 💻
colorFrom gray
colorTo gray
sdk docker
app_port 7860
pinned false
thumbnail https://cdn-uploads.huggingface.co/production/uploads/6a4a628f07ad1b9980b1f953/D2jfq2djBJNIbq2yYfK9t.jpeg
short_description Detect if anime art is Human-made or AI-generated

isekA.I — AI vs Human Anime Illustration Detector

🎓 Tugas Akhir / UAS Mata Kuliah: Perilaku Manajerial

A modern AI-powered web application that classifies anime illustrations as either Human-made or AI-generated using a fine-tuned EfficientNetB0 deep learning model.

Proyek ini dikembangkan sebagai bentuk pemenuhan Tugas Akhir / Ujian Akhir Semester (UAS) pada mata kuliah Perilaku Manajerial.


✨ Features

  • 🎨 Premium Modern UI — Clean, minimal design inspired by modern AI SaaS products.
  • 🧠 EfficientNetB0 Model — Fine-tuned on 6,485 anime illustrations for accurate classification.
  • 📤 Drag & Drop Upload — Seamless image upload with instant preview.
  • Real-time Prediction — Fast inference with confidence visualization.
  • 📊 Animated Progress Bars — Visual probability distribution of classification.
  • 🌙 Dark Mode — Toggle between light and dark themes smoothly.
  • 📱 Responsive Design — Works seamlessly on desktop, tablet, and mobile devices.
  • 📋 Prediction History — Track recent classification results within the active session.
  • 💾 Download Results — Export prediction details as a text document.
  • 📋 Copy to Clipboard — Quick-copy prediction metrics.

🛠️ Tech Stack

Component Technology
Backend Flask (Python 3)
ML Model TensorFlow / Keras
Architecture EfficientNetB0
Frontend HTML5, CSS3 (Vanilla), JavaScript (Vanilla)
Typography Google Fonts — Poppins & Outfit
Icons Font Awesome 6

📁 Project Structure

isekA.I/
├── app.py                              # Flask application & routes
├── utils.py                            # Image preprocessing & model inference
├── requirements.txt                    # Python dependencies
├── README.md                           # Project documentation (this file)
├── best_EfficientNet_finetuned.keras   # Pre-trained deep learning model
│
├── templates/
│   └── index.html                      # Main HTML page structure
│
├── static/
│   ├── css/
│   │   └── style.css                   # Custom styles & dark mode layout
│   ├── js/
│   │   └── script.js                   # Client-side validation & AJAX handling
│   ├── uploads/                        # Auto-created directory for temporary uploads
│   └── img/                            # Static images
│
└── assets/                             # Documentation assets

🚀 Quick Start

Prerequisites

  • Python 3.8+
  • pip (Python package installer)

Installation

  1. Navigate to the project directory:

    cd isekA.I
  2. Create and activate a virtual environment (optional but recommended):

    • Windows:
      python -m venv .venv
      .venv\Scripts\activate
    • macOS/Linux:
      python3 -m venv .venv
      source .venv/bin/activate
  3. Install the dependencies:

    pip install -r requirements.txt
  4. Run the Flask development server:

    python app.py
  5. Access the application: Open http://127.0.0.1:5000 in your web browser.


🧠 Model Details

Property Value
Architecture EfficientNetB0
Training Dataset 6,485 images
Original Dataset 6,553 images
Classes Human Illustration, AI Generated
Input Size 224 × 224
Transfer Learning ImageNet
Fine-Tuning Enabled
Test Accuracy 82.19%

Preprocessing Pipeline

  1. Open Image → Convert to RGB color mode.
  2. Resize → Downscale/scale to 224 × 224 px.
  3. Array Conversion → Convert image to float32 NumPy array.
  4. Dimension Expansion → Expand to batch dimension (1, 224, 224, 3).
  5. EfficientNet Preprocessing → Scale pixel values using EfficientNet defaults.
  6. Inference → Evaluate through fine-tuned Keras model (Sigmoid activation output).
  7. Decision Boundary → Threshold score at 0.5 (Score $\ge$ 0.5 is AI Generated, < 0.5 is Human Art).

📡 API Reference

GET /

Renders the main dashboard page.

POST /predict

Processes image files and returns classification statistics.

  • Content-Type: multipart/form-data
  • Field: file (Image file upload)

Response Example:

{
    "error": false,
    "prediction": "AI Generated",
    "emoji": "🤖",
    "confidence": 96.84,
    "ai_probability": 96.84,
    "human_probability": 3.16,
    "processing_time": 0.245,
    "raw_score": 0.9684,
    "image_url": "/static/uploads/filename.png"
}

📝 Credits & Course Context

  • Mata Kuliah: Perilaku Manajerial
  • Status Proyek: Tugas Akhir / Ujian Akhir Semester (UAS)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages