semvec/pypi-packages huggingface dataset:
xmrzapp 25.10.9
Extended MRZ Passport Reader From Image
Requires Python: >=3.8

# MRZ Passport Reader from Image

This project is an implementation of a Machine-Readable Zone (MRZ) reader from images using **segmentation**, **face detection**, and **Optical Character Recognition (OCR)**. It leverages **TensorFlow Lite** models for segmentation, a **Caffe model** for face detection, and **EasyOCR** for text recognition.

---

## Features

- **MRZ Detection**: Automatically detects and segments the MRZ region in passport images.
- **Face Detection**: Identifies and crops the face from the passport image.
- **OCR with EasyOCR**: Extracts text from the segmented MRZ region.
- **Preprocessing**: Optional preprocessing steps including skew correction, shadow removal, and background clearing to improve OCR accuracy.

---

## Installation

### Prerequisites

- Python 3.10 or higher
- Git installed

### Install from GitHub

```bash
git clone https://github.com/devnbugs/xmrzapp.git
cd xmrzapp
pip install -e .


## Example Usage
```python

import cv2
from xmrz_reader import MRZReader

# Initialize the MRZReader
reader = MRZReader(
    facedetection_protxt="./xmrzapp/weights/face_detector/deploy.prototxt",
    facedetection_caffemodel="./xmrzapp/weights/face_detector/res10_300x300_ssd_iter_140000.caffemodel",
    segmentation_model="./xmrzapp/weights/mrz_detector/mrz_seg.tflite",
    easy_ocr_params={"lang_list": ["en"], "gpu": False}
)

# Load an image
image_path = "path_to_your_image.jpg"

# Perform MRZ reading with optional preprocessing and face detection
text_results, segmented_image, detected_face = reader.predict(
    image_path,
    do_facedetect=True,
    preprocess_config={
        "do_preprocess": False,
        "skewness": False,
        "delete_shadow": False,
        "clear_background": False
    }
)

# Display results
print("Recognized Text:")
for bbox, text, confidence in text_results:
    print(f"Bounding Box: {bbox}")
    print(f"Recognized Text: {text}")
    print(f"Confidence: {confidence:.2f}")
    print("-" * 50)

if detected_face is not None:
    print("Face detected in the image.")

# Show images
cv2.imshow("Segmented Image", segmented_image)
if detected_face is not None:
    cv2.imshow("Detected Face", detected_face)
cv2.waitKey(0)
cv2.destroyAllWindows()

```

 ## Example Result 
 
 
<img align="left" width="33%" src="https://github.com/devnbugs/xmrzapp/blob/main/examples/example.jpg">

<br/><br/>

<img align="left" width="33%" src="https://github.com/devnbugs/xmrzapp/blob/02ae870f473c60fb5fb7f0544e5820aee38987a0/examples/example.jpg">

<br/><br/>

After you give this image to the models , you will take this result ***P<GBRUNITED<KINGDOM<FIVE<<JODIE<PIPPA<<<<<<<1071857032GBR8501178F1601312<<<<<<<<<<<<<<02*** as a string. This study is a basic solution . Your image which you give  should be clear, and it should cover whole area.
<br/><br/>
<br/><br/>
AgLight 0.1.0
Ultra-accelerating decorator for scientific and numerical Python functions.
Requires Python: >=3.7

# AgLight

AgLight is a Python module that provides an ultra-accelerating decorator for scientific and numerical functions. It automatically uses Numba JIT compilation and parallelization if available, or falls back to multiprocessing for heavy computations if Numba is not installed.

## Features
- **@light decorator**: Accelerates your functions with minimal code changes.
- Uses Numba JIT and parallelization for optimal speed.
- Falls back to multiprocessing for large workloads if Numba is unavailable.
- Simple API: just decorate your function with `@light`.

## Installation

```bash
pip install AgLight
```

## Usage

```python
from AgLight import light

@light
def my_heavy_function(n):
    total = 0
    for i in range(n):
        total += i * i
    return total

print(my_heavy_function(1000000))
```

## Requirements
- Python 3.7+
- numpy
- (Optional) numba for maximum acceleration

## License
MIT
archive-cli 1.0.0
A CLI tool for creating and extracting archives with interactive prompts
Requires Python: >=3.13

# Archive CLI

A simple and interactive command-line tool for creating and extracting archives. Features intelligent path completion and supports both tar.gz and zip formats.

## Features

- **Interactive prompts** with tab completion for file/directory paths
- **Dual format support**: Create and extract tar.gz and zip archives
- **Auto-generated naming**: Archives and extraction directories use timestamp-based names
- **Format detection**: Automatically detects archive format when extracting
- **Professional structure**: Clean, modular codebase with separation of concerns

## Installation

```bash
# Install dependencies
uv sync

# Install as a CLI tool (optional)
uv pip install -e .
```

## Usage

### Basic Commands

```bash
# Using uv run
PYTHONPATH=src uv run python -m archive_cli.archive_cli --help

# If installed as CLI tool
archive-cli --help
```

### Creating Archives

```bash
# Start the archive command
PYTHONPATH=src uv run python -m archive_cli.archive_cli archive

# Or if installed as CLI tool
archive-cli archive
```

The tool will prompt you to:
1. Select a directory to archive (with tab completion)
2. Choose archive format (tar or zip)
3. Archives are created in current directory with format: `{dirname}_{timestamp}.{ext}`

### Extracting Archives

```bash
# Start the unarchive command
PYTHONPATH=src uv run python -m archive_cli.archive_cli unarchive

# Or if installed as CLI tool
archive-cli unarchive
```

The tool will prompt you to:
1. Select an archive file to extract (with tab completion)
2. Archive format is auto-detected
3. Contents are extracted to: `{archive_name}_{timestamp}/`

## Supported Formats

### Archive Creation
- **tar**: Creates `.tar.gz` compressed archives
- **zip**: Creates `.zip` compressed archives

### Archive Extraction
- **tar**: Supports `.tar`, `.tar.gz`, `.tgz` files
- **zip**: Supports `.zip` files

## Examples

```bash
# Example workflow
PYTHONPATH=src uv run python -m archive_cli.archive_cli archive
# Enter path: ./my_project
# Choose format: tar
# Creates: my_project_20240916_143052.tar.gz

PYTHONPATH=src uv run python -m archive_cli.archive_cli unarchive
# Enter path: ./my_project_20240916_143052.tar.gz
# Extracts to: my_project_20240916_143127/
```

## Development

This project uses uv for dependency management and follows a modular structure:

```
src/archive_cli/
\x00\x00 __init__.py
\x00\x00 archive_cli.py          # Main CLI entry point
\x00\x00 cmd/                    # Command implementations
   \x00\x00 __init__.py
   \x00\x00 archive.py         # Archive creation logic
   \x00\x00 unarchive.py       # Archive extraction logic
\x00\x00 lib/                   # Shared utilities
    \x00\x00 __init__.py
    \x00\x00 prompt.py          # Interactive prompt functions
```