{"id":43822695,"url":"https://github.com/lucacrose/proofreader","last_synced_at":"2026-02-06T02:01:21.551Z","repository":{"id":331419094,"uuid":"1123940173","full_name":"lucacrose/proofreader","owner":"lucacrose","description":"⚡ High-speed vision pipeline for Roblox trades. Converts screenshots into structured Python dictionaries using YOLOv11, CLIP, and EasyOCR. Sub-40ms latency with 97%+ accuracy.","archived":false,"fork":false,"pushed_at":"2026-01-25T04:04:26.000Z","size":3108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-25T05:44:49.738Z","etag":null,"topics":["computer-vision","ocr","python","roblox"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/rbx-proofreader/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucacrose.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-28T00:50:25.000Z","updated_at":"2026-01-25T04:04:30.000Z","dependencies_parsed_at":"2026-01-24T18:02:25.805Z","dependency_job_id":null,"html_url":"https://github.com/lucacrose/proofreader","commit_stats":null,"previous_names":["lucacrose/proofreader"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lucacrose/proofreader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacrose%2Fproofreader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacrose%2Fproofreader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacrose%2Fproofreader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacrose%2Fproofreader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucacrose","download_url":"https://codeload.github.com/lucacrose/proofreader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacrose%2Fproofreader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29145565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T01:13:33.096Z","status":"online","status_checked_at":"2026-02-06T02:00:08.092Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","ocr","python","roblox"],"created_at":"2026-02-06T02:01:18.248Z","updated_at":"2026-02-06T02:01:21.471Z","avatar_url":"https://github.com/lucacrose.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proofreader 🔍\n\nA high-speed vision pipeline for reading Roblox trade screenshots.\n\n[![PyPI](https://img.shields.io/pypi/v/rbx-proofreader?color=blue\u0026label=PyPI)](https://pypi.org/project/rbx-proofreader/)\n[![Downloads](https://static.pepy.tech/badge/rbx-proofreader)](https://pepy.tech/project/rbx-proofreader)\n[![Python](https://img.shields.io/pypi/pyversions/rbx-proofreader?logo=python\u0026logoColor=white\u0026color=blue)](https://pypi.org/project/rbx-proofreader/)\n[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n[![Build Status](https://github.com/lucacrose/proofreader/actions/workflows/build.yml/badge.svg)](https://github.com/lucacrose/proofreader/actions)\n[![GPU](https://img.shields.io/badge/GPU-CUDA-blueviolet)](https://developer.nvidia.com/cuda-zone)\n[![YOLOv11](https://img.shields.io/badge/model-YOLOv11-blueviolet)](https://github.com/ultralytics/ultralytics)\n\nProofreader transforms unstructured screenshots of Roblox trades (\"proofs\", hence \"proofreader\") into structured Python dictionaries. By combining **YOLOv11** for object detection, **CLIP** for visual similarity, and **EasyOCR**, it achieves high accuracy across diverse UI themes, resolutions, and extensions.\n\n## Why Proofreader?\n\nRoblox trade screenshots are commonly used as proof in marketplaces, moderation workflows, and value analysis, yet they are manually verified and error-prone. Proofreader automates this process by converting screenshots into structured, verifiable data in milliseconds.\n\n\n## Example\n\n![Example](https://github.com/lucacrose/proofreader/raw/main/docs/assets/example.png)\n\n## ⚡ Performance\n\nTested on an **RTX 5070** using $n=500$ real-world \"worst-case\" user screenshots (compressed, cropped, and varied UI).\n\n| Metric                  | Result (E2E)                |\n|:------------------------|:----------------------------|\n| Exact Match Accuracy    | 97.2% (95% CI: 95.4–98.5%)  |\n| Median latency          | 36.8 ms                     |\n| 95th percentile latency | 73.4 ms                     |\n\n\u003e [!NOTE]\n\u003e End-to-End **(E2E)** latency includes image loading, YOLO detection, spatial organization, CLIP similarity matching, and OCR fallback.\n\n## ✨ Key Features\n\n- **Sub-40ms Latency:** Optimized with \"Fast-Path\" logic that skips OCR for high-confidence visual matches, ensuring near-instant processing.\n\n- **Multi-modal decision engine:** Weighs visual embeddings against OCR text to resolve identities across 2,500+ distinct item classes.\n\n- **Fuzzy Logic Recovery:** Built-in string distance matching corrects OCR typos and text obscurations against a local asset database.\n\n- **Theme \u0026 Scale Agnostic:** Robust performance across various UI themes (Dark/Light), resolutions, and custom display scales.\n\n## 💻 Quick Start\n\n### Installation\n\n```bash\npip install rbx-proofreader\n```\n\n\u003e [!IMPORTANT]\n\u003e **Hardware Acceleration:** Proofreader automatically detects NVIDIA GPUs. For sub-40ms performance, ensure you have the CUDA-enabled version of PyTorch installed. If a CPU-only environment is detected on a GPU-capable machine, the engine will provide the exact `pip` command to fix your environment.\n\n### Usage\n\n```py\nimport proofreader\n\n# Extract metadata from a screenshot\ndata = proofreader.get_trade_data(\"trade_proof.png\")\n\nprint(f\"Items Out: {data['outgoing']['item_count']}\")\nprint(f\"Robux In: {data['incoming']['robux_value']}\")\n```\n\n\u003e [!TIP]\n\u003e **First Run:** On your first execution, Proofreader will automatically download the model weights and item database (~360MB). Subsequent runs will use the local cache for maximum speed.\n\n## 🧩 How it Works\nThe model handles the inconsistencies of user-generated screenshots (varied crops, UI themes, and extensions) through a multi-stage process:\n\n1. **Detection:** YOLOv11 localizes item cards, thumbnails, and robux containers.\n\n2. **Spatial Organization:** Assigns child elements (names/values) to parents and determines trade side.\n\n3. **Identification:** CLIP performs similarity matching. High-confidence results become Resolved Items immediately.\n\n4. **Heuristic Judge:** Low-confidence visual matches trigger OCR and fuzzy-logic reconciliation.\n\n![Diagram](https://github.com/lucacrose/proofreader/raw/main/docs/assets/flow_diagram.png)\n\n## 📊 Data Schema\nThe `get_trade_data()` function returns a structured dictionary containing `incoming` and `outgoing` trade sides.\n\n| Key | Type | Description |\n| :--- | :--- | :--- |\n| `item_count` | `int` | Number of distinct item boxes detected. |\n| `robux_value` | `int` | Total Robux parsed from the trade. |\n| `items` | `list` | List of `ResolvedItem` objects containing `id` and `name`. |\n\n**ResolvedItem Schema:**\n\n| Property | Type | Description |\n| :--- | :--- | :--- |\n| `id` | `int` | The official Roblox Asset ID. |\n| `name` | `str` | Canonical item name from the database. |\n\n## 🏗️ Development \u0026 Training\nTo set up a custom training environment for the YOLO and CLIP models:\n\n```bash\n# 1. Clone and Install\ngit clone https://github.com/lucacrose/proofreader.git\ncd proofreader\npip install -e \".[train]\"\n\n# 2. Initialize Database\npython scripts/setup_items.py\n\n# 3. Training\n# Place backgrounds in src/proofreader/train/emulator/backgrounds\n# Place HTML templates in src/proofreader/train/emulator/templates\npython scripts/train_models.py\n```\n\n\u003e [!CAUTION]\n\u003e **GPU Required:** Training is not recommended on a CPU. Final models save to `runs/train/weights/best.pt`. Rename to `yolo.pt` and move to `src/assets/weights`.\n\n## 🛠️ Tech Stack\n\n- **Vision:** YOLOv11 (Detection), CLIP (Embeddings), OpenCV (Processing)\n- **OCR:** EasyOCR\n- **Logic:** RapidFuzz (Fuzzy String Matching)\n- **Core:** Python 3.12, PyTorch, NumPy\n\n## 🤝 Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## 📜 License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacrose%2Fproofreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacrose%2Fproofreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacrose%2Fproofreader/lists"}