Image Classification
Transformers
Safetensors
English
clip
zero-shot-image-classification
multi-task-classification
fairface
vision
autoeval-has-no-ethical-license
Eval Results (legacy)
Instructions to use syntheticbot/clip-face-attribute-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use syntheticbot/clip-face-attribute-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="syntheticbot/clip-face-attribute-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("syntheticbot/clip-face-attribute-classifier") model = AutoModelForZeroShotImageClassification.from_pretrained("syntheticbot/clip-face-attribute-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -117,13 +117,7 @@ NUM_LABELS = { 'age': len(age_labels), 'gender': len(gender_labels), 'race': len
|
|
| 117 |
processor = CLIPImageProcessor.from_pretrained(MODEL_PATH)
|
| 118 |
model = MultiTaskClipVisionModel(num_labels=NUM_LABELS)
|
| 119 |
|
| 120 |
-
|
| 121 |
-
model.load_state_dict(
|
| 122 |
-
torch.hub.load_state_dict_from_url(
|
| 123 |
-
f"https://huggingface.co/{MODEL_PATH}/resolve/main/pytorch_model.bin",
|
| 124 |
-
map_location=DEVICE
|
| 125 |
-
)
|
| 126 |
-
)
|
| 127 |
model.to(DEVICE)
|
| 128 |
model.eval()
|
| 129 |
|
|
|
|
| 117 |
processor = CLIPImageProcessor.from_pretrained(MODEL_PATH)
|
| 118 |
model = MultiTaskClipVisionModel(num_labels=NUM_LABELS)
|
| 119 |
|
| 120 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
model.to(DEVICE)
|
| 122 |
model.eval()
|
| 123 |
|