semvec/pypi-packages huggingface dataset:
hand-recog 0.1.1
A package for hand recognition using MediaPipe and OpenCV

MediaPipe Hand Tracking Utility

A simple Python utility to perform hand landmark detection on static images and live webcam streams using Google's MediaPipe.

This package provides two simple functions, process_static_images and run_webcam_detection, that wrap the MediaPipe Hands solution for easy use. It is based on the official MediaPipe Hands example.

Features

Webcam Detection: Run real-time hand tracking on your default webcam feed with a single function call.

Static Image Processing: Process one or more static images, detect all hands, and save annotated copies to a specified directory.

3D Landmark Plotting: Optionally plots 3D world landmarks for each detected hand (requires matplotlib).

Installation

You can install this package directly from PyPI:

pip install your-package-name


This will also install all necessary dependencies.

Requirements

This package requires the following Python libraries:

opencv-python

mediapipe

matplotlib (for 3D landmark plotting)

Usage

Once installed, you can import the utility functions into your own Python scripts.

Example 1: Run Webcam Detection

This will open your default webcam (index 0) and start real-time hand detection. The annotated video stream will be displayed in an OpenCV window.

Press the 'ESC' key to quit.

# Import the package (assuming your file is named 'hand_tracker.py' inside the package)
from your_package_name import hand_tracker

# Run the webcam detection
hand_tracker.run_webcam_detection(camera_index=0)


Example 2: Process Static Images

This function will process a list of image files, draw hand landmarks on them, and save the new annotated images to an output directory.

from your_package_name import hand_tracker

# Create a list of image paths you want to process
image_list = [
    '/path/to/your/image1.jpg',
    '/path/to/your/image2.png'
]

# Specify an output directory
output_folder = "annotated_hand_images"

# Process the images
hand_tracker.process_static_images(image_list, output_dir=output_folder)

print(f"Processed images saved to '{output_folder}'")


This will create a folder named annotated_hand_images in your current directory and save files like annotated_image_0.png and annotated_image_1.png inside it.
bearcheck 0.1.4
Tiny beartype helper lib for inline type assertion and narrowing (not affiliated)
Requires Python: >=3.10

# bearcheck

Tiny extension to [beartype](https://github.com/beartype/),
which allows inline type assertion and narrowing similar to
[check_type](https://typeguard.readthedocs.io/en/stable/api.html#typeguard.check_type)
from [typeguard](https://github.com/agronholm/typeguard).

Using `bearcheck()` is *faster* and *safer* than `check_type()`, since it
leverages the incredibly fast *beartype* library for type checking, and
allows specifying the exact return type.

### Usage

```python
from bearcheck import bearcheck, Check

var = bearcheck("a", Check[Literal["a", "b"]])
reveal_type(var)  # Type of "var" is "Literal['a', 'b']"
```

.. as opposed to ..

```python
from typeguard import check_type

var = check_type("a", Literal["a", "b"])
reveal_type(var)  # Type of "var" is "Any"
```

`type_check()` returns *Any* if the type hint is not primitive, a common pitfall!