Skip to main content

Benchmark evaluation for widget code generation — 12 quality metrics across layout, legibility, perceptual, style, and geometry.

Project description

widget2code-bench

Benchmark evaluation for widget code generation — 12 quality metrics across layout, legibility, perceptual, style, and geometry.

Installation

pip install widget2code-bench

Usage

widget2code-bench \
  --gt_dir /path/to/GT \
  --pred_dir /path/to/predictions \
  --pred_name output.png

Directory Structure

  • GT dir: flat image files with 4-digit IDs in filenames (e.g. gt_0001.png)
  • Pred dir: subfolders with 4-digit IDs in names, each containing --pred_name file
gt_dir/                     pred_dir/
  gt_0001.png                 image_0001/
  gt_0002.png                   output.png
  ...                         image_0002/
                                output.png

Options

Flag Default Description
--gt_dir (required) GT directory (flat image files)
--pred_dir (required) Prediction directory (subfolders)
--pred_name output.png Prediction filename inside each subfolder
--output_dir {pred_dir}/.analysis Statistics output directory
--workers 4 Parallel threads
--cuda off Enable GPU
--skip_eval off Skip evaluation, only generate statistics

Pipeline

  1. Evaluation — Computes 12 quality metrics for each GT-prediction pair
  2. Statistics — Aggregates results into metrics_stats.json and metrics.xlsx

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

widget2code_bench-0.1.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

widget2code_bench-0.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file widget2code_bench-0.1.0.tar.gz.

File metadata

  • Download URL: widget2code_bench-0.1.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for widget2code_bench-0.1.0.tar.gz
Algorithm Hash digest
SHA256 57559388c66548630649551ab5995c8f1e5bc1e1ae35bcc7e161721f62d2a079
MD5 831fa3beec058543630a6b210f951aa9
BLAKE2b-256 1470eacdfc2f9979f2c2111131adae8d8284316e1caab3f713b4e28d435c5a07

See more details on using hashes here.

File details

Details for the file widget2code_bench-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for widget2code_bench-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1a654ea56c7ca5cf21c0bd5bd6728e22b8574123b44c88cf8f9a35fe4c0ea31
MD5 da5d2b393c06786c7b438330ee6ab058
BLAKE2b-256 1387b9e38d6d1e420513f0755e25e0724a5c7e81f85035b4f173ee2acd8bf2b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page