Skip to content

Official implementation of the paper "KairosAD: A SAM-Based Model for Industrial Anomaly Detection on Embedded Devices" accepted @ ICIAP 2025.

License

Notifications You must be signed in to change notification settings

intelligolabs/KairosAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KairosAD: A SAM-Based Model for Industrial Anomaly Detection on Embedded Devices

Official implementation of the paper KairosAD: A SAM-Based Model for Industrial Anomaly Detection on Embedded Devices accepted at the 23rd International Conference on Image Analysis and Processing (ICIAP 2025).

Installation

1. Repository setup:

  • $ git clone --recurse-submodules https://github.com/intelligolabs/KairosAD

Or, if you have already has already cloned the repo:

  • $ git submodule update --init --recursive
  • $ cd KairosAD
  • On file MobileSAM/mobile_sam/utils/transforms.py, update the function apply_image() with the following code:
    def apply_image(self, image: np.ndarray) -> np.ndarray:
        """
        Expects a numpy array with shape HxWxC in uint8 format.
        """
        target_size = self.get_preprocess_shape(image.shape[0], image.shape[1], self.target_length)
        image = image.permute(2, 0, 1)
        
        return resize(image, target_size)

2. Conda environment setup:

  • $ conda create -n kairos_ad python=3.10
  • $ conda activate kairos_ad
  • $ cd MobileSAM
  • $ pip install -e .
  • $ pip install -r requirements.txt

Optionally, you can also log the training and evaluation to wandb.

  • Update line 102 of the file main.py, specifying project='' and entity=''

Authors

Uzair Khan, Franco Fummi, Luigi Capogrosso

Department of Engineering for Innovation Medicine, University of Verona, Italy

name.surname@univr.it

Citation

If you use KairosAD, please, cite the following paper:

@Article{khan2025kairosad,
  title   = {{KairosAD: A SAM-Based Model for Industrial Anomaly Detection on Embedded Devices}},
  author  = {Khan, Uzair and Fummi, Franco and Capogrosso, Luigi},
  journal = {arXiv preprint arXiv:2505.24334},
  year    = {2025}
}

About

Official implementation of the paper "KairosAD: A SAM-Based Model for Industrial Anomaly Detection on Embedded Devices" accepted @ ICIAP 2025.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages