Image Feature Extraction
Transformers
Safetensors
timm
edgeface
feature-extraction
face-recognition
face-verification
face-embedding
custom_code
Instructions to use anjith2006/edgeface with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anjith2006/edgeface with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="anjith2006/edgeface", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("anjith2006/edgeface", trust_remote_code=True, device_map="auto") - timm
How to use anjith2006/edgeface with timm:
import timm model = timm.create_model("hf_hub:anjith2006/edgeface", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -136,37 +136,6 @@ model = get_peft_model(model, lora_cfg)
|
|
| 136 |
model.print_trainable_parameters()
|
| 137 |
```
|
| 138 |
|
| 139 |
-
## Building the checkpoints
|
| 140 |
-
|
| 141 |
-
The weights come from the original Idiap `.pt` files. `convert_edgeface.py` downloads them, converts to `config.json` + `model.safetensors`, and pushes everything into this single repo.
|
| 142 |
-
|
| 143 |
-
```bash
|
| 144 |
-
huggingface-cli login
|
| 145 |
-
|
| 146 |
-
# Convert all four variants and push to anjith2006/edgeface
|
| 147 |
-
python convert_edgeface.py --push anjith2006
|
| 148 |
-
|
| 149 |
-
# Convert one variant locally only (no push)
|
| 150 |
-
python convert_edgeface.py --only edgeface_xxs
|
| 151 |
-
```
|
| 152 |
-
|
| 153 |
-
### Verify after converting
|
| 154 |
-
|
| 155 |
-
```bash
|
| 156 |
-
python example.py ./edgeface-xxs same1.jpg same2.jpg different.jpg
|
| 157 |
-
# cos(A, B) = 0.9xxx
|
| 158 |
-
# cos(A, C) = 0.xxxx (expected lower)
|
| 159 |
-
```
|
| 160 |
-
|
| 161 |
-
## Source files
|
| 162 |
-
|
| 163 |
-
| File | Purpose |
|
| 164 |
-
|---|---|
|
| 165 |
-
| `configuration_edgeface.py` | `EdgeFaceConfig` |
|
| 166 |
-
| `modeling_edgeface.py` | `EdgeFaceModel`, `LowRankLinear`, `EdgeFaceOutput` |
|
| 167 |
-
| `image_processing_edgeface.py` | `EdgeFaceImageProcessor` (MediaPipe alignment + normalize) |
|
| 168 |
-
| `convert_edgeface.py` | Download original `.pt` checkpoints, convert, push |
|
| 169 |
-
| `example.py` | Same-person / different-person sanity check |
|
| 170 |
|
| 171 |
## License
|
| 172 |
|
|
|
|
| 136 |
model.print_trainable_parameters()
|
| 137 |
```
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
## License
|
| 141 |
|