Spaces:
Running
Running
File size: 2,343 Bytes
88920d3 f8731a3 ff64326 f8731a3 e6b88ee f8731a3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
---
title: Anomaly Detection UI
emoji: 🚀
color: blue
sdk: gradio
app_file: app.py # Or the name of your main Gradio script if it's different
# model_id: ucKaizen/your-pretrained-model # Optional: If you have a specific model on the Hub
tags:
- anomaly detection
- image classification
- gradio
- machine learning
- unsupervised learning
- semi-supervised learning
---
# Anomaly Detection UI



*Detect anomalies in rice images using unsupervised and semi-supervised learning with a user-friendly Gradio interface.*
Dataset a subset of https://www.kaggle.com/datasets/muratkokludataset/rice-image-dataset
## Overview
This project implements an anomaly detection system for rice images (Basmati vs. Jasmine) using deep learning and unsupervised learning techniques. It leverages EfficientNetB0 for feature extraction, PCA for dimensionality reduction, and PyOD models (e.g., Isolation Forest, LOF, OCSVM) for anomaly detection. The project includes a Gradio-based UI that allows users to:
- Select between unsupervised and semi-supervised modes.
- Choose different PyOD models for anomaly detection.
- Tune model parameters (e.g., `contamination`, `n_estimators`).
- Visualize results with a PCA scatter plot, classification metrics, and a list of detected outliers.
The project is built with Python and uses libraries like TensorFlow, scikit-learn, PyOD, OpenCV, Matplotlib, and Gradio. It’s designed to run seamlessly in GitHub Codespaces for development and testing.
## Features
- **Anomaly Detection**: Detects Jasmine rice images as anomalies among Basmati images.
- **Modes**: Supports both unsupervised and semi-supervised learning.
- **Models**: Includes multiple PyOD models (Isolation Forest, Local Outlier Factor, One-Class SVM).
- **Interactive UI**: Gradio interface with dropdowns, sliders, and visualizations.
- **Visualization**: PCA scatter plot to visualize data distribution and detected outliers.
- **Metrics**: Provides classification report, AUC score, and a list of detected outliers with filenames.
|