https://github.com/alvonx/alvonCV
Computer Vision Helper Package
https://github.com/alvonx/alvonCV
alvoncv face-detection face-mesh mediapipe mediapipe-face-detection mediapipe-facemesh python python-package utils
Last synced: 11 months ago
JSON representation
Computer Vision Helper Package
- Host: GitHub
- URL: https://github.com/alvonx/alvonCV
- Owner: alvonx
- License: mit
- Created: 2021-05-08T19:06:40.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-07T15:18:31.000Z (about 3 years ago)
- Last Synced: 2025-06-25T10:49:20.036Z (12 months ago)
- Topics: alvoncv, face-detection, face-mesh, mediapipe, mediapipe-face-detection, mediapipe-facemesh, python, python-package, utils
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Computer Vision Helper Packages
---
- Face Detection
- Face Mesh
## Install the package
```sh
pip install alvonCV
```
## Demo Code for Face Detection
```c
import alvonCV
import cv2
import time
cap = cv2.VideoCapture(0)
pTime = 0
# here you use the alvonCV package
faceDetectorObj = alvonCV.FaceDetector()
while True:
success, img = cap.read()
img, bboxs = faceDetectorObj.findFaces(img, draw=True)
cTime = time.time()
fps = 1 / (cTime - pTime)
pTime = cTime
cv2.putText(img, f'FPS: {int(fps)}', (20, 70), cv2.FONT_HERSHEY_PLAIN, 3, (0, 255, 0), 2)
cv2.imshow("Image", img)
cv2.waitKey(1)
```
## Demo Code for Face Mesh
```c
import alvonCV
import cv2
import time
cap = cv2.VideoCapture(0)
pTime = 0
faceDetectorObj = alvonCV.FaceMeshDetector()
while True:
success, img = cap.read()
img = faceDetectorObj.findFaceMesh(img, draw=True)
cTime = time.time()
fps = 1 / (cTime - pTime)
pTime = cTime
cv2.putText(img, f'FPS: {int(fps)}', (20, 70), cv2.FONT_HERSHEY_PLAIN, 3, (0, 255, 0), 2)
cv2.imshow("Image", img)
cv2.waitKey(1)
```
## Demo Code for Hand Detector
```c
import alvonCV
import cv2
import time
cap = cv2.VideoCapture(0)
detector = alvonCV.HandDetector(detectionCon=0.8, maxHands=1)
while True:
# Get image frame
success, img = cap.read()
# Find the hand and its landmarks
img = detector.findHands(img)
lmList, bbox = detector.findPosition(img)
fingersUp = detector.fingersUp()
print(fingersUp)
# Display
cv2.imshow("Image", img)
cv2.waitKey(1)
```