2020-iuc-sw-skku / LSC-Systems

산학협력프로젝트: 머신러닝 기반 Wafer Map Defect Pattern Identification
8 stars 3 forks source link

Texture Feature/ Denoising #6

Open ssupecial opened 4 years ago

ssupecial commented 4 years ago

Texture feature on paper [3]

Using GLCM(Gray Level of Co-occurrence Matrix)

skimage.feature.greycomatrix skimage.feature.greycoprops

measure type: contrast, energy, correlation, dissimilarity, ASM, homogeneity

my option) distance: 1 / angle: 0,45,90,135

ssupecial commented 4 years ago
from skimage.feature import greycomatrix, greycoprops
import numpy as np

angle = [0,np.pi/4, np.pi/2, np.pi*3/4]

#개별 measure 하나씩
def contrast(img):
  glcm = greycomatrix( img , [1], angle)
  result = greycoprops(glcm, 'contrast')
  return result

def energy(img):
  glcm = greycomatrix( img , [1], angle)
  result = greycoprops(glcm, 'energy')
  return result

def correlation(img):
  glcm = greycomatrix( img , [1], angle)
  result = greycoprops(glcm, 'correlation')
  return result

def dissimilarity(img):
  glcm = greycomatrix( img , [1], angle)
  result = greycoprops(glcm, 'dissimilarity')
  return result

def ASM(img):
  glcm = greycomatrix( img , [1], angle)
  result = greycoprops(glcm, 'ASM')
  return result

def homogeneity(img):
  glcm = greycomatrix( img , [1], angle)
  result = greycoprops(glcm, 'homogeneity')
  return result

#ASM을 제외한 총 5개의 measure 특징 추출
def extract_texture(x):

    feature_name = lambda s, x, y: f"{s}_{str(x).zfill(2)}_{str(y)}"
    text = {}
    props = ['dissimilarity', 'contrast', 'homogeneity', 'energy', 'correlation']

    angles = [0, np.pi/4, np.pi/2, np.pi*3/4] #4 angles
    glcm = greycomatrix( x , [1], angles) 

    for f in props:

      for i in range(4):
        text[feature_name('text', f, i)] = greycoprops(glcm,f )[0][i]

    return pd.Series(text)
ssupecial commented 4 years ago

GLCM 관련 설명

https://docs.google.com/document/d/1sk59JAw-BUm7dCq7JXoU6qhgkWEVDyqdPRI9FJ_An4Y/edit?usp=sharing

ssupecial commented 4 years ago
ssupecial commented 4 years ago

Evaluation

*Denoising X

Control: Density-based + Radon-based + Geometry-based Estimator 1 (LR) : Accuracy : 62.51% AUC : 0.9142 Estimator 2 (RF) : Accuracy : 80.08% AUC : 0.9752 Estimator 3 (GBM) : Accuracy : 79.53% AUC : 0.9708 Estimator 4 (ANN) : Accuracy : 70.12% AUC : 0.9402

Experiment: Density-based + Radon-based + Geometry-based + *Distance-based Estimator 1 (LR) : Accuracy : 68.55% AUC : 0.9355 Estimator 2 (RF) : Accuracy : 81.73% AUC : 0.9771 Estimator 3 (GBM) : Accuracy : 81.57% AUC : 0.9781 Estimator 4 (ANN) : Accuracy : 71.92% AUC : 0.9475

Experiment: Density-based + Radon-based + Geometry-based + *Texture-based Estimator 1 (LR) : Accuracy : 66.74% AUC : 0.9316 Estimator 2 (RF) : Accuracy : 79.84% AUC : 0.9735 Estimator 3 (GBM) : Accuracy : 81.33% AUC : 0.9754 Estimator 4 (ANN) : Accuracy : 69.96% AUC : 0.9414

Experiment: Density-based + Radon-based + Geometry-based + Distance-based + Texture-based Estimator 1 (LR) : Accuracy : 70.50% AUC : 0.9404 Estimator 2 (RF) : Accuracy : 81.49% AUC : 0.9759 Estimator 3 (GBM) : Accuracy : 82.03% AUC : 0.9775 Estimator 4 (ANN) : Accuracy : 73.25% AUC : 0.9521

ssupecial commented 4 years ago

대개 비슷한 성능을 보이거나 미미한 성능 향상이 있었음

ssupecial commented 4 years ago

*Denoising O

-Denoising: Median Filter Experiment: Density-based + Radon-based + Geometry-based + Distance-based + Texture-based Estimator 1 (LR) : Accuracy : 68.62% AUC : 0.9395 Estimator 2 (RF) : Accuracy : 81.49% AUC : 0.9706 Estimator 3 (GBM) : Accuracy : 80.00% AUC : 0.9706 Estimator 4 (ANN) : Accuracy : 74.58% AUC : 0.9498

-Denoising: Spatial Experiment: Density-based + Radon-based + Geometry-based + Distance-based + Texture-based Estimator 1 (LR) : Accuracy : 76.86% AUC : 0.9596 Estimator 2 (RF) : Accuracy : 85.49% AUC : 0.9848 Estimator 3 (GBM) : Accuracy : 85.09% AUC : 0.9858 Estimator 4 (ANN) : Accuracy : 59.93% AUC : 0.8966

-Denoising: Labeling Experiment: Density-based + Radon-based + Geometry-based + Distance-based + Texture-based Estimator 1 (LR) : Accuracy : 77.96% AUC : 0.9649 Estimator 2 (RF) : Accuracy : 85.64% AUC : 0.9832 Estimator 3 (GBM) : Accuracy : 84.78% AUC : 0.9832 Estimator 4 (ANN) : Accuracy : 69.80% AUC : 0.9385

ssupecial commented 4 years ago

Denoise + Feature 2개 추가 -> 성능 향상

ssupecial commented 4 years ago

Denoising wafer map 기존의 sample.pkl과 형식은 같으나 wafer map만 denoise 처리함

denoising 기법 https://drive.google.com/file/d/1DplK3MlAYEOTAgaP8TNj9E7L_ey_nW63/view?usp=sharing

denoise data https://drive.google.com/drive/folders/1OSpMSplsPT5FKx9Fj5PWOuWBLLpSaFE9?usp=sharing