Skip to content

Instantly share code, notes, and snippets.

View WittmannF's full-sized avatar
🇧🇷

Fernando Marcos Wittmann WittmannF

🇧🇷
View GitHub Profile

Face Recognition in Python with the OpenCV Library

In this post we will use the OpenCV library for facial recognition. Here is an example using my webcam as an input:

The best part is that it can be done using less than 20 lines of code:

import cv2, os
BLUE_COLOR = (255, 0, 0)
STROKE = 2
xml_path = 'haarcascade_frontalface_alt2.xml'
clf = cv2.CascadeClassifier(xml_path)
cap = cv2.VideoCapture(0)
while(not cv2.waitKey(20) & 0xFF == ord('q')):
print('hello world')
import re
PATTERN = '(.*), (.*) - (.*): [bB]om dia'
db = re.findall(PATTERN, txt)
@WittmannF
WittmannF / bi-wp-familia.ipynb
Last active June 1, 2020 02:19
BI-wp-familia.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@WittmannF
WittmannF / reconhecimento-facial-autoxml.py
Last active June 6, 2020 15:07
Reconhecimento facial em python com busca automática do arquivo XML
import cv2, os
# Funcao para busca de arquivos
def find(name, path):
for root, dirs, files in os.walk(path):
if (name in files) or (name in dirs):
print("O diretorio/arquivo {} encontra-se em: {}".format(name, root))
return os.path.join(root, name)
# Caso nao encontre, recursao para diretorios anteriores
return find(name, os.path.dirname(path))

Requires Changes

5 specifications require changes

Hello student,

Well done in your first submission! 👏 👏 A few minor changes are still required in order to meet our rubric. Keep doing this great job!

Cheers,

Solution: Deploy an Azure Machine Learning Model

Part 1: Configure deployment settings

  1. Create a new Automated ML run

# envolveu a combinação de encoding e o separador:
url_bernardo = 'https://raw.githubusercontent.com/beloureiro/Planning/main/DB11FB06-1447-11EB-AD05-1866DA94328D.csv'
df = pd.read_csv(url_bernardo, sep=';', encoding='latin')