Skip to main content

MamaSight

MamaSight is a Python package for analyzing images using YOLO object detection and OCR (Optical Character Recognition). It's designed to detect UI elements and text in screenshots and provide annotated visualizations.

Installation

pip install mamasight

Dependencies

MamaSight depends on the following packages:

  • torch & torchvision
  • ultralytics (v8.3.70)
  • numpy (v1.26.4)
  • OpenCV
  • PaddlePaddle & PaddleOCR (optional for OCR)
  • EasyOCR (fallback OCR)
  • pandas

Usage

from mamasight import ScreenParser

# Custom box annotation settings (optional)
box_config = {
    'box_overlay_ratio': 3200,  # Base ratio for scaling
    'text_scale': 1.0,          # Scale factor for text
    'text_thickness': 3,        # Thickness of text
    'text_padding': 5,          # Padding around text
    'thickness': 4,             # Thickness of bounding boxes
    'annotation_style': 'simple', # 'simple' or 'colorful'
}

# Initialize parser with custom settings
parser = ScreenParser(box_config=box_config)

# Setup (will auto-detect GPU/CPU if not specified)
parser.setup(yolo_device='cuda', ocr_device='cuda')  # or 'cpu' for CPU

# Analyze image (with or without OCR)
image, detections = parser.analyze('screenshot.png', use_ocr=True)

# Display the annotated image
image.show()

# View detection results as a pandas DataFrame
print(detections)

Features

  • Detect UI elements (icons, buttons, etc.) using YOLO
  • Optional text detection with OCR
  • Customizable annotation styles
  • Auto GPU/CPU detection
  • Returns both annotated image and structured detection data

License

MIT

Metadata

Release files for mamasight 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mamasight 0.1.1
File Size Uploaded
mamasight-0.1.1.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mamasight 0.1.1
File Interpreter ABI Platform
mamasight-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / mamasight-0.1.1.tar.gz

Download URL mamasight-0.1.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
289d122910f47b89937b315c1724f5865c02daf440b4a6809c9bccadb14fa0bb
BLAKE2b-256 checksum
How to use checksums
96dc557e07d4e2ee4faa7e9d4347d52decddfb5283245c8a004038a1fd001020
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / mamasight-0.1.1-py3-none-any.whl

Download URL mamasight-0.1.1-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b4a3d770e2c43a47e22cb9037e56e99a70ddbd8dfa4d5a590f260f4019967c4
BLAKE2b-256 checksum
How to use checksums
fdbfd3ec44c9c98e23ff27e3904450fb96edf22eb150e3c0880923668ca03866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page