ljc-1222 commited on
Commit
fc683a9
·
verified ·
1 Parent(s): ec05716

organize fold0 checkpoint package

Browse files
README.md CHANGED
@@ -1,202 +1,154 @@
1
  ---
2
- base_model: llava-hf/llava-1.5-7b-hf
3
- library_name: peft
 
 
 
 
 
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
9
 
 
10
 
 
11
 
12
- ## Model Details
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
 
18
 
 
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
 
 
 
 
35
 
36
- ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
 
 
 
 
39
 
40
- ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
43
 
44
- [More Information Needed]
 
 
 
 
 
 
45
 
46
- ### Downstream Use [optional]
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
 
50
- [More Information Needed]
 
 
 
 
 
 
51
 
52
- ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
 
56
- [More Information Needed]
57
 
58
- ## Bias, Risks, and Limitations
 
 
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
 
62
- [More Information Needed]
 
 
63
 
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
200
- ### Framework versions
201
-
202
- - PEFT 0.13.2
 
1
  ---
2
+ pretty_name: LMOL FBP5500 Fold0 Checkpoint
3
+ tags:
4
+ - lmol
5
+ - facial-beauty-prediction
6
+ - facial-attractiveness-prediction
7
+ - scut-fbp5500
8
+ - llava
9
+ - qlora
10
+ - peft
11
+ - checkpoint
12
  ---
13
 
14
+ # LMOL-FBP5500 Fold0 Checkpoint
15
 
16
+ This Hugging Face Dataset repository stores the fold0 checkpoint package and small result artifacts for the GitHub repository:
17
 
18
+ <https://github.com/ljc-1222/Order-Learning-with-Large-Multimodal-Models-for-Facial-Beauty-Prediction>
19
 
20
+ It is hosted as a Dataset repository to keep the GitHub repository lightweight. The package is not a redistribution of SCUT-FBP5500 images or labels.
21
 
22
+ ## Paper
23
 
24
+ This checkpoint is for an implementation of:
25
 
