Skip to main content

EazyML Responsible-AI: Image XAI

Python PyPI package Code Style

EazyML

This package focuses on segmentation prediction, explainability, active learning and online learning for image dataset.

Features

  • Active learning focuses on reducing the amount of labeled data required to train the model while maximizing performance, making it particularly useful when labeling data is expensive or time-consuming. By prioritizing uncertain or diverse examples, active learning accelerates model improvement and enhances efficiency.
  • Online learning is a machine learning approach where models are trained incrementally as data becomes available, rather than using a fixed, pre-existing dataset. This method is well-suited for dynamic environments, enabling real-time updates and adaptability to new patterns or changes in data streams.

Installation

User installation

The easiest way to install Image XAI is using pip:

pip install -U eazyml-xai-image

Dependencies

EazyML Image XAI requires :

  • tensorflow
  • segmentation-models==1.0.1
  • lime
  • opencv-python
  • flask
  • pyyaml

Usage

It provides following apis :

  1. ez_image_active_learning : This API sorts test images based on explainability scores for the model’s predictions. If a “query count” is specified in the options, it returns the indices and corresponding scores for that number of inputs.

    ez_image_active_learning(
            filenames=['..', '..'],
            model_path='path_of_model',
            predicted_filenames=['path_of_model_prediction_file_names'],
            options={
                "query_count": 10,
                "training_data_path": "path/to/training/data.csv",
                "score_strategy": "weighted-moments",
                "al_strategy": "pool-based",
                "xai_strategy": "gradcam",
                "gradcam_layer": "layer_name",
                "model_num": "1"
            }
        )
    
  2. ez_image_model_evaluate : This API validates a model using provided data and returns the model evaluation.

    ez_image_model_evaluate(
            validation_data_path='path_of_new_data_for_validation',
            model_path='path_of_model',
            options={
                "required_functions": {
                    "loss_fn": '...',
                    "metric_fns": '...',
                    "input_preprocess_fn": '',
                    "label_preprocess_fn": '',
                    "output_process_fn": ''
                    },
                "batch_size": 32,
                "log_file": "path/to/log/file"
            })
    
  3. ez_image_online_learning : This API updates a given model using new training data and saves the updated model. The update process adapts based on the Online Learning strategy or optimizes performance on provided validation data.

    ez_image_online_learning(
            validation_data_path='path_of_new_data_for_validation',
            model_path='path_of_model',
            options={
                "required_functions": {
                    "loss_fn": '...',
                    "metric_fns": '...',
                    "input_preprocess_fn": '',
                    "label_preprocess_fn": '',
                    "output_process_fn": ''
                },
                "batch_size": 32,
                "log_file": "path/to/log/file"
            }
        )
    
  4. ez_xai_image_explain : This API provides confidence scores and image explanations for model predictions. It can process a single image or multiple images, returning explanations for all predictions.

    ez_xai_image_explain(
            filenames=['..', '..'],
            model_path='path_of_model',
            predicted_filenames=['path_of_model_prediction_file_names'],
            options={
                "training_data_path": "...",
                "score_strategy": "weighted-moments",
                "xai_strategy": "gradcam",
                "xai_image_path": "...",
                "gradcam_layer": "layer_name",
                "model_num": "1",
                "required_functions": {...}
            }
        )
    

You can find more information in the documentation.

  • Documentation

  • Homepage

  • If you have questions or would like to discuss a use case, please contact us here

  • Here are the other packages from EazyML suite:

    • eazyml-automl: eazyml-automl provides a suite of APIs for training, optimizing and validating machine learning models with built-in AutoML capabilities, hyperparameter tuning, and cross-validation.
    • eazyml-data-quality: eazyml-data-quality provides APIs for comprehensive data quality assessment, including bias detection, outlier identification, and drift analysis for both data and models.
    • eazyml-counterfactual: eazyml-counterfactual provides APIs for optimal prescriptive analytics, counterfactual explanations, and actionable insights to optimize predictive outcomes to align with your objectives.
    • eazyml-insight: eazyml-insight provides APIs to discover patterns, generate insights, and mine rules from your datasets.
    • eazyml-xai: eazyml-xai provides APIs for explainable AI (XAI), offering human-readable explanations, feature importance, and predictive reasoning.
    • eazyml-xai-image: eazyml-xai-image provides APIs for image explainable AI (XAI).

License

This project is licensed under the Proprietary License.


Maintained by EazyML
© 2025 EazyML. All rights reserved.

Release files for eazyml-xai-image 0.0.47

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

Source distribution (sdist)

Source distribution for eazyml-xai-image 0.0.47
File Size Uploaded
eazyml_xai_image-0.0.47.tar.gz 9.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for eazyml-xai-image 0.0.47
File Interpreter ABI Platform
eazyml_xai_image-0.0.47-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 19.1 MB

Release files / eazyml_xai_image-0.0.47.tar.gz

Download URL eazyml_xai_image-0.0.47.tar.gz
Size 9.4 MB
Tags Source
SHA-256 checksum
How to use checksums
c70a40b74a02373b3ff321361c44738e90f09449eb2ee257c095080f3737ce92
BLAKE2b-256 checksum
How to use checksums
063e1aa8553f280d5eb085d06a42a7fbf0dd4de26417e9739ea5129ee0d92756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / eazyml_xai_image-0.0.47-py2.py3-none-any.whl

Download URL eazyml_xai_image-0.0.47-py2.py3-none-any.whl
Size 9.7 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fc58b3eeca1e5a64158450d0716c982dbb9ce97de955ba881647b0b19853ea60
BLAKE2b-256 checksum
How to use checksums
268e198a9f0380cdc35982cf61b7ba0d46f1fb23b3e6fe134e958394931d10d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release history Release notifications | RSS feed

This release

0.0.47 This release

2 release files

0.0.46

2 release files

0.0.45

2 release files

0.0.37

2 release files

0.0.35

2 release files

0.0.34

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