Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture Feature/ Denoising #6

Open
ssupecial opened this issue Jul 16, 2020 · 8 comments
Open

Texture Feature/ Denoising #6

ssupecial opened this issue Jul 16, 2020 · 8 comments
Labels
Features Features to be used for classification 구현완료

Comments

@ssupecial
Copy link
Collaborator

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
Copy link
Collaborator Author

ssupecial commented Jul 16, 2020

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
Copy link
Collaborator Author

ssupecial commented Jul 16, 2020

@ssupecial
Copy link
Collaborator Author

ssupecial commented Jul 16, 2020

  • 우리가 사용하는 wafer map은 0,1,2으로 이루어져 있음 - level이 3개
  • 전처리로 Denoising 할 지 결정 아직 못 함 -> 둘 다 해볼 예정
    (texture feature이 주변 pixel의 영향을 많이 받을 수밖에 없기 때문에 denoising 필요할 것이라고 생각함)
    Denoising 처리한 것이 성능이 더 우수함
  • 일단은 distance:1 angle:0,45,90,135도/4개로 하고 measure 5개 뽑아냄
  • 그래프로 알아본 결과 나름 feature들간의 일관성은 있어보이나 타 feature과도 유사성을 보임 -> 직접 모델 생성을 통해 평가해보아야 함(Denoising X 완료 / Denoising O 완료)

@ssupecial
Copy link
Collaborator Author

ssupecial commented Jul 17, 2020

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
Copy link
Collaborator Author

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

@dotoleeoak dotoleeoak added enhancement Features Features to be used for classification and removed enhancement labels Jul 20, 2020
@ssupecial
Copy link
Collaborator Author

ssupecial commented Jul 21, 2020

*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 ssupecial changed the title Texture Feature Texture Feature/ Denoising Jul 21, 2020
@ssupecial
Copy link
Collaborator Author

ssupecial commented Jul 21, 2020

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

@ssupecial
Copy link
Collaborator Author

ssupecial commented Jul 21, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Features Features to be used for classification 구현완료
Projects
None yet
Development

No branches or pull requests

2 participants