26
+ > Zhenyou Liu, Xuefeng Liang, and Jian Lin, "Large Multimodal Model is a Better Comparator on Facial Beauty Prediction," ICASSP 2025. DOI: [10.1109/ICASSP49660.2025.10889943](https://doi.org/10.1109/ICASSP49660.2025.10889943)
27
 
28
+ The method uses a large multimodal model as a pairwise comparator. Given two face images, the model predicts `First.`, `Second.`, or `Similar.`, and absolute SCUT-FBP5500 beauty scores are estimated from many pairwise comparisons.
29
 
30
+ ## Repository Layout
31
 
32
+ ```text
33
+ .
34
+ ├── README.md
35
+ ├── checkpoints/
36
+ │ └── fold0/
37
+ │ ├── adapter_config.json
38
+ │ ├── adapter_model.safetensors
39
+ │ ├── projector.pt
40
+ │ ├── tokenizer.json
41
+ │ ├── tokenizer_config.json
42
+ │ ├── processor_config.json
43
+ │ ├── preprocessor_config.json
44
+ │ ├── special_tokens_map.json
45
+ │ ├── chat_template.json
46
+ │ └── README.md
47
+ └── results/
48
+ └── fold0/
49
+ ├── metrics.json
50
+ ├── confusion_matrix.json
51
+ ├── progress.json
52
+ └── README.md
53
+ ```
54
 
55
+ ## Download
56
 
57
+ Run the download command from the GitHub repository root. It writes files to `checkpoints/fold0/`, which is the path expected by the evaluation examples.
58
 
59
+ ```bash
60
+ pip install -U huggingface_hub
61
+ hf download ljc-1222/LMOL-fbp5500 \
62
+ --repo-type dataset \
63
+ --include "checkpoints/fold0/*" \
64
+ --local-dir .
65
+ ```
66
 
67
+ To download both the checkpoint and result JSON files:
68
 
69
+ ```bash
70
+ hf download ljc-1222/LMOL-fbp5500 \
71
+ --repo-type dataset \
72
+ --include "checkpoints/fold0/*" "results/fold0/*" \
73
+ --local-dir .
74
+ ```
75
 
76
+ Python equivalent:
77
 
78
+ ```python
79
+ from huggingface_hub import snapshot_download
80
 
81
+ snapshot_download(
82
+ repo_id="ljc-1222/LMOL-fbp5500",
83
+ repo_type="dataset",
84
+ allow_patterns=["checkpoints/fold0/*"],
85
+ local_dir=".",
86
+ )
87
+ ```
88
 
89
+ ## Use With The GitHub Repository
90
 
91
+ After installing dependencies, preparing SCUT-FBP5500, and building fold0 pairs, run:
92
 
93
+ ```bash
94
+ python scripts/evaluate_fold.py \
95
+ --config configs/lmol_scut_fbp5500.yaml \
96
+ --fold-index 0 \
97
+ --checkpoint checkpoints/fold0 \
98
+ --batch-size 8
99
+ ```
100
 
101
+ Full fold0 evaluation scores 374,000 target-reference pairs and can take many hours. Use `--limit 256` only for a checkpoint smoke test; it does not reproduce the reported metrics.
102
 
103
+ ## Fold0 Result
104
 
105
+ Score metrics from `results/fold0/metrics.json`:
106
 
107
+ | Split | PC ↑ | MAE ↓ | RMSE ↓ |
108
+ | --- | ---: | ---: | ---: |
109
+ | Fold 0 | 0.9568 | 0.1643 | 0.2130 |
110
 
111
+ Pairwise metrics computed from `results/fold0/confusion_matrix.json` and `results/fold0/progress.json`:
112
 
113
+ | Split | Accuracy ↑ | Macro Precision ↑ | Macro Recall ↑ | Macro F1 ↑ | Weighted F1 �� | Pairwise NLL ↓ |
114
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: |
115
+ | Fold 0 | 0.8649 | 0.8145 | 0.8354 | 0.8195 | 0.8723 | 0.3384 |
116
 
117
+ Per-answer pairwise metrics:
118
+
119
+ | Gold Label | Support | Predicted | Precision ↑ | Recall ↑ | F1 ↑ |
120
+ | --- | ---: | ---: | ---: | ---: | ---: |
121
+ | `First.` | 120,836 | 110,502 | 0.9335 | 0.8537 | 0.8918 |
122
+ | `Second.` | 194,770 | 185,020 | 0.9557 | 0.9079 | 0.9312 |
123
+ | `Similar.` | 58,394 | 78,478 | 0.5541 | 0.7446 | 0.6354 |
124
+
125
+ ## Checkpoint Details
126
+
127
+ - Base model: `llava-hf/llava-1.5-7b-hf`
128
+ - Trainable modules: PEFT LoRA adapters on the language model and the full multimodal projector.
129
+ - Frozen modules: CLIP visual encoder.
130
+ - LoRA: `r=8`, `lora_alpha=32`, `lora_dropout=0.05`.
131
+ - Training objective: `choice_token`.
132
+ - Fold: deterministic SCUT-FBP5500 fold0 with `split_seed: 42`.
133
+
134
+ The `projector.pt` file is required. Loading only the PEFT adapter is incomplete for this implementation.
135
+
136
+ ## Limitations And Terms
137
+
138
+ - This repository contains a checkpoint package and result metadata only. It does not contain SCUT-FBP5500 images or labels.
139
+ - Users must obtain SCUT-FBP5500 from the official source and comply with the dataset authors' terms.
140
+ - The GitHub repository currently does not specify a project license. Reuse rights should be clarified before redistribution.
141
+ - Facial beauty prediction is sensitive and subjective. Use the checkpoint only for research reproduction and with appropriate ethical review.
142
+
143
+ ## Citation
144
+
145
+ ```bibtex
146
+ @inproceedings{liu2025large,
147
+ title = {Large Multimodal Model is a Better Comparator on Facial Beauty Prediction},
148
+ author = {Liu, Zhenyou and Liang, Xuefeng and Lin, Jian},
149
+ booktitle = {ICASSP 2025 - 2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)},
150
+ pages = {1--5},
151
+ year = {2025},
152
+ doi = {10.1109/ICASSP49660.2025.10889943}
153
+ }
154
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
checkpoints/fold0/README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Fold0 Checkpoint Files
2
+
3
+ This folder contains the fold0 LMOL checkpoint package used by the GitHub repository evaluation examples.
4
+
5
+ Required files:
6
+
7
+ - `adapter_config.json`
8
+ - `adapter_model.safetensors`
9
+ - `projector.pt`
10
+ - `tokenizer.json`
11
+ - `tokenizer_config.json`
12
+ - `processor_config.json`
13
+ - `preprocessor_config.json`
14
+ - `special_tokens_map.json`
15
+ - `chat_template.json`
16
+
17
+ `projector.pt` is required because this implementation trains and saves the full LLaVA multimodal projector separately from the PEFT adapter.
18
+
19
+ Use this folder as:
20
+
21
+ ```bash
22
+ python scripts/evaluate_fold.py \
23
+ --config configs/lmol_scut_fbp5500.yaml \
24
+ --fold-index 0 \
25
+ --checkpoint checkpoints/fold0 \
26
+ --batch-size 8
27
+ ```
adapter_config.json → checkpoints/fold0/adapter_config.json RENAMED
File without changes
adapter_model.safetensors → checkpoints/fold0/adapter_model.safetensors RENAMED
File without changes
chat_template.json → checkpoints/fold0/chat_template.json RENAMED
File without changes
preprocessor_config.json → checkpoints/fold0/preprocessor_config.json RENAMED
File without changes
processor_config.json → checkpoints/fold0/processor_config.json RENAMED
File without changes
projector.pt → checkpoints/fold0/projector.pt RENAMED
File without changes
special_tokens_map.json → checkpoints/fold0/special_tokens_map.json RENAMED
File without changes
tokenizer.json → checkpoints/fold0/tokenizer.json RENAMED
File without changes
tokenizer_config.json → checkpoints/fold0/tokenizer_config.json RENAMED
File without changes
results/fold0/README.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # Fold 0 Result Artifacts
2
+
3
+ These files are small release copies of the completed fold0 evaluation outputs.
4
+
5
+ - `metrics.json`: score metrics copied from `outputs/evaluation/fold_0/metrics.json`.
6
+ - `confusion_matrix.json`: pairwise confusion matrix copied from `outputs/evaluation/fold_0/confusion_matrix.json`.
7
+ - `progress.json`: final completed progress payload copied from `outputs/evaluation/fold_0/progress.json`.
8
+
9
+ The full generated predictions CSV is not duplicated here because `outputs/evaluation/fold_0/pairwise_predictions.csv` is about 45 MB and is a generated artifact.
results/fold0/confusion_matrix.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "confusion_matrix_rows_gold_cols_pred": {
3
+ "First.": [
4
+ 103159,
5
+ 282,
6
+ 17395
7
+ ],
8
+ "Second.": [
9
+ 341,
10
+ 176829,
11
+ 17600
12
+ ],
13
+ "Similar.": [
14
+ 7002,
15
+ 7909,
16
+ 43483
17
+ ]
18
+ },
19
+ "count": 374000,
20
+ "labels": [
21
+ "First.",
22
+ "Second.",
23
+ "Similar."
24
+ ],
25
+ "pairwise_accuracy": 0.8648957219251336
26
+ }
results/fold0/metrics.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "count": 1100,
3
+ "mae": 0.16428181454545454,
4
+ "pc": 0.9568051338710857,
5
+ "rmse": 0.21298467207160493
6
+ }
results/fold0/progress.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 8,
3
+ "checkpoint": "outputs/lmol_scut_fbp5500/fold_0/last",
4
+ "confusion": "outputs/evaluation/fold_0/confusion_matrix.json",
5
+ "elapsed_sec": 68173.94125270844,
6
+ "eta_sec": 0.0,
7
+ "metrics": "outputs/evaluation/fold_0/metrics.json",
8
+ "pairs_csv": "artifacts/pairs/full/fold_0/test_reference_pairs.csv",
9
+ "pairs_per_sec": 5.485967117753246,
10
+ "pairwise_accuracy_running": 0.8648957219251336,
11
+ "pairwise_loss_running": 0.3383971469685508,
12
+ "percent": 100.0,
13
+ "phase": "complete",
14
+ "predictions": "outputs/evaluation/fold_0/pairwise_predictions.csv",
15
+ "processed_pairs": 374000,
16
+ "score_metrics": {
17
+ "count": 1100,
18
+ "mae": 0.16428181454545454,
19
+ "pc": 0.9568051338710857,
20
+ "rmse": 0.21298467207160493
21
+ },
22
+ "total_pairs": 374000,
23
+ "updated_at": "2026-06-07T08:38:00Z"
24
+ }