aiocv Is A Python Library Used To Track Hands, Track Pose, Detect Face, Detect Contours (Shapes), Detect Cars, Detect Number Plate, Detect Smile, Detect Eyes, Control Volume Using Gesture, Read QR Codes And Create Face Mesh On Image/Video.
Project description
AIOCV
aiocv Is A Python Library Used To Track Hands, Track Pose, Detect Face, Detect Contours (Shapes), Detect Cars, Detect Number Plate, Detect Smile, Detect Eyes, Control Volume Using Gesture, Read QR Codes And Create Face Mesh On Image/Video.
Installation
Use the package manager pip to install aiocv.
pip install aiocv
Usage
Hand Tracking
import aiocv
import cv2
img = cv2.imread("hands.png")
# Make An Object
hands = aiocv.HandTrack()
# Use findHands() Method To Track Hands On Image/Video
hands.findHands(img,draw=True)
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findHands() Method :
findHands(self,img=None,draw=True)
If You Are Not Getting Desired Results, Consider Changing detectionConfidence = 1 and trackConfidence = 1
Output :
Pose Detector
import aiocv
import cv2
img = cv2.imread("man.png")
# Make An Object
pose = aiocv.PoseDetector()
# Use findPose() Method To Detect Pose On Image/Video
pose.findPose(img,draw=True)
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findPose() Method :
findPose(self,img=None,draw=True)
If You Are Not Getting Desired Results, Consider Changing detectionConfidence = 1 and trackConfidence = 1
Output :
Face Detection
import aiocv
import cv2
img = cv2.imread("elon_musk.png")
# Make An Object
face = aiocv.FaceDetector()
# Use findFace() Method To Detect Face On Image/Video
face.findFace(img,draw=True)
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findFace() Method :
findFace(self,img=None,draw=True)
If You Are Not Getting Desired Results, Consider Changing detectionConfidence = 1
Output :
Face Mesh
import aiocv
import cv2
img = cv2.imread("elon_musk.png")
# Make An Object
mesh = aiocv.FaceMesh()
# Use findFaceMesh() Method To Detect Face And Draw Mesh On Image/Video
mesh.findFaceMesh(img,draw=True)
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findFaceMesh() Method :
findFaceMesh(self,img=None,draw=True)
If You Are Not Getting Desired Results, Consider Changing detectionConfidence = 1 and trackConfidence = 1
Output :
Contour (Shape) Detection
import aiocv
import cv2
img = cv2.imread("shapes.png")
# Make An Object
shape = aiocv.ContourDetector(img)
# Use findContours() Method To Detect Shapes On Image/Video
shape.findContours(img,draw=True)
cv2.imshow("Image",img)
cv2.waitKey(0)
Output :
Car Detection
import aiocv
import cv2
img = cv2.imread("car.png")
# Make An Object
car = aiocv.CarDetector(img)
# Use findCars() Method To Detect Cars On Image/Video
car.findCars()
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findCars() Method :
findCars(self,color=(255,0,0),thickness=2)
Output :
Number Plate Detection
import aiocv
import cv2
img = cv2.imread("car.png")
# Make An Object
car = aiocv.NumberPlateDetector(img)
# Use findNumberPlate() Method To Detect Number Plate On Image/Video
car.findNumberPlate()
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findNumberPlate() Method :
findNumberPlate(self,color=(255,0,0),thickness=2)
Output :
Smile Detection
import aiocv
import cv2
img = cv2.imread("person.png")
# Make An Object
smile = aiocv.SmileDetector(img)
# Use findSmile() Method To Detect Smile On Image/Video
smile.findSmile()
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findSmile() Method :
findSmile(self,color=(255,0,0),thickness=2)
Output :
Eyes Detection
import aiocv
import cv2
img = cv2.imread("person.png")
# Make An Object
eyes = aiocv.EyesDetector(img)
# Use findEyes() Method To Detect Eyes On Image/Video
eyes.findEyes()
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findEyes() Method :
findEyes(self,color=(255,0,0),thickness=2)
Output :
Control Volume Using Gesture
import aiocv
# Make An Object
gvc = aiocv.GestureVolumeControl()
# Use controlVolume() Method To Control Volume
gvc.controlVolume()
Params For controlVolume() Method :
controlVolume(self,color=(255,0,0),thickness=2)
Params For GestureVolumeControl Class :
gvc = aiocv.GestureVolumeControl(webcamIndex = 0)
# If You Want To Control From Other Camera, Set The webcamIndex Accordingly.
Output :
Read QR Code
import aiocv
import cv2
img = cv2.imread("qr.png")
# Make An Object
qr = aiocv.QRCodeReader(img)
# Use findQRCode() Method To Detect QR Code On Image/Video
text=qr.findQRCode()
cv2.imshow("Image",img)
cv2.waitKey(0)
Params For findQRCode() Method :
findQRCode(self,color=(255,0,0),thickness=3)
To Print The Extracted Text :
print(text)
Output :
Contributing
Pull Requests Are Welcome. For Major Changes, Please Open An Issue First To Discuss What You Would Like To Change.
Please Make Sure To Update Tests As Appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aiocv-0.0.36.tar.gz
.
File metadata
- Download URL: aiocv-0.0.36.tar.gz
- Upload date:
- Size: 115.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2614f07af208b9c74da893b4bafcd2a8d3db8919a4e3e4fbf1d6bceb6f1d012b |
|
MD5 | f287ebf9e3b4385930fe7d05246249af |
|
BLAKE2b-256 | e31eaea2e638d4c427fe381927d97c38e9abfbc29aa7819ac30e1b67200be09c |
File details
Details for the file aiocv-0.0.36-py3-none-any.whl
.
File metadata
- Download URL: aiocv-0.0.36-py3-none-any.whl
- Upload date:
- Size: 125.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5b002247ad92f2726300dd5dd85063614f9cc1696d6007004ddd04b0a899084 |
|
MD5 | f3d608771256be9a7797b43f57829f45 |
|
BLAKE2b-256 | ea2812c18d034e30c8548df012b5c54ee300290dcd22126beb5615ceec80cfc8 |