SiyaYan commited on
Commit
b907abc
·
verified ·
1 Parent(s): 1399546

Update readme.md

Browse files
Files changed (1) hide show
  1. README.md +43 -1
README.md CHANGED
@@ -11,4 +11,46 @@ license: mit
11
  short_description: remaining lifespan predictor
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  short_description: remaining lifespan predictor
12
  ---
13
 
14
+ # 🧑‍⚕️ Lifespan Prediction Demo
15
+
16
+ This is a **Gradio app** that predicts the **remaining lifespan (in years)** from a face image using a fine-tuned [DINOv2](https://github.com/facebookresearch/dinov2) model.
17
+ The model was trained on the [Remaining Lifespan Prediction Faces](https://huggingface.co/datasets/TristanKE/RemainingLifespanPredictionFaces) dataset.
18
+
19
+ ---
20
+
21
+ ## 🚀 How it works
22
+ - Upload a face photo **or** use your **webcam**.
23
+ - The model extracts features with a **DINOv2 ViT-L backbone**.
24
+ - A regression head outputs the predicted **remaining lifespan (years)**.
25
+
26
+ ---
27
+
28
+ ## 🖥️ Usage
29
+ 1. Click **“Use Webcam”** or **“Upload Image”**.
30
+ 2. Wait a few seconds for processing (faster on GPU).
31
+ 3. The result will be shown in the output box:
32
+ Estimated remaining lifespan: XX.X years
33
+
34
+ ---
35
+
36
+ ## ⚙️ Technical Details
37
+ - Backbone: `dinov2_vitl14_reg` (frozen during training)
38
+ - Hidden dimension: `128`
39
+ - Loss: **Heteroscedastic Negative Log Likelihood (NLL)**
40
+ - Best checkpoint saved during training → uploaded to [Model Hub](https://huggingface.co/SiyaYan/lifespan-predictor).
41
+
42
+ ---
43
+
44
+ ## 📦 Files in this Space
45
+ - `app.py` → Gradio app definition
46
+ - `requirements.txt` → dependencies
47
+ - `README.md` → this file
48
+
49
+ ---
50
+
51
+ ## ⚠️ Disclaimer
52
+ This demo is for **research and educational purposes only**.
53
+ Predictions are **not medical advice** and should not be used in real-world decision-making.
54
+
55
+ ---
56
+