Skip to main content

This is for detect coordinates parts of the body

Project description

Full-Body-LandMarks-Detection

Github

Explained

In this repo used Mediapipe solutions in sections:

  • Face Mesh
  • Hands
  • Pose

Together, this will extract all coordinates points for any part of the body. In any class of them, there are two functions:

  • Find Points
  • Drawing

Find_Points function has some of sub functions those are body parts after that returns a list of class points such as: Face points

  1. Divide Find_Points function in class Face into:

    • Left Eye
    • Right Eye
    • Nose
    • Mouth
    • Head
  2. Divide Find_Points function in class Hands into:

    • Fingers
  3. Divide Find_Points function in class Body into:

    • Chest
    • Arms
    • Legs

Drawing function returns an image with labeled points.

Output

In the face parts, It returns a 2d list the first for all face points and the second for point coordinates otherwise it returns a 3d list the first for all class points, the second for the beginning and end point in the part, and the third for point coordinates

Usage

#Imports
import landmark as LM
import cv2 as cv

cap = cv.VideoCapture(0)  # 0 as a default webcam
face_detector = LM.Face()  # Make instance from class

while 1:
    _, img = cap.read()

    imgRGB = cv.cvtColor(img, cv.COLOR_BGR2RGB)

    # Any function of them need two parameters (image, imageRGB)
    # color, thickness and circle_radius are default parameters
    face_detector.Drawing(img, imgRGB, color=(0, 110, 100), thickness=3, circle_radius=3)
    face_detector.Find_Points(img, imgRGB)

    # To detect any part of the body you should call (Find_points) function
    # Any function of Them does not need parameters
    print(face_detector.Left_Eye())

    cv.imshow("img", img)
    cv.waitKey(1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

landmark-detection-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

landmark_detection-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file landmark-detection-0.1.0.tar.gz.

File metadata

  • Download URL: landmark-detection-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for landmark-detection-0.1.0.tar.gz
Algorithm Hash digest
SHA256 375b15b2f506bceb171936ce726622c6b6a04cfb865b6e7c2d53498905fddac0
MD5 a6f864c61e5fd409377fd98be9716ef1
BLAKE2b-256 3cbf15c9d7d5232adfff6ff39f4331a3752d092486d6eeb22178b9b3bfb8d534

See more details on using hashes here.

File details

Details for the file landmark_detection-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: landmark_detection-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.5

File hashes

Hashes for landmark_detection-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19a6e04971abf1751eec15297e12ecd315bd125ee4e63101b17b2e979f9488e7
MD5 540dafc0af529de410795236a242056d
BLAKE2b-256 8be284101ce31b42f036604c48a1410691870c848662b31f234cf4deac54f0b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page