All Projects → AmadeusITGroup → Moire-Pattern-Detection

AmadeusITGroup / Moire-Pattern-Detection

Licence: other
No description or website provided.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Moire-Pattern-Detection

ewtpy
Empirical wavelet transform (EWT) in Python
Stars: ✭ 52 (-11.86%)
Mutual labels:  wavelet-decomposition

Moire Pattern Detection

Introduction

To detect Moire ́ patterns, images are first decomposed using Wavelet decomposition and trained using multi-input Convolutional neural network. The strength of the proposed CNN model is, it uses the LL intensity image (from the Wavelet decomposition) as a weight parameter for the Moire ́ pattern, thereby approximating the spatial spread of the Moire ́ pattern in the image. Usage of CNN model performs better than frequency thresholding approach as the model is trained considering diverse scenarios and it is able to distinguish between the high frequency of background texture and the Moire ́ pattern.

If this code helps with your work, please cite:

@INPROCEEDINGS{8628746,
author={E. {Abraham}},
booktitle={2018 IEEE Symposium Series on Computational Intelligence (SSCI)},
title={Moiré Pattern Detection using Wavelet Decomposition and Convolutional Neural Network},
year={2018},
volume={},
number={},
pages={1275-1279},
ISSN={},
month={Nov},}

Set-up

1. Install Python3

2. Install dependencies

pip install tensorflow

pip install keras

pip install Pillow

pip install scikit-learn

pip install scikit-image

pip install PyWavelets

Note - Resize Images to WIDTH = 1000 and HEIGHT = 750

3. create the wavelet decomposed training dataset from the captured images

python createTrainingData.py positiveImages negativeImages train

positional arguments:

  positiveImages  Directory with positive (Moiré pattern) images.
  
  negativeImages  Directory with negative (Normal) images.
  
  train           0 = train, 1 = test

4. train the CNN model using training images

python train.py positiveImages negativeImages trainingDataPositive trainingDataNegative epochs

positional arguments:

  positiveImages        Directory with original positive (Moiré pattern)
                        images.
                        
  negativeImages        Directory with original negative (Normal) images.
  
  trainingDataPositive  Directory with transformed positive (Moiré pattern)
                        images.
                        
  trainingDataNegative  Directory with transformed negative (Normal) images.
  
  epochs                Number of epochs for training

5. test the CNN model using test images

python test.py moirePattern3CNN_.h5 positiveImages negativeImages

positional arguments:

  weightsFile               saved CNN model file
  
  positiveTestImages        Directory with original positive (Moiré pattern)
                        images.
                        
  negativeTestImages        Directory with original negative (Normal) images.
  

Documentation

IEEE SSCI-2018 publication (https://ieeexplore.ieee.org/document/8628746).

Note: The paper shows 3 bands of wavelet decomposition images taken as input to CNN as compared to the 4 bands in this python implementation

Additional information

If you have any technical questions, feel free to contact us or create an issue here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].