Skip to main content

Coumputer Vision helping Library

Project description

cvlearn

An easy-to-use package that helps with hand tracking, face detection, and more using OpenCV.


Installation

  • Use Python 3.x
  • Open your terminal or command prompt and run:
pip install cvlearn

Dependencies

  • python 3.x
  • opencv-python
  • numpy
  • mediapipe

Examples

Hand Tracking

from cvlearn import HandTrackingModule as handTracker
import cv2

cap = cv2.VideoCapture(0)
detector = handTracker.handDetector()

while True:
    ret, img = cap.read()
    img = detector.findHands(img)
    
    cv2.imshow("Result", img)
    cv2.waitKey(1)

Result:

Hand Tracking


Face Detection

from cvlearn import FaceDetection as faceDetector
import cv2

cap = cv2.VideoCapture(0)
detector = faceDetector.FaceDetector()

while True:
    ret, img = cap.read()
    img = detector.findFaces(img)
    
    cv2.imshow("Result", img)
    cv2.waitKey(1)

Result:

Face Detection

Side View:

Face Side View


Face Mesh

from cvlearn import FaceMesh as fms
import cv2

cap = cv2.VideoCapture(0)
detector = fms.FaceMeshDetector()

while True:
    ret, img = cap.read()
    img, face = detector.findFaceMesh(img)

    cv2.imshow("Result", img)
    cv2.waitKey(1)

Result:

Face Mesh


Finger Counting

from cvlearn import FingerCounter as fc
import cvlearn.HandTrackingModule as handTracker
import cv2

cap = cv2.VideoCapture(0)
detector = handTracker.handDetector(maxHands=1)
counter = fc.FingerCounter()

while True:
    ret, frame = cap.read()
    frame = cv2.flip(frame, 180)

    frame = detector.findHands(frame)
    lmList, bbox = detector.findPosition(frame)

    if lmList:
        frame = counter.drawCountedFingers(frame, lmList, bbox)

    cv2.imshow("res", frame)
    key = cv2.waitKey(1)
    if key == 27:
        break

cv2.destroyAllWindows()

Result:

Finger Counter


Two Hands Finger Counting

from cvlearn import TwoHandsFingerCounter as fc
import cv2

cap = cv2.VideoCapture(0)
counter = fc.FingerCounter()

while True:
    ret, frame = cap.read()
    frame = counter.drawCountedFingers(frame)

    cv2.imshow("res", frame)
    key = cv2.waitKey(1)
    if key == 27:
        break

cv2.destroyAllWindows()

Result:

Two Hands Counter


Pose Detection

import cv2
import cvlearn
from cvlearn import PoseDetector, Utils

cap = cv2.VideoCapture(0)
detector = PoseDetector.PoseDetector(detectionCon=0.5, trackCon=0.5)

while True:
    success, img = cap.read()
    img = detector.findPose(img)
    lmList = detector.findLandmarks(img)

    cv2.imshow("Image", img)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

Result:

Pose Detection

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

cvlearn-0.4.3.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

cvlearn-0.4.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file cvlearn-0.4.3.tar.gz.

File metadata

  • Download URL: cvlearn-0.4.3.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for cvlearn-0.4.3.tar.gz
Algorithm Hash digest
SHA256 fd9458693638b432c122253df79f497a2c4f74e81d5b6de5bbb18cb0af2087ac
MD5 0fe93c5d347205ae1dcf6e19942bb027
BLAKE2b-256 fa99573d4cf3d968fdbd4e0be5364a7484f881f4608f267ac2f8dd35d0d8d852

See more details on using hashes here.

File details

Details for the file cvlearn-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: cvlearn-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for cvlearn-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b5a074e9a8f1094481c1e7fad7f3283d0a7b1bf1feb058cc24d2307f67c9f4d
MD5 15f6c6d9ba4334bcb4fed5778e845c79
BLAKE2b-256 33ea27944a646fde84d0585e076d818bd9f38f267a248d9606d071616393d5bb

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