andrewekhalel / sewar
All image quality metrics you need in one package.
github.com/andrewekhalel/sewarIndexed at c872e15Up to date with upstream
What is sewar?
sewar is a Python package for image quality assessment using different metrics. It computes quality measures from image arrays and provides a command-line interface for selected metrics. The package is implemented in Python.
Written by a model from the README and the source
14 files and 148 symbols in 3 modules, led by Python (11 files) and Makefile (1).
Code health
Hotspots average 6.5, the place fixes pay off most.
Use andrewekhalel/sewar in your agent
Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.
- 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
- 2.Paste the server URL below as the Remote MCP server URL, then click Add.
- 3.Click Connect. A Repowise sign-in window opens. Approve access.
- 4.Repowise's tools are now available in your Claude chats.
Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.
Docshttps://api.repowise.dev/mcp/andrewekhalel/sewar
This repo is public, so anyone with a Repowise account and an API key can connect.
Try asking
- get_overview()
- get_answer("how is sewar put together?")
- get_why("why is sewar structured this way?")
Explore sewar
- DocumentationModule-by-module documentation, written from the source.
- ArchitectureDependency graph, layers and third-party dependencies.
- Code healthEvery file's score and the findings behind it.
- CommitsEach commit's effect on code health.
- OverviewEverything else the index found: contributors, decisions, what changed this week.
Key features of sewar
- sewar implements Mean Squared Error, Root Mean Squared Error, Peak Signal-to-Noise Ratio, Structural Similarity Index, and other image quality metrics.
- sewar includes Universal Quality Image Index, Multi-scale Structural Similarity Index, ERGAS, SCC, RASE, and Spectral Angle Mapper metrics.
- sewar includes Spectral Distortion Index, Spatial Distortion Index, Quality with No Reference, Visual Information Fidelity, PSNR-B, and Q2n.
- sewar accepts NumPy arrays in H x W x C format for metric functions.
- sewar provides command-line access to metrics such as mse, rmse, psnr, uqi, ssim, and msssim.
How andrewekhalel/sewar works
Image data enters sewar through NumPy arrays in H x W x C format or through the command-line interface. The sewar/full_ref.py module provides full-reference metric functions, including UQI, which compares two image arrays. The package exposes metric names for command-line use, where a metric receives ground-truth and processed-image paths plus optional parameters. The sewar package directory holds the implementation, while docs provides documentation files. The root files support package setup and project tasks.
The codebase has 14 files and 148 symbols in 3 modules, led by Python and Makefile. Code health is 8.0 out of 10, rated good.
Getting started with sewar
- Install sewar.
pip install sewar - Install the test dependencies.
pip install pytest pytest-cov - Run the tests with coverage.
pytest --cov=sewar - Run a metric from the command line with image paths and optional parameters.
sewar [metric] [GT path] [P path] (any extra parameters)
Commands copied from the README
andrewekhalel/sewar FAQ
What is sewar?
sewar is a Python package for image quality assessment. sewar provides image quality metrics and command-line access to selected metrics.
How does sewar work?
sewar computes metrics from NumPy image arrays or command-line image paths. sewar includes full-reference functions such as UQI and accepts arrays in H x W x C format.
How do I install sewar?
sewar installs with pip install sewar. sewar can be tested after installing pytest and pytest-cov.
What language is sewar written in?
sewar is written in Python. The repository also includes a Makefile.
How is the sewar code organized?
sewar keeps its implementation in the sewar directory, documentation in docs, and project support files at the root. sewar/full_ref.py is a central metric implementation file.
Who is sewar for?
sewar is for users performing image quality assessment. sewar supports metrics that compare image data and metrics designed for quality assessment without a reference.
What license does sewar use?
sewar uses the MIT license.
The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.
About this page
Get a page like this for your own codebase
Repowise built this map of andrewekhalel/sewar from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.
Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.
Maintain andrewekhalel/sewar?
Claim this page, add a badge to the README, or re-index it.
Claim this page
Sign in with GitHub and we check that you are an admin or maintainer of andrewekhalel/sewar. Then add a badge to the README that links readers here.
Add a badge to your README
Every badge is public, cached, and updates on its own after every index. Nothing to install.
Repowise badge
Links to this page, with no score on it. Adding it also re-indexes the repo every week.
[](https://repowise.dev/repo/andrewekhalel/sewar?src=badge_wiki)Code health badge
The repo's health score out of 10, from the latest index.
[](https://repowise.dev/repo/andrewekhalel/sewar?src=badge_health)Code health card
A larger card with the score, its change since the last index, and when it was measured. The HTML version follows the reader's light or dark theme.
[](https://repowise.dev/repo/andrewekhalel/sewar?src=badge_card)