| # DoctorIA-MED-R-8B | |
| # DoctorIA Medical Solutions: Revolutionizing Healthcare with AI-Powered Diagnostics | |
|   | |
| [[Read the Paper]](https://example.com/paper) [[Demo]](https://example.com/demo) [[Hugging Face Model](https://huggingface.co/your-username/doctoria-model)] | |
| **DoctorIA** is an innovative AI-powered solution designed to enhance radiological diagnostics, improve healthcare access, and reduce disparities in underserved areas of Morocco. Leveraging state-of-the-art machine learning techniques, DoctorIA provides accurate, efficient, and scalable diagnostic support for medical professionals. | |
| --- | |
| ## Overview | |
| DoctorIA is built to assist healthcare providers with: | |
| - **Automated Medical Image Analysis**: Accurate interpretation of X-rays, MRIs, and other medical imaging technologies. | |
| - **Clinical Reasoning Support**: Advanced reasoning capabilities to assist in diagnosis, treatment planning, and risk assessment. | |
| - **Healthcare Accessibility Initiatives**: Bridging gaps in healthcare access by offering scalable solutions to underserved populations. | |
| Our mission is to empower healthcare professionals and patients alike by providing cutting-edge AI-driven diagnostic tools. | |
| --- | |
| ## Key Features | |
| - **AI-Driven Diagnostic Tools**: Supports clinical reasoning and treatment planning by providing insights derived from advanced AI algorithms. | |
| - **Radiology Assistance**: Assists radiologists with preliminary analysis of medical images. | |
| - **Patient Education**: Provides clear explanations of medical procedures and technologies. | |
| - **Multilingual Support**: Available in Arabic, French, English, and Spanish to cater to diverse populations. | |
| - **Scalable Deployment**: Optimized for deployment in resource-constrained environments, ensuring accessibility even in underserved areas. | |
| --- | |
| ## Models | |
| We release two versions of the DoctorIA model: | |
| 1. **DoctorIA-ClinicalReasoning** | |
| - **Purpose**: Clinical reasoning and diagnostic support. | |
| - **Tasks**: Symptom-to-diagnosis mapping, treatment planning, and evidence-based recommendations. | |
| - **Quantization**: Available in 4-bit precision for reduced memory usage. | |
| - **Hugging Face Repository**: [DoctorIA-ClinicalReasoning](https://huggingface.co/your-username/doctoria-clinical-reasoning) | |
| 2. **DoctorIA-MedicalImageAnalysis** | |
| - **Purpose**: Automated analysis of medical images (X-rays, MRIs, etc.). | |
| - **Tasks**: Disease detection, lesion segmentation, and abnormality classification. | |
| - **Quantization**: Available in 4-bit precision for reduced memory usage. | |
| - **Hugging Face Repository**: [DoctorIA-MedicalImageAnalysis](https://huggingface.co/your-username/doctoria-medical-image-analysis) | |
| All models are released under the **Apache 2.0 License**. | |
| --- | |
| ## Organisation of the Repository | |
| The repository is structured as follows: | |
| - **`clinical_reasoning/`**: Contains the code and resources for the clinical reasoning model. | |
| - **`medical_image_analysis/`**: Contains the code and resources for the medical image analysis model. | |
| - **`examples/`**: Example scripts for inference, fine-tuning, and integration. | |
| - **`datasets/`**: Links to datasets used for training and evaluation. | |
| - **`notebooks/`**: Jupyter notebooks for experimentation and visualization. | |
| - **`docs/`**: Additional documentation and tutorials. | |
| --- | |
| ## Requirements | |
| To use DoctorIA, you will need: | |
| - Python 3.8 or higher (Python 3.10 recommended). | |
| - PyTorch (`torch`) and Transformers (`transformers`) libraries. | |
| - GPU with at least 16GB of memory (for full-precision models). | |
| Install dependencies using: | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| For quantized models (4-bit precision), ensure you have the `bitsandbytes` library installed: | |
| ```bash | |
| pip install bitsandbytes | |
| ``` | |
| --- | |
| ## Usage | |
| ### 1. Clinical Reasoning Model | |
| Load the model and tokenizer: | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForSequenceClassification | |
| model_name = "your-username/doctoria-clinical-reasoning" | |
| tokenizer = AutoTokenizer.from_pretrained(model_name) | |
| model = AutoModelForSequenceClassification.from_pretrained(model_name) | |
| # Example input | |
| inputs = tokenizer("The patient presents with fever, cough, and shortness of breath.", return_tensors="pt") | |
| outputs = model(**inputs) | |
| predicted_diagnosis = outputs.logits.argmax().item() | |
| print(f"Predicted Diagnosis: {predicted_diagnosis}") | |
| ``` | |
| ### 2. Medical Image Analysis Model | |
| Load the model and feature extractor: | |
| ```python | |
| from transformers import AutoFeatureExtractor, AutoModelForImageClassification | |
| from PIL import Image | |
| import requests | |
| model_name = "your-username/doctoria-medical-image-analysis" | |
| feature_extractor = AutoFeatureExtractor.from_pretrained(model_name) | |
| model = AutoModelForImageClassification.from_pretrained(model_name) | |
| # Example input | |
| url = "https://example.com/chest-xray.jpg" | |
| image = Image.open(requests.get(url, stream=True).raw) | |
| inputs = feature_extractor(images=image, return_tensors="pt") | |
| outputs = model(**inputs) | |
| predicted_class = outputs.logits.argmax().item() | |
| print(f"Predicted Class: {predicted_class}") | |
| ``` | |
| --- | |
| ## Benchmarks | |
| DoctorIA has been evaluated on several benchmarks to ensure its performance and reliability: | |
| - **Clinical Reasoning**: Achieved **X% accuracy** on the DR.BENCH benchmark for clinical diagnostic reasoning. | |
| - **Medical Image Analysis**: Achieved **Y% sensitivity** and **Z% specificity** on the CheXpert benchmark for chest X-ray analysis. | |
| For more details, refer to our [paper](https://example.com/paper). | |
| --- | |
| ## Development | |
| If you wish to contribute to DoctorIA or modify it for your needs: | |
| 1. Clone the repository: | |
| ```bash | |
| git clone https://github.com/your-username/doctoria.git | |
| cd doctoria | |
| ``` | |
| 2. Install dependencies: | |
| ```bash | |
| pip install -e '.[dev]' | |
| ``` | |
| 3. Run tests: | |
| ```bash | |
| pytest | |
| ``` | |
| --- | |
| ## FAQ | |
| Check out the [Frequently Asked Questions](FAQ.md) section before opening an issue. | |
| --- | |
| ## License | |
| The codebase is released under the **Apache 2.0 License**. | |
| The model weights are released under the **CC-BY 4.0 License**. | |
| --- | |
| ## Citation | |
| If you use DoctorIA in your research or projects, please cite our work: | |
| ```bibtex | |
| @techreport{doctoria2025, | |
| title={DoctorIA: Enhancing Radiological Diagnostics with AI}, | |
| author={Jad Tounsi El Azzoiani and Team DoctorIA}, | |
| year={2025}, | |
| eprint={XXXX.XXXXX}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.AI}, | |
| url={https://example.com/paper}, | |
| } | |
| ``` |