Instructions to use mariamhsein16/FacialExpressionDetection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mariamhsein16/FacialExpressionDetection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="mariamhsein16/FacialExpressionDetection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("mariamhsein16/FacialExpressionDetection") model = AutoModelForImageClassification.from_pretrained("mariamhsein16/FacialExpressionDetection", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from mariamhsein16/FacialExpressionDetection: direct link, hf CLI and curl.
- Browser
- Download file 992 Bytes
-
https://huggingface.co/mariamhsein16/FacialExpressionDetection/resolve/main/config.json
- Command line
-
hf download hf://mariamhsein16/FacialExpressionDetection/config.json
-
curl -L -o config.json https://huggingface.co/mariamhsein16/FacialExpressionDetection/resolve/main/config.json
992 Bytes
| { | |
| "_name_or_path": "microsoft/resnet-50", | |
| "_num_labels": 7, | |
| "architectures": [ | |
| "ResNetForImageClassification" | |
| ], | |
| "depths": [ | |
| 3, | |
| 4, | |
| 6, | |
| 3 | |
| ], | |
| "downsample_in_bottleneck": false, | |
| "downsample_in_first_stage": false, | |
| "embedding_size": 64, | |
| "hidden_act": "relu", | |
| "hidden_sizes": [ | |
| 256, | |
| 512, | |
| 1024, | |
| 2048 | |
| ], | |
| "id2label": { | |
| "0": "angry", | |
| "1": "disgust", | |
| "2": "fear", | |
| "3": "happy", | |
| "4": "neutral", | |
| "5": "sad", | |
| "6": "surprise" | |
| }, | |
| "label2id": { | |
| "angry": 0, | |
| "disgust": 1, | |
| "fear": 2, | |
| "happy": 3, | |
| "neutral": 4, | |
| "sad": 5, | |
| "surprise": 6 | |
| }, | |
| "layer_type": "bottleneck", | |
| "model_type": "resnet", | |
| "num_channels": 3, | |
| "out_features": [ | |
| "stage4" | |
| ], | |
| "out_indices": [ | |
| 4 | |
| ], | |
| "problem_type": "single_label_classification", | |
| "stage_names": [ | |
| "stem", | |
| "stage1", | |
| "stage2", | |
| "stage3", | |
| "stage4" | |
| ], | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.48.0" | |
| } | |