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.1.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.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: landmark-detection-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 2fa62d8743dd6ebb99d9a65001606993ef49a5961202761c6dd03a2a190116ef
MD5 b8fc0f92695a42d7376160f716d177e1
BLAKE2b-256 3cc3ae1ffa0474540fbb84d3ee2e413c48a5f182c48fbc5b058617d20bc736bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: landmark_detection-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 352dc5d39659df2be9bbae29a67d93b213c523e4fc80a3de55b55715b98e0326
MD5 40863c5b68211027b24f34c94ec49621
BLAKE2b-256 0b3e169f83dd94fac3d089b09f9b9b2ee5dc90f686323d772ab2d4726b62f04b

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