eazyml-xai-image


Nameeazyml-xai-image JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://eazyml.com/
Summaryeazyml image explain api
upload_time2024-12-19 06:33:25
maintainerNone
docs_urlNone
authorEazyml
requires_python>=3.8
licenseNone
keywords python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Eazyml Image Explainable AI 
![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.9-brightgreen) ![Code Style](https://img.shields.io/badge/code%20style-black-black)

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.

### APIs
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": {...}
            }
        )


            

Raw data

            {
    "_id": null,
    "home_page": "https://eazyml.com/",
    "name": "eazyml-xai-image",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "python",
    "author": "Eazyml",
    "author_email": "admin@ipsoftlabs.com",
    "download_url": "https://files.pythonhosted.org/packages/b1/70/feed9c889bc90f5dd24256c7de7ef37237941b1fdb81d95f7c54f4eb5138/eazyml_xai_image-0.0.9.tar.gz",
    "platform": null,
    "description": "## Eazyml Image Explainable AI \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.9-brightgreen) ![Code Style](https://img.shields.io/badge/code%20style-black-black)\n\nThis package focuses on segmentation prediction, explainability, active learning and online learning for image dataset.\n\n### Features\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.\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.\n\n### APIs\nIt provides following apis :\n\n1. ez_image_active_learning :\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.\n\n    ```python\n    ez_image_active_learning(\n            filenames=['..', '..'],\n            model_path='path_of_model',\n            predicted_filenames=['path_of_model_prediction_file_names'],\n            options={\n                \"query_count\": 10,\n                \"training_data_path\": \"path/to/training/data.csv\",\n                \"score_strategy\": \"weighted-moments\",\n                \"al_strategy\": \"pool-based\",\n                \"xai_strategy\": \"gradcam\",\n                \"gradcam_layer\": \"layer_name\",\n                \"model_num\": \"1\"\n            }\n        )\n\n2. ez_image_model_evaluate :\nThis API validates a model using provided data and returns the model evaluation.\n    ```python\n    ez_image_model_evaluate(\n            validation_data_path='path_of_new_data_for_validation',\n            model_path='path_of_model',\n            options={\n                \"required_functions\": {\n                    \"loss_fn\": '...',\n                    \"metric_fns\": '...',\n                    \"input_preprocess_fn\": '',\n                    \"label_preprocess_fn\": '',\n                    \"output_process_fn\": ''\n                    },\n                \"batch_size\": 32,\n                \"log_file\": \"path/to/log/file\"\n            })\n\n3. ez_image_online_learning :\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.\n    ```python\n    ez_image_online_learning(\n            validation_data_path='path_of_new_data_for_validation',\n            model_path='path_of_model',\n            options={\n                \"required_functions\": {\n                    \"loss_fn\": '...',\n                    \"metric_fns\": '...',\n                    \"input_preprocess_fn\": '',\n                    \"label_preprocess_fn\": '',\n                    \"output_process_fn\": ''\n                },\n                \"batch_size\": 32,\n                \"log_file\": \"path/to/log/file\"\n            }\n        )\n\n4. ez_xai_image_explain :\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.\n    ```python\n    ez_xai_image_explain(\n            filenames=['..', '..'],\n            model_path='path_of_model',\n            predicted_filenames=['path_of_model_prediction_file_names'],\n            options={\n                \"training_data_path\": \"...\",\n                \"score_strategy\": \"weighted-moments\",\n                \"xai_strategy\": \"gradcam\",\n                \"xai_image_path\": \"...\",\n                \"gradcam_layer\": \"layer_name\",\n                \"model_num\": \"1\",\n                \"required_functions\": {...}\n            }\n        )\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "eazyml image explain api",
    "version": "0.0.9",
    "project_urls": {
        "Documentation": "https://eazyml-docs.readthedocs.io/en/latest/",
        "Homepage": "https://eazyml.com/"
    },
    "split_keywords": [
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49be93bfb40a3f48f8af46de99d0ba5ffd94f7da5d2f4d595284c9e74b5d80bb",
                "md5": "79fe49d924b5a13d123d92e20e762a85",
                "sha256": "80885a9c61584df2266fab2b5ef768fef0c6e27b99a597822a90d12c5865e6ea"
            },
            "downloads": -1,
            "filename": "eazyml_xai_image-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "79fe49d924b5a13d123d92e20e762a85",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 26509212,
            "upload_time": "2024-12-19T06:33:11",
            "upload_time_iso_8601": "2024-12-19T06:33:11.006393Z",
            "url": "https://files.pythonhosted.org/packages/49/be/93bfb40a3f48f8af46de99d0ba5ffd94f7da5d2f4d595284c9e74b5d80bb/eazyml_xai_image-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b170feed9c889bc90f5dd24256c7de7ef37237941b1fdb81d95f7c54f4eb5138",
                "md5": "7789d0f2d47bc456d0d6c3a9b87d9d67",
                "sha256": "8068e52d71d6eab4e2ea174ad4c6babd808f93ae738103785f80bb2fc2feeccd"
            },
            "downloads": -1,
            "filename": "eazyml_xai_image-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "7789d0f2d47bc456d0d6c3a9b87d9d67",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 26254244,
            "upload_time": "2024-12-19T06:33:25",
            "upload_time_iso_8601": "2024-12-19T06:33:25.038888Z",
            "url": "https://files.pythonhosted.org/packages/b1/70/feed9c889bc90f5dd24256c7de7ef37237941b1fdb81d95f7c54f4eb5138/eazyml_xai_image-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-19 06:33:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "eazyml-xai-image"
}
        
Elapsed time: 0.48950s