eazyml-xai-image


Nameeazyml-xai-image JSON
Version 0.0.35 PyPI version JSON
download
home_pagehttps://eazyml.com/
Summaryeazyml-image-xai provides APIs for explainable AI (XAI)
upload_time2025-02-27 16:02:36
maintainerNone
docs_urlNone
authorEazyml
requires_python>=3.7
licenseNone
keywords python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## EazyML Responsible-AI: Image XAI
![Python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)  ![PyPI package](https://img.shields.io/badge/pypi%20package-0.0.35-brightgreen) ![Code Style](https://img.shields.io/badge/code%20style-black-black)

![EazyML](https://github.com/EazyML/eazyml-docs/raw/refs/heads/master/EazyML_logo.png)

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 augmented intelligence is using pip:
```bash
pip install -U eazyml-xai-image
```

### Dependencies
Eazyml Augmented Intelligence 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.

    ```python
    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.

    ```python
    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.

    ```python
    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.

    ```python
    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](https://eazyml.readthedocs.io/en/latest/packages/eazyml_xai_image.html).

## Useful links, other packages from EazyML family
- [Documentation](https://docs.eazyml.com)
- [Homepage](https://eazyml.com)
- If you have questions or would like to discuss a use case, please contact us [here](https://eazyml.com/trust-in-ai)
- Here are the other packages from EazyML suite:

    - [eazyml-automl](https://pypi.org/project/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](https://pypi.org/project/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](https://pypi.org/project/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](https://pypi.org/project/eazyml-insight/): eazyml-insight provides APIs to discover patterns, generate insights, and mine rules from your datasets.
    - [eazyml-xai](https://pypi.org/project/eazyml-xai/): eazyml-xai provides APIs for explainable AI (XAI), offering human-readable explanations, feature importance, and predictive reasoning.
    - [eazyml-xai-image](https://pypi.org/project/eazyml-xai-image/): eazyml-xai-image provides APIs for image explainable AI (XAI).

## License
This project is licensed under the [Proprietary License](https://github.com/EazyML/eazyml-docs/blob/master/LICENSE).

---

Maintained by [EazyML](https://eazyml.com)  
© 2025 EazyML. All rights reserved.

            

Raw data

            {
    "_id": null,
    "home_page": "https://eazyml.com/",
    "name": "eazyml-xai-image",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "python",
    "author": "Eazyml",
    "author_email": "admin@ipsoftlabs.com",
    "download_url": "https://files.pythonhosted.org/packages/54/68/67393fe6bd561ae816ffa52d0feffd4b1cae1c05c7e752f8e0940e699126/eazyml_xai_image-0.0.35.tar.gz",
    "platform": null,
    "description": "## EazyML Responsible-AI: Image XAI\r\n![Python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)  ![PyPI package](https://img.shields.io/badge/pypi%20package-0.0.35-brightgreen) ![Code Style](https://img.shields.io/badge/code%20style-black-black)\r\n\r\n![EazyML](https://github.com/EazyML/eazyml-docs/raw/refs/heads/master/EazyML_logo.png)\r\n\r\nThis package focuses on segmentation prediction, explainability, active learning and online learning for image dataset.\r\n\r\n### Features\r\n- 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.\r\n- 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.\r\n\r\n## Installation\r\n### User installation\r\nThe easiest way to install augmented intelligence is using pip:\r\n```bash\r\npip install -U eazyml-xai-image\r\n```\r\n\r\n### Dependencies\r\nEazyml Augmented Intelligence requires :\r\n- tensorflow\r\n- segmentation-models==1.0.1\r\n- lime\r\n- opencv-python\r\n- flask\r\n- pyyaml\r\n\r\n## Usage\r\nIt provides following apis :\r\n\r\n1. ez_image_active_learning :\r\nThis API sorts test images based on explainability scores for the model\u2019s predictions. If a \u201cquery count\u201d is specified in the options, it returns the indices and corresponding scores for that number of inputs.\r\n\r\n    ```python\r\n    ez_image_active_learning(\r\n            filenames=['..', '..'],\r\n            model_path='path_of_model',\r\n            predicted_filenames=['path_of_model_prediction_file_names'],\r\n            options={\r\n                \"query_count\": 10,\r\n                \"training_data_path\": \"path/to/training/data.csv\",\r\n                \"score_strategy\": \"weighted-moments\",\r\n                \"al_strategy\": \"pool-based\",\r\n                \"xai_strategy\": \"gradcam\",\r\n                \"gradcam_layer\": \"layer_name\",\r\n                \"model_num\": \"1\"\r\n            }\r\n        )\r\n    ```\r\n\r\n2. ez_image_model_evaluate :\r\nThis API validates a model using provided data and returns the model evaluation.\r\n\r\n    ```python\r\n    ez_image_model_evaluate(\r\n            validation_data_path='path_of_new_data_for_validation',\r\n            model_path='path_of_model',\r\n            options={\r\n                \"required_functions\": {\r\n                    \"loss_fn\": '...',\r\n                    \"metric_fns\": '...',\r\n                    \"input_preprocess_fn\": '',\r\n                    \"label_preprocess_fn\": '',\r\n                    \"output_process_fn\": ''\r\n                    },\r\n                \"batch_size\": 32,\r\n                \"log_file\": \"path/to/log/file\"\r\n            })\r\n    ```\r\n\r\n3. ez_image_online_learning :\r\nThis 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.\r\n\r\n    ```python\r\n    ez_image_online_learning(\r\n            validation_data_path='path_of_new_data_for_validation',\r\n            model_path='path_of_model',\r\n            options={\r\n                \"required_functions\": {\r\n                    \"loss_fn\": '...',\r\n                    \"metric_fns\": '...',\r\n                    \"input_preprocess_fn\": '',\r\n                    \"label_preprocess_fn\": '',\r\n                    \"output_process_fn\": ''\r\n                },\r\n                \"batch_size\": 32,\r\n                \"log_file\": \"path/to/log/file\"\r\n            }\r\n        )\r\n    ```\r\n\r\n4. ez_xai_image_explain :\r\nThis API provides confidence scores and image explanations for model predictions. It can process a single image or multiple images, returning explanations for all predictions.\r\n\r\n    ```python\r\n    ez_xai_image_explain(\r\n            filenames=['..', '..'],\r\n            model_path='path_of_model',\r\n            predicted_filenames=['path_of_model_prediction_file_names'],\r\n            options={\r\n                \"training_data_path\": \"...\",\r\n                \"score_strategy\": \"weighted-moments\",\r\n                \"xai_strategy\": \"gradcam\",\r\n                \"xai_image_path\": \"...\",\r\n                \"gradcam_layer\": \"layer_name\",\r\n                \"model_num\": \"1\",\r\n                \"required_functions\": {...}\r\n            }\r\n        )\r\n    ```\r\nYou can find more information in the [documentation](https://eazyml.readthedocs.io/en/latest/packages/eazyml_xai_image.html).\r\n\r\n## Useful links, other packages from EazyML family\r\n- [Documentation](https://docs.eazyml.com)\r\n- [Homepage](https://eazyml.com)\r\n- If you have questions or would like to discuss a use case, please contact us [here](https://eazyml.com/trust-in-ai)\r\n- Here are the other packages from EazyML suite:\r\n\r\n    - [eazyml-automl](https://pypi.org/project/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.\r\n    - [eazyml-data-quality](https://pypi.org/project/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.\r\n    - [eazyml-counterfactual](https://pypi.org/project/eazyml-counterfactual/): eazyml-counterfactual provides APIs for optimal prescriptive analytics, counterfactual explanations, and actionable insights to optimize predictive outcomes to align with your objectives.\r\n    - [eazyml-insight](https://pypi.org/project/eazyml-insight/): eazyml-insight provides APIs to discover patterns, generate insights, and mine rules from your datasets.\r\n    - [eazyml-xai](https://pypi.org/project/eazyml-xai/): eazyml-xai provides APIs for explainable AI (XAI), offering human-readable explanations, feature importance, and predictive reasoning.\r\n    - [eazyml-xai-image](https://pypi.org/project/eazyml-xai-image/): eazyml-xai-image provides APIs for image explainable AI (XAI).\r\n\r\n## License\r\nThis project is licensed under the [Proprietary License](https://github.com/EazyML/eazyml-docs/blob/master/LICENSE).\r\n\r\n---\r\n\r\nMaintained by [EazyML](https://eazyml.com)  \r\n\u00a9 2025 EazyML. All rights reserved.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "eazyml-image-xai provides APIs for explainable AI (XAI)",
    "version": "0.0.35",
    "project_urls": {
        "Contact Us": "https://eazyml.com/trust-in-ai",
        "Documentation": "https://docs.eazyml.com/",
        "Homepage": "https://eazyml.com/",
        "eazyml-automl": "https://pypi.org/project/eazyml-automl/",
        "eazyml-counterfactual": "https://pypi.org/project/eazyml-counterfactual/",
        "eazyml-data-quality": "https://pypi.org/project/eazyml-data-quality/",
        "eazyml-insight": "https://pypi.org/project/eazyml-insight/",
        "eazyml-xai": "https://pypi.org/project/eazyml-xai/",
        "eazyml-xai-image": "https://pypi.org/project/eazyml-xai-image/"
    },
    "split_keywords": [
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41d8753e994ab0a51efae7bfcf89bc24bb06c101143f3d7b368657e5e79df950",
                "md5": "dc3f8b6ba774e020a6e09a4625babb08",
                "sha256": "9b995a2faf684e6a23cc7a8d4aa4acc63a6f79d03377795f700c241f7be3b66b"
            },
            "downloads": -1,
            "filename": "eazyml_xai_image-0.0.35-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc3f8b6ba774e020a6e09a4625babb08",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 45444030,
            "upload_time": "2025-02-27T16:02:22",
            "upload_time_iso_8601": "2025-02-27T16:02:22.435827Z",
            "url": "https://files.pythonhosted.org/packages/41/d8/753e994ab0a51efae7bfcf89bc24bb06c101143f3d7b368657e5e79df950/eazyml_xai_image-0.0.35-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "546867393fe6bd561ae816ffa52d0feffd4b1cae1c05c7e752f8e0940e699126",
                "md5": "1bb95cbbad31f743d7ac810b0573205f",
                "sha256": "2f5a46cfe306f4727d3281ed9998386d97f7caa3c608f238f3b3eb9764320e72"
            },
            "downloads": -1,
            "filename": "eazyml_xai_image-0.0.35.tar.gz",
            "has_sig": false,
            "md5_digest": "1bb95cbbad31f743d7ac810b0573205f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 44755312,
            "upload_time": "2025-02-27T16:02:36",
            "upload_time_iso_8601": "2025-02-27T16:02:36.648685Z",
            "url": "https://files.pythonhosted.org/packages/54/68/67393fe6bd561ae816ffa52d0feffd4b1cae1c05c7e752f8e0940e699126/eazyml_xai_image-0.0.35.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-27 16:02:36",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "eazyml-xai-image"
}
        
Elapsed time: 0.85445s