Metadata-Version: 2.4
Name: rai-audit-dl
Version: 0.1.8
Summary: Deep learning audits for image classification, medical imaging, and scientific AI
Author: Sai Teja Erukude
License: MIT License
        
        Copyright (c) 2026 Sai Teja Erukude
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: deep-learning,image-audit,medical-imaging,responsible-ai
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: rai-audit-core>=0.1.0
Provides-Extra: tensorflow
Requires-Dist: tensorflow>=2.13; extra == 'tensorflow'
Provides-Extra: torch
Requires-Dist: torch>=2.0; extra == 'torch'
Requires-Dist: torchvision>=0.15; extra == 'torch'
Description-Content-Type: text/markdown

# rai-audit-dl

Deep learning audits for image classification, medical imaging, and scientific AI.

## Features

- Image classification accuracy and per-class recall checks
- Robustness checks for recorded or callback-generated transformation predictions
- Built-in brightness, contrast, horizontal-flip, and Gaussian-noise transformations
- Grad-CAM heatmaps with PyTorch hooks or TensorFlow `GradientTape`
- Medical imaging checks for patient leakage across splits and site-level accuracy bias

## Python API

```python
from rai_audit.dl import ImageClassificationAudit

report = ImageClassificationAudit(
    y_true=y_true,
    y_pred=y_pred,
    transformed_predictions={"sensor_noise": noisy_predictions},
    persist=False,
).run()
```

To evaluate transformations directly, pass `images` and a `predictor` callback.

## CLI

Audit recorded predictions from CSV:

```bash
rai-audit dl run --data predictions.csv --task image --format html
```

Medical imaging CSV audits can add `--patient-id`, `--split`, and `--site`.

## Examples

- [`examples/scientific_ai/microscopy_audit.py`](examples/scientific_ai/microscopy_audit.py)
- [`examples/medical_imaging/audit_example.py`](examples/medical_imaging/audit_example.py)
