Inspiration
Anaemia can go unnoticed for a long time, and confirming it usually needs a proper medical test. I wondered if computer vision could find useful patterns in photos of the inner eyelid (the conjunctiva) and how those patterns relate to anaemia.
So I built Pallor, an independent machine learning research project. I didn't want to make another flashy AI demo. I wanted to test different approaches, see what image based machine learning can actually show, and be honest about where it falls short.
What it does
Pallor looks at the colour patterns in conjunctiva images and checks how they relate to the anaemia labels in the dataset.
- Image analysis: It works on cropped conjunctiva images.
- Colour features: It reads colour information across RGB, HSV and LAB colour spaces.
- Machine learning: A trained model looks for links between those features and the labels.
- Research dashboard: It shows how well the model performed.
- Limitations section: It explains the dataset's weak points, things that could mislead the model, and why the results shouldn't be stretched too far.
Pallor is an experimental research prototype, not a medical diagnostic tool. Its predictions are not clinically validated and should never replace a doctor or a lab test.
How I built it
I used Python, classical machine learning, image processing and Gradio.
- Feature engineering: I wrote a pipeline that pulls out 35 colour features, including RGB, HSV, LAB and redness indices.
- Model experiments: I tried several classical algorithms and compared them with deep learning.
- Fair evaluation: I used one fixed, stratified train and test split, plus cross validation.
- Metrics: I checked ROC AUC, sensitivity, specificity, precision and F1 score.
- Inference: I connected the chosen model to the app, keeping feature extraction and feature order exactly the same as in training.
- The app: I built a Gradio interface with image analysis, example cases, a performance dashboard and a limitations page.
I also wrote down every experiment and decision, so the results make sense in context and aren't just numbers on a screen.
Challenges I ran into
The hardest lesson was that a model finding patterns doesn't mean it learned anything medically meaningful.
I tried several classical and deep learning models. The complex ones didn't reliably beat the simple ones, and predicting haemoglobin levels turned out to be especially hard.
I also looked for things that could trick the model. For example, how much tissue is visible in an image might affect its predictions. That made me ask whether the model was reading real colour patterns or leaning on something unrelated.
The small dataset added more doubt. A model can look good on a small test set and still fail on new patients, new populations or different cameras.
Another challenge was making the app honest about all this, so people wouldn't walk away with a false sense of medical certainty. Working through it taught me to question my results instead of just picking the model with the best score.
Accomplishments that we're proud of
I built this alone, from feature engineering and model testing to evaluation, inference and the app itself.
I'm most proud of:
- Building a complete computer vision research pipeline.
- Comparing classical models against deep learning fairly.
- Keeping evaluation reproducible with a fixed test set.
- Hunting for hidden factors instead of trusting metrics alone.
- Making an interface that shows both the results and their limits.
- Writing down the failed experiments next to the promising ones.
The real win wasn't getting a model to work. It was building a way of working that showed me what the model could learn, where it struggled, and why the results need careful reading.
What I learned
Healthcare machine learning takes much more than a high accuracy number.
Data quality, sample size, data leakage, evaluation method and how well a model generalises all matter. A model can pick up statistical links without those links meaning anything clinically.
I also learned how much reproducibility matters. Fixed splits, consistent feature extraction, fair comparisons and good notes made my conclusions easier to trust.
And I learned that explaining uncertainty is as important as showing results. In healthcare, overselling a model does more harm than admitting an experiment didn't work out.
Most of all, I learned to challenge my own assumptions.
What's next for Pallor
Pallor is still an early stage prototype, and a lot has to happen before it could help in the real world. Next I want to:
- Test it on larger datasets collected independently.
- Check for patient level data leakage and other sources of bias.
- Study how lighting, image quality, cameras and visible tissue change the results.
- Improve generalisation and check calibration before giving any risk estimates.
- Find clinical partners for independent validation.
- See whether image analysis could support existing screening methods without replacing medical tests.
My long term goal is to find out whether simple, accessible computer vision can help anaemia research while staying scientific and responsible.
Pallor is a starting point, not a medical answer. I built it to ask a question, challenge my own assumptions, and understand both what machine learning can do in healthcare and where it stops.
Built With
- artificial-intelligence
- computer-vision
- data-science
- deep-learning
- extra-trees
- feature-engineering
- gradio
- healthcare
- image-processing
- logistic-regression
- machine-learning
- medical-research
- numpy
- opencv
- pandas
- pillow
- python
- responsible-ai
- scikit-learn
- xgboost
Log in or sign up for Devpost to join the conversation.