A versatile Python package leveraging machine learning model for efficient image comparisons.
Project description
Pixel Perfect
A versatile Python package leveraging TensorFlow's machine learning model for efficient image comparisons. Designed to seamlessly integrate with Selenium, it empowers developers with powerful tools for UI validations, making it a valuable asset for automated testing and visual verification in web applications.
Installation
You can install pixel_perfect using pip:
pip install pixel_perfect
Usage: Image Comparison
The image_similarity method allows you to compare two images and receive a boolean value indicating whether the images are similar or not. The comparison is performed with a default threshold of 0.1, providing a balance between strictness and leniency. You can customize the threshold by adjusting the value.
from pixel_perfect import image_similarity
# Provide paths to the images for comparison
image_path1
image_path2
# Compare the images with default threshold
isImageSimilar = image_similarity(image_path1, image_path2)
# Compare the images with custom threshold
isImageSimilar = image_similarity(image_path1, image_path2, 1)
You can utilize the image_similarity_score method to compare two images and obtain the similarity score. Here's a simple example:
from pixel_perfect import image_similarity
# Provide paths to the images for comparison
image_path1
image_path2
# Compare the images
similarity_score = image_similarity(image_path1, image_path2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixel_perfect-3.4.3.tar.gz.
File metadata
- Download URL: pixel_perfect-3.4.3.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e7370a1913b2d0cb946726e9312f4c64f9eb83a4db83493a1150c41c14ea982
|
|
| MD5 |
30939a6577015cf14e7d23d0c6854310
|
|
| BLAKE2b-256 |
9ece25b7b71bf31f2ad24b2dcf02c944c64e36ad2d5044d3b170cc33716b2509
|
File details
Details for the file pixel_perfect-3.4.3-py3-none-any.whl.
File metadata
- Download URL: pixel_perfect-3.4.3-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b25efde5d5bab91349a6d7d2586fcd1e5ad05dea5088e61f2788f133e899829
|
|
| MD5 |
2cd8924022f05f96189faa1a06079dd9
|
|
| BLAKE2b-256 |
5223db572ae81bb0c7f67ab44ae1a2265cf782e98351ec19e9da2b55ea4400a0
|