emilios commited on
Commit
6863937
·
verified ·
1 Parent(s): a3b0cbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,7 +20,7 @@ def inference(img):
20
 
21
  gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY ) # grayscale
22
  #out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,133,9)
23
- out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,221,9)
24
  out = cv2.dilate(out,(55,55))
25
 
26
 
@@ -36,8 +36,8 @@ iface = gradio.Interface(
36
  fn=inference,
37
  inputs='image',
38
  outputs='image',
39
- title='Noise Removel',
40
- description='Remove Noise with Adaptial Gaussian!',
41
  examples=["detail_with_lines_and_noise.jpg", "lama.webp", "dT4KW.png"])
42
  #examples=["detail_with_lines_and_noise.jpg", "lama.webp", "test_lines.jpg","llama.jpg", "dT4KW.png"])
43
 
 
20
 
21
  gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY ) # grayscale
22
  #out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,133,9)
23
+ out = cv2.adaptiveThreshold(gray,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,221,3)
24
  out = cv2.dilate(out,(55,55))
25
 
26
 
 
36
  fn=inference,
37
  inputs='image',
38
  outputs='image',
39
+ title='Noise Removal',
40
+ description='Remove Noise with OpenCV and Adaptial Gaussian!',
41
  examples=["detail_with_lines_and_noise.jpg", "lama.webp", "dT4KW.png"])
42
  #examples=["detail_with_lines_and_noise.jpg", "lama.webp", "test_lines.jpg","llama.jpg", "dT4KW.png"])
43