Skip to content

Navigation Menu

Sign in
Sign up

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 machine learning-based web application designed to classify anime illustrations into two categories: Human-made or AI-generated. The system utilizes a fine-tuned EfficientNetB0 deep learning model for classification.

This project was developed in fulfillment of the Final Project / Final Semester Examination (UAS) requirements for the Perilaku Manajerial course.


Features

  • Modern User Interface β€” Clean and minimal design to facilitate user interaction.
  • EfficientNetB0 Model β€” Fine-tuned on a dataset of 6,485 anime illustrations for accurate classification.
  • Drag & Drop File Upload β€” Asynchronous image upload with instant client-side preview.
  • Real-time Inference β€” Rapid classification with visual probability distribution.
  • Responsive Design β€” Adaptive layout supporting desktop, tablet, and mobile environments.
  • Session-based History β€” Tracks recent classification results within the active browser session.
  • Data Export β€” Functionality to download or copy prediction metrics for external reporting.

Technology Stack

Component Technology
Backend Flask (Python 3)
Machine Learning TensorFlow / Keras
Model Architecture EfficientNetB0
Frontend HTML5, CSS3 (Vanilla), JavaScript (Vanilla)
Typography Google Fonts (Poppins & Outfit)

Project Structure

isekA.I/
β”œβ”€β”€ app.py # Flask application and routing definitions
β”œβ”€β”€ utils.py # Image preprocessing and model inference utilities
β”œβ”€β”€ requirements.txt # Python environment dependencies
β”œβ”€β”€ README.md # Project documentation
β”œβ”€β”€ best_EfficientNet_finetuned.keras # Pre-trained deep learning model weights
β”‚
β”œβ”€β”€ templates/
β”‚ └── index.html # Main HTML structure
β”‚
β”œβ”€β”€ static/
β”‚ β”œβ”€β”€ css/
β”‚ β”‚ └── style.css # Cascading Style Sheets
β”‚ β”œβ”€β”€ js/
β”‚ β”‚ └── script.js # Client-side application logic
β”‚ β”œβ”€β”€ uploads/ # Auto-generated directory for temporary files
β”‚ └── img/ # Static image assets
β”‚
└── assets/ # Documentation assets

Installation and Execution

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Setup Instructions

  1. Navigate to the project directory:

    cd isekA.I
  2. Initialize a virtual environment (Recommended):

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

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

    python app.py
  5. Access the application: Navigate to http://127.0.0.1:5000 in a standard web browser.


Model Specifications

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

Preprocessing and Inference Pipeline

  1. Image Ingestion: Convert input image to RGB color space.
  2. Resizing: Scale image to standard resolution of 224 ×ば぀ 224 px.
  3. Array Conversion: Transform image data into a float32 NumPy array.
  4. Dimension Expansion: Expand tensor dimensions to match batch requirements (1, 224, 224, 3).
  5. Normalization: Apply EfficientNet-specific preprocessing to scale pixel values.
  6. Inference: Evaluate the tensor through the fine-tuned Keras model utilizing a Sigmoid activation output.
  7. Classification Decision: Apply a decision threshold at 0.5 (Score $\ge$ 0.5 indicates AI Generated; Score < 0.5 indicates Human Art).

API Reference

GET /

Renders the primary application interface.

POST /predict

Processes the submitted image file and returns classification statistics.

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

JSON Response Format:

{
 "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 & Academic Context

  • Course: Perilaku Manajerial
  • Project Status: Tugas Akhir / Ujian Akhir Semester (UAS)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /