Metadata-Version: 2.4
Name: TED_QSRT
Version: 0.1.0
Summary: A modular QSR Order Verification Python Package
Author: Your Name
Author-email: your.email@example.com
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: python-multipart
Requires-Dist: ultralytics
Requires-Dist: easyocr
Requires-Dist: opencv-python-headless
Requires-Dist: numpy
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TED_QSRT

A modular, highly accurate computer vision verification system designed for Quick Service Restaurants (QSRs).
This package compares a camera image of a packed food tray with OCR text extracted from an order receipt to ensure the order is correct.

## Installation

You can install this directly from source:
```bash
cd fastfood_verifier_project
pip install -e .
```

Or build a **distribution wheel** for deployment on other servers:
```bash
# Build the wheel
python setup.py sdist bdist_wheel

# Install the wheel (replace with actual filename in dist/)
pip install dist/TED_QSRT-0.1.0-py3-none-any.whl
```

## Command Line Usage

Once installed, you can trigger the AI verification pipeline directly from the terminal. 
It accepts two image paths and returns a JSON verification result.

```bash
ted-qsrt --item inputs/camera_view.jpg --receipt inputs/order_receipt.jpg
```

Alternatively, you can run the module directly:
```bash
python -m TED_QSRT --item inputs/camera_view.jpg --receipt inputs/order_receipt.jpg
```

## REST API Server Usage

This package also comes with a built-in FastAPI server to immediately work with web interfaces or edge/mobile devices (iOS/Android).

Start the API Server:
```bash
uvicorn TED_QSRT.api.server:app --host 0.0.0.0 --port 8000
```

### Endpoints

**`POST /verify`**
Accepts two multipart image uploads: `item_image` and `receipt_image`.
Returns a JSON object containing the comparison results.

**Example Request:**
```bash
curl -X POST "http://localhost:8000/verify" \
  -H "accept: application/json" \
  -H "Content-Type: multipart/form-data" \
  -F "item_image=@inputs/camera_view.jpg" \
  -F "receipt_image=@inputs/order_receipt.jpg"
```
