SimonThomine / IndustrialDefectLib

Library for generating industrial synthetic defects
0 stars 1 forks source link
anomaly-detection computer-vision deep-learning

🏭 Industrial Defect Generator 🏭

Description

This library aims to give a simple access to the proposed defect generation approaches for industrial defects.

Access to demo

A demo is available in HuggingFace : Link

Base usage

The library is designed to be straightforward to use with a single function that generate one or several defects and masks

image = Image.open('path/to/your/image').convert('RGB')
defGen=DefectGenerator(image.size)
defect,msk=defGen.genDefect(image,defectType=["nsa"])

Arguments

Output

If return_list is False :

If return_list is True :

Notes

Implemented methods

Methods currently implemented in the library

NSA

Article : https://arxiv.org/pdf/2109.15222.pdf
Code inspiration : https://github.com/hmsch/natural-synthetic-anomalies

DRAEM

Article : https://arxiv.org/pdf/2108.07610.pdf
Code inspiration : https://github.com/VitjanZ/DRAEM

MemSeg

Article : https://arxiv.org/ftp/arxiv/papers/2205/2205.00908.pdf
Code inspiration : https://github.com/TooTouch/MemSeg

CSE

Article : https://arxiv.org/pdf/2403.01859.pdf
Code inspiration : https://github.com/SimonThomine/CSE

CutPaste

Article : https://arxiv.org/pdf/2104.04015.pdf
Code inspiration : https://github.com/LilitYolyan/CutPaste