Things I knew before: Part 1

Machine Learning

Machines are mortal, as of yet. It is because other mortals (humans) keep creating new machines which outdate the previous ones. What if they could create machines which learn on their own so that they could create machines better than themselves at a faster rate than humans. This would lead to a chain of events which leads to the devastation of every new generation of mortals.

Well obviously machine learning is none of that. Here are a few misconceptions people have:

import cv2
import sys
faceCascade1 = cv2.CascadeClassifier('haarcascades/haarcascade_frontalface_alt2.xml')
frame = cv2.imread('Test_Images/Test.jpg')
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces1 = faceCascade1.detectMultiScale(gray, 1.1, 5)
for (x, y, w, h) in faces1:
    cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 0, 255), 2)
cv2.imwrite('Result_Images/Result.jpg', frame);

If you have the right dependencies at the right places, the code above can do this :

10 lines of code to build a face detector. Have a look at the full gesture, age etc. detction pipelines here