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

Denoise #9

Open
Jinu-Lee opened this issue Jul 16, 2020 · 4 comments
Open

Denoise #9

Jinu-Lee opened this issue Jul 16, 2020 · 4 comments

Comments

@Jinu-Lee
Copy link
Collaborator

Jinu-Lee commented Jul 16, 2020

noise는 defect recognition에 도움을 별로 주지 못하기 때문에 denoise

@Jinu-Lee
Copy link
Collaborator Author

Jinu-Lee commented Jul 16, 2020

spatial filtering -> random noise를 제거하는데 간단하고 많이 쓰이는 방법
이웃한 부분들의 가중합을 구해 임계 값 이상이면 defect로 처리하는 방법

주석 2020-07-16 150357

def denoise(img, t=1, L=1/8):
    for i in range(t, img.shape[0] - t):
        for j in range(t, img.shape[1] - t):
            if img[i][j] == 2:
                frac = img[i-t:i+t+1, j-t:j+t+1]
                N = frac[frac != 0].sum() - 1
                R = (frac[frac == 2].sum() - 1) / N

                if R < L:
                    img[i][j] = 1
    return img

col: noised / denoised
row: ['Center', 'Donut', 'Edge-Loc', 'Edge-Ring', 'Loc', 'Near-full', 'Random', 'Scratch', 'none']

2

주석 2020-07-16 123314

@dotoleeoak
Copy link
Collaborator

denoising parameter 조정 필요한 듯...

@dotoleeoak
Copy link
Collaborator

@illuminoplanet 데이터 추가 생성에 Denoise 쓰는 건 어떰?
Denoise된 데이터랑 안된 데이터 둘 다 학습시키는 걸로

@dotoleeoak
Copy link
Collaborator

Denoise에 변수도 바꿔가면서 하면 한 5배 정도 만들 수 있을듯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants