File size: 3,158 Bytes
32b34c2 45df72d 32b34c2 5dd34d5 a760903 c7549ce 400dc67 a6ddad6 a760903 a6ddad6 a760903 370bf45 c7549ce 52a881a 6bfad80 52a881a 7a3e82e c7549ce 52a881a a760903 3a0e70b 6bfad80 3a0e70b 6bfad80 dce2602 6bfad80 a760903 dce2602 6bfad80 a760903 52a881a a760903 6bfad80 c55a354 6bfad80 3a0e70b 6bfad80 3a0e70b 52a881a 7a3e82e 52a881a 7a3e82e 52a881a 7a3e82e 52a881a 7a3e82e 52a881a dce2602 52a881a dce2602 a760903 dce2602 52a881a 7a3e82e a760903 7a3e82e 52a881a 182a851 a6ddad6 7a3e82e 52a881a 45df72d 7a3e82e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | ---
license: mit
language:
- en
- zh
tags:
- dermatology
- medical
- multimodal
- vision-language-model
- skin-lesion
pipeline_tag: image-text-to-text
---
# Trustworthy and Fair SkinGPT-R1 for Democratizing Dermatological Reasoning across Diverse Ethnicities

[](https://arxiv.org/abs/2511.15242)
SkinGPT-R1 is a dermatological reasoning vision language model. π©Ίβ¨
**The Chinese University of Hong Kong, Shenzhen**
## Updates
- We will soon release the SkinGPT-R1-7B weights.
## Overview
```text
SkinGPT-R1/
βββ checkpoints/
βββ environment.yml
βββ inference/
β βββ full_precision/
β βββ int4_quantized/
βββ requirements.txt
βββ README.md
```
This repo provides full-precision inference, INT4 quantized inference, multi-turn chat, and FastAPI serving.
## Install
`environment.yml` is a Conda environment definition file for reproducing the recommended runtime environment.
From scratch:
```bash
git clone https://huggingface.co/yuhos16/SkinGPT-R1
cd SkinGPT-R1
conda env create -f environment.yml
conda activate skingpt-r1
```
Manual setup:
```bash
git clone https://huggingface.co/yuhos16/SkinGPT-R1
cd SkinGPT-R1
conda create -n skingpt-r1 python=3.10.20 -y
conda activate skingpt-r1
pip install -r requirements.txt
```
## Quick Start
1. Use the repository `./checkpoints` directory as the model weights directory.
2. Prepare a test image, for example `./test_images/lesion.jpg`.
3. Run a first test.
Full precision:
```bash
bash inference/full_precision/run_infer.sh --image ./test_images/lesion.jpg
```
INT4:
```bash
bash inference/int4_quantized/run_infer.sh --image_path ./test_images/lesion.jpg
```
## Usage
| Mode | Full Precision | INT4 Quantized |
| --- | --- | --- |
| Single image | `bash inference/full_precision/run_infer.sh --image ./test_images/lesion.jpg` | `bash inference/int4_quantized/run_infer.sh --image_path ./test_images/lesion.jpg` |
| Multi-turn chat | `bash inference/full_precision/run_chat.sh --image ./test_images/lesion.jpg` | `bash inference/int4_quantized/run_chat.sh --image ./test_images/lesion.jpg` |
| API service | `bash inference/full_precision/run_api.sh` | `bash inference/int4_quantized/run_api.sh` |
Default API ports:
- Full precision: `5900`
- INT4 quantized: `5901`
Notes
- On multi-GPU servers, prepend commands with `CUDA_VISIBLE_DEVICES=0` if you want to pin one GPU.
- RTX 50 series should use the default `sdpa` path.
- A100 / RTX 3090 / RTX 4090 / H100 can also try `flash_attention_2` if their CUDA stack supports it.
## API Endpoints
Both API services expose the same endpoints:
- `POST /v1/upload/{state_id}`
- `POST /v1/predict/{state_id}`
- `POST /v1/reset/{state_id}`
- `POST /diagnose/stream`
- `GET /health`

## Disclaimer
This project is for **research and educational use only**. It is **not** a substitute for professional medical advice, diagnosis, or treatment. β οΈ
## License
This repository is released under the **MIT License**.
See [LICENSE](LICENSE) for details.
|