Metadata-Version: 2.4
Name: crea-med
Version: 0.0.3
Summary: Agentic AutoML for Biomedical Image Analysis
Author-email: Haoyu Wang <haoyu.wang.8023@gmail.com>
Project-URL: Homepage, https://github.com/uni-medical/CREA
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: funcy==2.0
Requires-Dist: humanize==4.8.0
Requires-Dist: jsonschema==4.19.2
Requires-Dist: openai>=1.69.0
Requires-Dist: anthropic>=0.20.0
Requires-Dist: pytest==7.4.3
Requires-Dist: requests==2.31.0
Requires-Dist: rich==13.7.0
Requires-Dist: dataclasses_json>=0.6.4
Requires-Dist: omegaconf>=2.3.0
Requires-Dist: loguru==0.7.2
Requires-Dist: shutup>=0.2.0
Requires-Dist: coolname>=2.2.0
Requires-Dist: igraph>=0.11.3
Requires-Dist: genson>=1.2.0
Requires-Dist: black
Requires-Dist: pre-commit
Requires-Dist: lightgbm
Requires-Dist: matplotlib
Requires-Dist: seaborn
Requires-Dist: gensim
Requires-Dist: scikit-learn
Requires-Dist: opencv-python
Requires-Dist: scipy
Requires-Dist: biopython
Requires-Dist: imbalanced-learn
Requires-Dist: h5py
Requires-Dist: numba
Requires-Dist: arrow
Requires-Dist: markovify
Requires-Dist: imgaug
Requires-Dist: scikit-optimize
Requires-Dist: plotly
Requires-Dist: hyperopt
Requires-Dist: bayesian-optimization
Requires-Dist: imagecodecs
Requires-Dist: hmmlearn
Requires-Dist: bayespy==0.5.1
Requires-Dist: sklearn-pandas
Requires-Dist: tensorpack
Requires-Dist: sentencepiece
Requires-Dist: librosa
Requires-Dist: ipykernel
Requires-Dist: ipython
Requires-Dist: nbformat
Requires-Dist: kornia
Requires-Dist: Pillow
Requires-Dist: pyparsing
Requires-Dist: pytz
Requires-Dist: PyYAML
Requires-Dist: fastai
Requires-Dist: gym
Requires-Dist: optuna
Requires-Dist: transformers
Requires-Dist: datasets==2.1.0
Requires-Dist: torchmetrics
Requires-Dist: pytorch-lightning
Requires-Dist: sympy
Requires-Dist: timm
Requires-Dist: torchinfo
Requires-Dist: pdf2image
Requires-Dist: PyPDF
Requires-Dist: pyocr
Requires-Dist: pyarrow
Requires-Dist: xlrd
Requires-Dist: backoff
Requires-Dist: streamlit==1.40.2
Requires-Dist: python-dotenv
Requires-Dist: openpyxl
Requires-Dist: langchain
Requires-Dist: langchain-openai
Requires-Dist: langchain-community
Requires-Dist: beautifulsoup4
Requires-Dist: chromadb
Requires-Dist: SimpleITK
Requires-Dist: nibabel
Requires-Dist: html2text
Requires-Dist: tiktoken
Requires-Dist: autogluon
Requires-Dist: onnxruntime==1.22.1
Requires-Dist: monai[all]==1.4.0
Requires-Dist: pydicom
Requires-Dist: lifelines
Dynamic: license-file

# CREA

**CREA** is designed to be a **C**ollaborative Failure-aware **RE**asoning **A**gent for Biomedical AutoML.

# Quick Start

## Setup environment

We recommend using `uv` to manage the environment and dependencies.

1. **Install uv** (if you haven't already):
```bash
pip install uv
```
or using the standalone installer:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

2. **Create a virtual environment with Python 3.11**:
```bash
uv venv --python 3.11
source .venv/bin/activate  # On Windows use: .venv\Scripts\activate
```

3. **Install dependencies**:
```bash
uv pip install -r requirements.txt
uv pip install -e .
```

4. **Set up API keys**:
Set up your private API key for OPENAI-compatible endpoints:
```bash
export OPENAI_BASE_URL="<your base url>" # (e.g. https://api.openai.com/v1)
export OPENAI_API_KEY="<your key>"
```
## Setup knowledge base for RAG Tool
You can create the knowledge base with `create_rag_db.sh`.
For MONAI-1.4.0, you can also download from [Huggingface](https://huggingface.co/datasets/blueyo0/monai_rag_db).

You could use this command to check whether the creation succeeds.
```
python -m crea.monai_rag.query_rag_db
``` 
## Test with Example Dataset
You can download the example dataset from [Huggingface](https://huggingface.co/datasets/blueyo0/organmnist3d).
Download command:
```
hf download blueyo0/organmnist3d --local-dir dataset/organmnist3d --repo-type dataset
```
Then run the `quick_start.sh` to test:
```
bash quick_start.sh
```

# 🙏 Acknowledgement
- We thank all medical workers and dataset owners for making public datasets available to the community.
- Thanks to the open-source of the following projects, our code is developed based on their contributions:
     - [aideml](https://github.com/WecoAI/aideml)
     - [monai](https://github.com/Project-MONAI)
     - [AutoGluon](https://github.com/autogluon/autogluon)
     - [AutoKeras](https://github.com/keras-team/autokeras)
     - [Auto-SKlearn](https://github.com/automl/auto-sklearn)
     - [ML-Master](https://github.com/sjtu-sai-agents/ML-Master)
