Instructions to use wangyh6/BlazeFace-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wangyh6/BlazeFace-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="wangyh6/BlazeFace-v2", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("wangyh6/BlazeFace-v2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload BlazeFace
Browse files- DCU_CONFIG.py +1 -0
- config.json +2 -1
DCU_CONFIG.py
CHANGED
|
@@ -3,6 +3,7 @@ from typing import List
|
|
| 3 |
|
| 4 |
|
| 5 |
class DcuConfig(PretrainedConfig):
|
|
|
|
| 6 |
def __init__(
|
| 7 |
self,
|
| 8 |
**kwargs,
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
class DcuConfig(PretrainedConfig):
|
| 6 |
+
model_type = "blazeface"
|
| 7 |
def __init__(
|
| 8 |
self,
|
| 9 |
**kwargs,
|
config.json
CHANGED
|
@@ -4,8 +4,9 @@
|
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
"AutoConfig": "DCU_CONFIG.DcuConfig",
|
| 7 |
-
"
|
| 8 |
},
|
|
|
|
| 9 |
"torch_dtype": "float32",
|
| 10 |
"transformers_version": "4.42.4"
|
| 11 |
}
|
|
|
|
| 4 |
],
|
| 5 |
"auto_map": {
|
| 6 |
"AutoConfig": "DCU_CONFIG.DcuConfig",
|
| 7 |
+
"AutoModelForImageClassification": "DCU_MODEL.BlazeFace"
|
| 8 |
},
|
| 9 |
+
"model_type": "blazeface",
|
| 10 |
"torch_dtype": "float32",
|
| 11 |
"transformers_version": "4.42.4"
|
| 12 |
}
|