Skip to content

Conversation

@samet-akcay
Copy link
Contributor

📝 Description

This PR integrates the Real-IAD (Real Industrial Anomaly Detection) dataset into Anomalib. Real-IAD is a large-scale industrial anomaly detection dataset containing 30 categories of industrial objects, with both normal and anomalous samples captured from 5 different camera viewpoints.

Key Features

  1. Dataset Support

    • 30 industrial object categories
    • Multiple image resolutions (256x256, 512x512, 1024x1024)
    • Multi-view support (5 camera angles)
    • Both classification and segmentation tasks
    • Flexible JSON metadata organization
  2. Core Components

    • RealIADDataset: PyTorch Dataset implementation
    • RealIAD: PyTorch Lightning DataModule
    • JSON-based metadata handling for flexible dataset organization
    • Support for different dataset versions (base, single-view, FUIAD)
  3. Integration Features

    • Automatic resolution handling (both string and integer inputs)
    • Comprehensive input validation
    • Flexible metadata file selection
    • Dynamic train/test split management
    • Automatic task type detection (classification/segmentation)

Implementation Details

Key Features

  • Resolution Support: Multiple predefined resolutions (256, 512, 1024)
  • Metadata Flexibility: Support for different metadata versions
    • Base metadata (multi-view)
    • Single-view metadata
    • FUIAD metadata versions
  • Data Organization: Clear directory structure for normal/abnormal samples
  • Validation: Comprehensive input validation and error handling

Usage Examples

# Basic usage
datamodule = RealIAD(
    root="./datasets/Real-IAD",
    category="audiojack",
    resolution=256
)

# Using different metadata version
datamodule = RealIAD(
    category="button_battery",
    resolution=1024,
    json_path="realiad_jsons/realiad_jsons_sv/{category}.json"
)

✨ Changes

Select what type of change your PR is:

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔨 Refactor (non-breaking change which refactors the code base)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔒 Security update

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📋 I have summarized my changes in the CHANGELOG and followed the guidelines for my type of change (skip for minor changes, documentation updates, and test enhancements).
  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).

For more information about code review checklists, see the Code Review Checklist.

Signed-off-by: Samet Akcay <samet.akcay@intel.com>
@samet-akcay samet-akcay changed the title Add Real-IAD dataset implementation 🚀 Add Real-IAD dataset implementation Feb 3, 2025
Signed-off-by: Samet Akcay <samet.akcay@intel.com>
Signed-off-by: Samet Akcay <samet.akcay@intel.com>
Signed-off-by: Samet Akcay <samet.akcay@intel.com>
@samet-akcay samet-akcay marked this pull request as ready for review March 7, 2025 06:50
@samet-akcay samet-akcay requested a review from djdameln as a code owner March 7, 2025 06:50
Signed-off-by: Samet Akcay <samet.akcay@intel.com>
Signed-off-by: Samet Akcay <samet.akcay@intel.com>
@samet-akcay samet-akcay changed the title 🚀 Add Real-IAD dataset implementation 🚀 Add Real-IAD dataset Mar 7, 2025
Signed-off-by: Samet Akcay <samet.akcay@intel.com>
Signed-off-by: Samet Akcay <samet.akcay@intel.com>
Copy link

@Daankrol Daankrol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR!

@samet-akcay samet-akcay merged commit 67dcab7 into open-edge-platform:main Apr 4, 2025
10 checks passed
@samet-akcay samet-akcay deleted the feature/data/add-real-iad branch April 4, 2025 14:42
@samet-akcay samet-akcay mentioned this pull request Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants