<jupyter_start><jupyter_text>Facial Landmarks detection dlib and OpenCV 2 step process:  - Step 1: Localize the face in the image- Step 2: Detect the key facial structures on the face ROI<jupyter_code># import the necessary packages
from collections import OrderedDict
import numpy as np
import cv2
# define a dictionary that maps the indexes of the facial
# landmarks to specific face regions
FACIAL_LANDMARKS_IDXS = OrderedDict([
	("mouth", (48, 68)),
	("right_eyebrow", (17, 22)),
	("left_eyebrow", (22, 27)),
	("right_eye", (36, 42)),
	("left_eye", (42, 48)),
	("nose", (27, 36)),
	("jaw", (0, 17))
])
def rect_to_bb(rect):
	# take a bounding predicted by dlib and convert it
	# to the format (x, y, w, h) as we would normally do
	# with OpenCV
	x = rect.left()
	y = rect.top()
	w = rect.right() - x
	h = rect.bottom() - y

	# return a tuple of (x, y, w, h)
	return (x, y, w, h)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13706140350877194, 'fraction_numerical': 0.03399122807017544, 'mean_word_length': 4.402366863905326, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '641283', 'license': 'MIT', 'n_tokens_mistral': 362, 'n_tokens_neox': 327, 'n_words': 128, 'path': 'notebooks/1.0-sd-data-exploration.ipynb', 'repo_name': 'sheelabhadra/Choose-The-Thug-Life', 'size': '912'}