# Kaizer Package
Kaizer is a comprehensive package for face detection, hand tracking, pose estimation, and more using MediaPipe. It is designed to simplify your project development.
## Features
- **Face Detection**: Efficient and accurate face detection.
- **Hand Tracking**: Real-time hand tracking and gesture recognition.
- **Pose Estimation**: Full-body pose estimation.
- **FPS Calculation**: Measure frames per second for performance evaluation.
- **Utilities**: Additional tools to streamline your project work.
## Installation
You can install the package using pip:
```bash
pip install kaizer
```
## Usage
### Using Face Detection
```bash
from KAZIER import FaceDetector
import cv2
cap = cv2.VideoCapture(0)
detector = FaceDetector()
while True:
success, img = cap.read()
if not success:
break
img, bboxs = detector.find_faces(img)
if bboxs:
for _, bbox, _ in bboxs:
img = detector.imp_draw(img, bbox)
print("Bounding boxes:", bboxs)
img, faces = detector.find_face_mesh(img)
if faces:
print(f"Number of faces detected: {len(faces)}")
p1 = faces[0][33] # Example: left eye landmark
p2 = faces[0][263] # Example: right eye landmark
length, info, img = detector.findDistance(p1, p2, img)
print(f"Distance between points: {length}, Info: {info}")
cv2.imshow('Image', img)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
```
### Using fps
```bash
from KAZIER import FPS
import cv2
fps_counter = FPS()
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
if not ret:
break
fps = fps_counter.showfps(frame, writetext=True, text_pos=(10, 50),
fthickness=2,tcolor=(0,255,250),
Fstyle=cv2.FONT_HERSHEY_DUPLEX,fscale=2,)
cv2.imshow('Frame', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
```
### Using HAND DETECTION
```bash
from KAZIER import HandStar
import cv2
cap = cv2.VideoCapture(0)
detector = HandStar(maxHands=2)
while True:
success, img = cap.read()
if not success:
break
img = detector.detect_hands(img)
lmList = detector.get_hand_positions(img)
if len(lmList) != 0:
fingersList = detector.get_fingers_status()
for i, fingers in enumerate(fingersList):
length, img, lineInfo = detector.calculate_distance(4, 8, img, handNo=i)
cv2.imshow('Image', img)
if cv2.waitKey(1) == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
```
### Using Pose Module
```bash
from KAZIER import PoseDetector
import cv2
cap = cv2.VideoCapture(0)
detector = PoseDetector()
while True:
success, img = cap.read()
img = cv2.resize(img, (680, 680))
img = detector.findPose(img)
lmList = detector.findPosition(img)
if lmList:
cv2.circle(img, (lmList[14][1], lmList[14][2]), 10, (250, 0, 0), cv2.FILLED)
length, img, info = detector.findDistance(lmList[11][1:3], lmList[15][1:3], img=img, color=(255, 0, 0), scale=10)
cv2.imshow("image", img)
if cv2.waitKey(1) == ord('q'):
break
```
### Using Utils
```bash
from KAZIER import Helper
import cv2
utils = Helper()
image_url = 'https://image.shutterstock.com/image-vector/dotted-spiral-vortex-royaltyfree-images-600w-2227567913.jpg' # Replace with the actual image URL
image = utils.download_image_from_url(image_url)
black_background_image = utils.make_background_black(image)
rotated_image = utils.rotate_image(image, 45)
img2 = cv2.imread('med/ig.jpg')
hstacked_image = utils.hstack_images(image, img2)
vstacked_image = utils.vstack_images(image, img2)
detected_color = utils.detect_color(image, 'green')
image_with_corners = utils.detect_corners(image)
image_with_text_left = utils.add_text(image, 'Hello World', (50, 50), font_name='hershey_triplex', color_name='blue', align='left')
cv2.waitKey(0)
cv2.destroyAllWindows()
```
## License
- This project is licensed under the MIT License. See the LICENSE file for details.
## Contributing
- Contributions are welcome! Please open an issue or submit a pull request.
## Contact
- Replace `sumitsingh9441@gmail.com` with your actual email address. This `README.md` file now reflects the package name `kaizer` and includes usage examples for its features.
Raw data
{
"_id": null,
"home_page": "https://github.com/RAJPUTRoCkStAr/Kazier.git",
"name": "Kazier",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "computer vision, mediapipe, face detection, hand tracking, pose estimation, opencv, image processing, machine learning, AI, artificial intelligence",
"author": "Sumit Kumar Singh",
"author_email": "sumitsingh9441@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/23/f7/21e07bc23bcbf100676bf3e974358b74b93d112a83e76c9628b492aa3162/kazier-0.0.1.tar.gz",
"platform": null,
"description": "# Kaizer Package\r\n\r\nKaizer is a comprehensive package for face detection, hand tracking, pose estimation, and more using MediaPipe. It is designed to simplify your project development.\r\n\r\n## Features\r\n- **Face Detection**: Efficient and accurate face detection.\r\n- **Hand Tracking**: Real-time hand tracking and gesture recognition.\r\n- **Pose Estimation**: Full-body pose estimation.\r\n- **FPS Calculation**: Measure frames per second for performance evaluation.\r\n- **Utilities**: Additional tools to streamline your project work.\r\n\r\n## Installation\r\n\r\nYou can install the package using pip:\r\n\r\n```bash\r\npip install kaizer\r\n```\r\n\r\n## Usage\r\n### Using Face Detection\r\n```bash\r\nfrom KAZIER import FaceDetector \r\nimport cv2\r\n\r\ncap = cv2.VideoCapture(0)\r\ndetector = FaceDetector()\r\nwhile True:\r\n success, img = cap.read()\r\n if not success:\r\n break\r\n img, bboxs = detector.find_faces(img)\r\n if bboxs:\r\n for _, bbox, _ in bboxs:\r\n img = detector.imp_draw(img, bbox)\r\n print(\"Bounding boxes:\", bboxs)\r\n img, faces = detector.find_face_mesh(img)\r\n if faces:\r\n print(f\"Number of faces detected: {len(faces)}\")\r\n p1 = faces[0][33] # Example: left eye landmark\r\n p2 = faces[0][263] # Example: right eye landmark\r\n length, info, img = detector.findDistance(p1, p2, img)\r\n print(f\"Distance between points: {length}, Info: {info}\")\r\n cv2.imshow('Image', img)\r\n if cv2.waitKey(1) & 0xFF == ord('q'):\r\n break\r\ncap.release()\r\ncv2.destroyAllWindows()\r\n```\r\n\r\n\r\n### Using fps\r\n```bash\r\nfrom KAZIER import FPS\r\nimport cv2\r\n\r\nfps_counter = FPS()\r\ncap = cv2.VideoCapture(0)\r\nwhile True:\r\n ret, frame = cap.read()\r\n if not ret:\r\n break\r\n fps = fps_counter.showfps(frame, writetext=True, text_pos=(10, 50),\r\n fthickness=2,tcolor=(0,255,250),\r\n Fstyle=cv2.FONT_HERSHEY_DUPLEX,fscale=2,)\r\n cv2.imshow('Frame', frame)\r\n if cv2.waitKey(1) & 0xFF == ord('q'):\r\n break\r\ncap.release()\r\ncv2.destroyAllWindows()\r\n```\r\n\r\n### Using HAND DETECTION\r\n```bash\r\nfrom KAZIER import HandStar\r\nimport cv2\r\n\r\ncap = cv2.VideoCapture(0)\r\ndetector = HandStar(maxHands=2)\r\nwhile True:\r\n success, img = cap.read()\r\n if not success:\r\n break\r\n img = detector.detect_hands(img)\r\n lmList = detector.get_hand_positions(img)\r\n if len(lmList) != 0:\r\n fingersList = detector.get_fingers_status()\r\n for i, fingers in enumerate(fingersList):\r\n length, img, lineInfo = detector.calculate_distance(4, 8, img, handNo=i)\r\n cv2.imshow('Image', img)\r\n if cv2.waitKey(1) == ord('q'):\r\n break\r\ncap.release()\r\ncv2.destroyAllWindows()\r\n```\r\n\r\n### Using Pose Module\r\n```bash\r\nfrom KAZIER import PoseDetector\r\nimport cv2\r\n\r\ncap = cv2.VideoCapture(0)\r\ndetector = PoseDetector()\r\nwhile True:\r\n success, img = cap.read()\r\n img = cv2.resize(img, (680, 680))\r\n img = detector.findPose(img)\r\n lmList = detector.findPosition(img)\r\n if lmList:\r\n cv2.circle(img, (lmList[14][1], lmList[14][2]), 10, (250, 0, 0), cv2.FILLED)\r\n length, img, info = detector.findDistance(lmList[11][1:3], lmList[15][1:3], img=img, color=(255, 0, 0), scale=10)\r\n cv2.imshow(\"image\", img)\r\n if cv2.waitKey(1) == ord('q'):\r\n break\r\n```\r\n\r\n### Using Utils\r\n```bash\r\nfrom KAZIER import Helper\r\nimport cv2\r\n\r\nutils = Helper()\r\nimage_url = 'https://image.shutterstock.com/image-vector/dotted-spiral-vortex-royaltyfree-images-600w-2227567913.jpg' # Replace with the actual image URL\r\nimage = utils.download_image_from_url(image_url)\r\nblack_background_image = utils.make_background_black(image)\r\nrotated_image = utils.rotate_image(image, 45)\r\nimg2 = cv2.imread('med/ig.jpg') \r\nhstacked_image = utils.hstack_images(image, img2)\r\nvstacked_image = utils.vstack_images(image, img2)\r\ndetected_color = utils.detect_color(image, 'green')\r\nimage_with_corners = utils.detect_corners(image)\r\nimage_with_text_left = utils.add_text(image, 'Hello World', (50, 50), font_name='hershey_triplex', color_name='blue', align='left')\r\ncv2.waitKey(0)\r\ncv2.destroyAllWindows()\r\n```\r\n## License\r\n- This project is licensed under the MIT License. See the LICENSE file for details.\r\n\r\n## Contributing\r\n- Contributions are welcome! Please open an issue or submit a pull request.\r\n\r\n## Contact\r\n- Replace `sumitsingh9441@gmail.com` with your actual email address. This `README.md` file now reflects the package name `kaizer` and includes usage examples for its features.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A comprehensive package for face detection, hand tracking, pose estimation, and more using MediaPipe, designed to simplify your project development.",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/RAJPUTRoCkStAr/Kazier.git"
},
"split_keywords": [
"computer vision",
" mediapipe",
" face detection",
" hand tracking",
" pose estimation",
" opencv",
" image processing",
" machine learning",
" ai",
" artificial intelligence"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "54fa808ca0dcefe723a39bed1cad7e1cb8ed16c8718241baa48405ec0fe9651c",
"md5": "fb2fda8d19f4be8281f4851fde120bbc",
"sha256": "628461c4b3d62b72612e41b9591cd6ce1248705c865b4da58019ea04cd97343c"
},
"downloads": -1,
"filename": "Kazier-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fb2fda8d19f4be8281f4851fde120bbc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12482,
"upload_time": "2024-08-06T18:36:16",
"upload_time_iso_8601": "2024-08-06T18:36:16.458061Z",
"url": "https://files.pythonhosted.org/packages/54/fa/808ca0dcefe723a39bed1cad7e1cb8ed16c8718241baa48405ec0fe9651c/Kazier-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "23f721e07bc23bcbf100676bf3e974358b74b93d112a83e76c9628b492aa3162",
"md5": "5260e35a4db6014e46cd66d78b3fd840",
"sha256": "cfd097afe01cb636ff5dc217b02e3ca1717d1acb27de0020085c631e657e9b64"
},
"downloads": -1,
"filename": "kazier-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5260e35a4db6014e46cd66d78b3fd840",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9519,
"upload_time": "2024-08-06T18:36:18",
"upload_time_iso_8601": "2024-08-06T18:36:18.248217Z",
"url": "https://files.pythonhosted.org/packages/23/f7/21e07bc23bcbf100676bf3e974358b74b93d112a83e76c9628b492aa3162/kazier-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-06 18:36:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "RAJPUTRoCkStAr",
"github_project": "Kazier",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "kazier"
}