MedMagik commited on
Commit
fcd05f2
·
verified ·
1 Parent(s): 11b46c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -6,6 +6,7 @@ from tensorflow.keras.preprocessing.image import load_img, img_to_array
6
  from tensorflow.keras.applications.densenet import preprocess_input, decode_predictions
7
  import numpy as np
8
  from scipy import ndimage
 
9
  from PIL import Image
10
  import matplotlib.pyplot as plt
11
  import cv2
@@ -61,6 +62,7 @@ def custom_decode_predictions(predictions, class_labels):
61
 
62
  def classify_image(img):
63
  img_array = img_to_array(img)
 
64
  img_array = np.expand_dims(img_array, axis=0)
65
  img_array = preprocess_input(img_array)
66
 
 
6
  from tensorflow.keras.applications.densenet import preprocess_input, decode_predictions
7
  import numpy as np
8
  from scipy import ndimage
9
+ from skimage import exposure
10
  from PIL import Image
11
  import matplotlib.pyplot as plt
12
  import cv2
 
62
 
63
  def classify_image(img):
64
  img_array = img_to_array(img)
65
+ img_array = exposure.equalize_hist(img_array)
66
  img_array = np.expand_dims(img_array, axis=0)
67
  img_array = preprocess_input(img_array)
68