OrpheusAI is an intelligent diagnostic assistant designed to support dermatological analysis using deep learning. The system leverages a custom-built convolutional neural network (CNN) trained and tested on publicly available patient image data from DermNet.
The MVP implementation supports 10 disease classes, using a Keras-based CNN model optimized for image classification.
Architecture:
Backend: A Python server that loads the trained Keras model and serves predictions through a RESTful HTTP API. Frontend: A responsive client interface that allows users to upload images and receive real-time diagnostic insights.
The repository also includes a diseases.txt file that maps the model’s numerical outputs to human-readable class names, enhancing interpretability and ease of integration.
.
├─ .gitattributes
├─ README.md
├─ diseases.txt
├─ Backend/
│ ├─ Model.py
│ ├─ Model_v2_dev.py
│ ├─ requirements.txt
│ ├─ server.py
│ ├─ v1.keras
│ ├─ v2.keras
│ ├─ data/
│ └─ logs/
└─ Frontend/
Key components:
Backend/server.py: Web server exposing model inference endpoints.Backend/Model.py: Model loading/inference utilities for the current model.Backend/Model_v2_dev.py: in-progress v2 model logic.Backend/v1.keras,Backend/v2.keras: Serialized Keras models.Backend/requirements.txt: Python dependencies for the backend.Backend/data/: Data artifacts used by the backend or training scripts (if any).Backend/logs/: Runtime or training logs (created by the backend during operation).diseases.txt: One label per line (e.g., disease/condition names) used to map model outputs.
-
Model assets
- The backend uses a Keras model saved to disk (
v1.kerasorv2.keras). diseases.txtcontains the output label names (one per line). After inference, the backend maps raw model outputs (e.g., indices or probabilities) to these labels.
- The backend uses a Keras model saved to disk (
-
Backend server
server.pystarts an HTTP API (commonly using Flask or FastAPI).- On startup, it loads the selected Keras model from
Backend/and prepares it for inference. - Incoming requests are parsed, data is preprocessed, inference is performed, and results are returned as JSON.
- Logs may be written to
Backend/logs/.
-
Frontend client
- The
Frontend/directory holds the client UI (framework details depend on the files in that directory). - The frontend sends requests to the backend’s endpoints and displays model results.
- The
-
Create and activate a virtual environment:
cd Backend python -m venv .venv # Windows: .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate
-
Install dependencies:
pip install --upgrade pip pip install -r requirements.txt
-
Ensure the model files exist:
v1.kerasorv2.kerasshould be present inBackend/. (They are included in this repository.)- Ensure
diseases.txtis at the project root and readable by the server.
There are two common ways to run the backend:
- Direct Python execution:
cd Backend python server.py
Model.pycontains the primary model loading/inference utilities. If you’re customizing preprocessing or postprocessing, start here.Model_v2_dev.pyis an experimental v2 version. Use it to iterate on new architectures or preprocessing flows.- Training data and scripts:
- If training utilities are included, they will likely read/write from
Backend/data/and log toBackend/logs/. - Adjust paths and parameters in the model scripts as needed.
- If training utilities are included, they will likely read/write from
- Missing dependencies: Reinstall with
pip install -r Backend/requirements.txt. - Model loading errors:
- Verify
MODEL_PATHand that the.kerasfile exists and is readable. - Ensure Keras/TensorFlow versions are compatible.
- Verify
- Label mismatches:
- Ensure
diseases.txtlabel order matches the model’s output order.
- Ensure