lifespan-predictor / README.md
SiyaYan's picture
Update readme.md
b907abc verified

A newer version of the Gradio SDK is available: 6.0.1

Upgrade
metadata
title: Lifespan Predictor
emoji: ๐Ÿ“š
colorFrom: red
colorTo: pink
sdk: gradio
sdk_version: 5.44.1
app_file: app.py
pinned: false
license: mit
short_description: remaining lifespan predictor

๐Ÿง‘โ€โš•๏ธ Lifespan Prediction Demo

This is a Gradio app that predicts the remaining lifespan (in years) from a face image using a fine-tuned DINOv2 model.
The model was trained on the Remaining Lifespan Prediction Faces dataset.


๐Ÿš€ How it works

  • Upload a face photo or use your webcam.
  • The model extracts features with a DINOv2 ViT-L backbone.
  • A regression head outputs the predicted remaining lifespan (years).

๐Ÿ–ฅ๏ธ Usage

  1. Click โ€œUse Webcamโ€ or โ€œUpload Imageโ€.
  2. Wait a few seconds for processing (faster on GPU).
  3. The result will be shown in the output box:
    Estimated remaining lifespan: XX.X years

โš™๏ธ Technical Details

  • Backbone: dinov2_vitl14_reg (frozen during training)
  • Hidden dimension: 128
  • Loss: Heteroscedastic Negative Log Likelihood (NLL)
  • Best checkpoint saved during training โ†’ uploaded to Model Hub.

๐Ÿ“ฆ Files in this Space

  • app.py โ†’ Gradio app definition
  • requirements.txt โ†’ dependencies
  • README.md โ†’ this file

โš ๏ธ Disclaimer

This demo is for research and educational purposes only.
Predictions are not medical advice and should not be used in real-world decision-making.