diff --git a/client/sbs_client.py b/client/sbs_client.py
index 6b477ab9032bd0c48e423b11d7a5b2ed762290f1..9d32b64d7937ac193a93b4bfe52d8d32a02216c5 100755
--- a/client/sbs_client.py
+++ b/client/sbs_client.py
@@ -86,7 +86,7 @@ def detectFaces(model, image):
         scaleFactor=1.1,
         minNeighbors=5,
         minSize=(30, 30),
-        flags=cv2.cv.CV_HAAR_SCALE_IMAGE
+        flags=cv2.CASCADE_SCALE_IMAGE
     )
 
 def main(argv):
diff --git a/contrib/src/web/emotion_gender_processor.py b/contrib/src/web/emotion_gender_processor.py
index 20f291ab307382b1ea1b04789d2cf4af973403b3..76ffb0aa9b2fa72117e1237635681e12f54efc58 100644
--- a/contrib/src/web/emotion_gender_processor.py
+++ b/contrib/src/web/emotion_gender_processor.py
@@ -7,7 +7,6 @@ from keras.models import load_model
 import numpy as np
 
 from utils.datasets import get_labels
-from utils.inference import detect_faces
 from utils.inference import draw_text
 from utils.inference import draw_bounding_box
 from utils.inference import apply_offsets
@@ -51,7 +50,7 @@ class EGProcessor:
             scaleFactor=1.1,
             minNeighbors=5,
             minSize=(30, 30),
-            flags=cv2.cv.CV_HAAR_SCALE_IMAGE
+            flags=cv2.CASCADE_SCALE_IMAGE
         )
 
     def processImage(self, image, result_fname = None, type = 'png', detect_emotion = True):