Skip to content

Instantly share code, notes, and snippets.

@Abdullah7175
Abdullah7175 / test2.py
Created May 10, 2023 20:21
EYE DETECTION BY MEDIAPIPE.FACEMESH
import cv2
import mediapipe as mp
# Initialize Mediapipe Face Mesh solution
mp_face_mesh = mp.solutions.face_mesh
face_mesh = mp_face_mesh.FaceMesh(max_num_faces=1,
refine_landmarks=True,
min_detection_confidence=0.5,
min_tracking_confidence=0.5)
import mediapipe as mp
import cv2
from typing import NamedTuple
# Define the body parts to be measured
body_parts = {
"nose": 0,
"left_eye_inner": 1,
"left_eye": 2,
"left_eye_outer": 3,
@Abdullah7175
Abdullah7175 / imageprocessing.py
Created April 13, 2023 16:51
using media pipe finding the measurements
import mediapipe as mp
import cv2
from typing import NamedTuple
# Define the body parts to be measured
body_parts = {
"nose": 0,
"left_eye_inner": 1,
"left_eye": 2,
"left_eye_outer": 3,
@Abdullah7175
Abdullah7175 / imageprocessing.py
Created April 13, 2023 10:58
body measurement by Pose Detection
import mediapipe as mp
import cv2
from typing import NamedTuple
# Define the body parts to be measured
body_parts = {
"nose": 0,
"left_eye_inner": 1,
"left_eye": 2,
"left_eye_outer": 3,