Instructions to use CaxtonEmeraldS/CholesterolConcentrationPredictor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use CaxtonEmeraldS/CholesterolConcentrationPredictor with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://CaxtonEmeraldS/CholesterolConcentrationPredictor") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-sa-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: keras
|
| 6 |
+
tags:
|
| 7 |
+
- regression
|
| 8 |
+
- tensorflow
|
| 9 |
+
- keras
|
| 10 |
+
- colourimetric-sensing
|
| 11 |
+
- biosensing
|
| 12 |
+
- cholesterol
|
| 13 |
+
- research-demo
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Cholesterol Concentration Predictor — ANN Model
|
| 17 |
+
|
| 18 |
+
## Model summary
|
| 19 |
+
|
| 20 |
+
This model repository accompanies research on the use of artificial neural networks (ANNs) and an Au@CeO₂ (gold–cerium oxide) nanozyme-based colourimetric sensor for cholesterol estimation. The corresponding **Gradio application** enables users to compare ANN predictions with a linear-regression baseline using mean RGB colour measurements.
|
| 21 |
+
|
| 22 |
+
**Publication:** Govindharaj, P., Alungal, N., Emerald, C. S. and Kannan, S. (2026). *Au@CeO₂ nanozyme based smart colourimetric sensor for cholesterol: A neural network powered point of care solution model.* **Biochemical Engineering Journal**, **225**, 109908. DOI: [10.1016/j.bej.2025.109908](https://doi.org/10.1016/j.bej.2025.109908).
|
| 23 |
+
|
| 24 |
+
**Links:** [Associated publication](https://doi.org/10.1016/j.bej.2025.109908) · [Interactive Gradio Space](https://huggingface.co/spaces/CaxtonEmeraldS/CholesterolConcentrationPredictor) · [Researcher's website](https://caxtonemerald-s.github.io)
|
| 25 |
+
|
| 26 |
+
## Intended uses
|
| 27 |
+
|
| 28 |
+
- Research and educational exploration of ANN-based colourimetric regression.
|
| 29 |
+
- Comparing predictions under different neural-network configurations **in the companion application**, to the extent that their trained files are available in its archive.
|
| 30 |
+
- Reproducing and examining the method when the original measurement protocol, preprocessing and training artefacts are available.
|
| 31 |
+
|
| 32 |
+
**Not intended for diagnosis, screening, monitoring, treatment selection or any other clinical use.** This repository does not establish medical-device validation.
|
| 33 |
+
|
| 34 |
+
## Data and features
|
| 35 |
+
|
| 36 |
+
The application uses **three numerical inputs**: mean red, green and blue intensities. Each is expected to be in the range **0–255**. These values should come from appropriately collected colourimetric measurements, rather than arbitrary photographs or uncontrolled lighting conditions.
|
| 37 |
+
|
| 38 |
+
The application code uses this transform for inference:
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
x = [[R / 256.0, G / 256.0, B / 256.0]]
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
## Architecture and model coverage
|
| 46 |
+
|
| 47 |
+
The application describes a **3–N–1** feedforward ANN: three RGB features, one hidden layer of variable width `N`, and a single output. Approximately **2,500 trained model configurations**, varying activation function, random seed and hidden-neuron count.
|
| 48 |
+
|
| 49 |
+
The Gradio Space locates its model files under:
|
| 50 |
+
|
| 51 |
+
```text
|
| 52 |
+
Models.zip
|
| 53 |
+
└── Models/
|
| 54 |
+
└── <activation>/
|
| 55 |
+
└── <seed>/
|
| 56 |
+
└── model_<number_of_hidden_neurons>.keras
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Configuration from the repository name or the publication's best-performing model can be inferred.
|
| 60 |
+
|
| 61 |
+
## Baseline and evaluation
|
| 62 |
+
|
| 63 |
+
The application implements a linear-regression comparator using normalised RGB inputs:
|
| 64 |
+
|
| 65 |
+
```python
|
| 66 |
+
linear_raw = (
|
| 67 |
+
1.9221 * (R / 256.0)
|
| 68 |
+
- 1.3817 * (G / 256.0)
|
| 69 |
+
+ 1.4058 * (B / 256.0)
|
| 70 |
+
- 0.1318
|
| 71 |
+
)
|
| 72 |
+
linear_mM = max(0.0, linear_raw) * 50.0
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
The publication's abstract reports:
|
| 76 |
+
|
| 77 |
+
| Measure | Study-reported value |
|
| 78 |
+
|---|---:|
|
| 79 |
+
| Best validation MSE | 0.0577 (hard shrink, 13 hidden neurons) |
|
| 80 |
+
| Lowest training MSE | 0.0637 (SELU, 7 hidden neurons) |
|
| 81 |
+
| Median training MSE | 0.0896 |
|
| 82 |
+
| Median validation MSE | 0.0769 |
|
| 83 |
+
| Reported colourimetric linearity range | 0–50 mM |
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
## How to use
|
| 87 |
+
|
| 88 |
+
**Recommended:** open the [companion application](https://huggingface.co/spaces/CaxtonEmeraldS/CholesterolConcentrationPredictor), supply calibrated mean RGB values, choose an available activation, seed and hidden-neuron count, and compare the outputs.
|
| 89 |
+
|
| 90 |
+
**For programmatic use:** examine the repository's actual files and loading instructions for the specific saved Keras model. The general TensorFlow/Keras pattern is:
|
| 91 |
+
|
| 92 |
+
```python
|
| 93 |
+
import numpy as np
|
| 94 |
+
import tensorflow as tf
|
| 95 |
+
|
| 96 |
+
model = tf.keras.models.load_model("path/to/model.keras", compile=False)
|
| 97 |
+
x = np.array([[R / 256.0, G / 256.0, B / 256.0]])
|
| 98 |
+
raw = float(np.asarray(model.predict(x, verbose=0)).reshape(-1)[0])
|
| 99 |
+
predicted_mM = max(0.0, raw) * 50.0
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
Replace `path/to/model.keras` with the downloaded model path.
|
| 103 |
+
|
| 104 |
+
## Limitations, safety and licence
|
| 105 |
+
|
| 106 |
+
- Experimental results depend on sample preparation, sensor chemistry, calibration, lighting, camera characteristics, image processing and domain shift.
|
| 107 |
+
- Predictions are **not** calibrated confidence intervals and should not be used as medical measurements.
|
| 108 |
+
- Clamping negative outputs to zero does not correct model error or guarantee validity.
|
| 109 |
+
- The publication reports a range of 0–50 mM; extrapolation and comparisons outside its study conditions require separate validation.
|
| 110 |
+
|
| 111 |
+
## Citation
|
| 112 |
+
|
| 113 |
+
Govindharaj, P., Alungal, N., Emerald, C. S. and Kannan, S. (2026). Au@CeO₂ nanozyme based smart colourimetric sensor for cholesterol: A neural network powered point of care solution model. *Biochemical Engineering Journal*, 225, 109908. https://doi.org/10.1016/j.bej.2025.109908
|
| 114 |
+
|
| 115 |
+
**Contact:** [Caxton Emerald S — professional website](https://caxtonemerald-s.github.io) · [ORCID](https://orcid.org/0000-0002-7763-3987)
|