predict_breeds.py
def Improved_OpenCV_face_detector(self):
        """
        Detect whether if any faces in an image
        Parameters:
            None
        Return:
            faces: number of faces that have been detected in an image
            img: a color (BGR) image has been read by OpenCV
        """
        face_cascade = cv2.CascadeClassifier('haarcascades/haarcascade_frontalface_alt.xml')
        img = cv2.imread(self.img_path) #BGR image
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        faces = face_cascade.detectMultiScale(gray)
        return faces, img

        Detect whether if any faces in an image
        Parameters:
            None
        Return:
            faces: number of faces that have been detected in an image
            img: a color (BGR) image has been read by OpenCV
        
Detect whether if any faces in an image
Parameters:
None
Return:
faces: number of faces that have been detected in an image
img: a color (BGR) image has been read by OpenCV
Detect whether if any faces in an image Parameters : None Return : faces : number of faces that have been detected in an image img : a color ( BGR ) image has been read by OpenCV
def Improved_OpenCV_face_detector(self):
        face_cascade = cv2.CascadeClassifier('haarcascades/haarcascade_frontalface_alt.xml')
        img = cv2.imread(self.img_path) 
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        faces = face_cascade.detectMultiScale(gray)
        return faces, img
def Improved_OpenCV_face_detector ( self ) : face_cascade = cv2 . CascadeClassifier ( 'haarcascades/haarcascade_frontalface_alt.xml' ) img = cv2 . imread ( self . img_path ) gray = cv2 . cvtColor ( img , cv2 . COLOR_BGR2GRAY ) faces = face_cascade . detectMultiScale ( gray ) return faces , img
Detect whether if any faces in an image
Parameters:
None
Return:
faces: number of faces that have been detected in an image
img: a color (BGR) image has been read by OpenCV
Detect whether if any faces in an image Parameters : None Return : faces : number of faces that have been detected in an image img : a color ( BGR ) image has been read by OpenCV
"""
        Detect whether if any faces in an image
        Parameters:
            None
        Return:
            faces: number of faces that have been detected in an image
            img: a color (BGR) image has been read by OpenCV
        """ #BGR image
self