Instructions to use OwenElliott/image-safety-classifier-s with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use OwenElliott/image-safety-classifier-s with timm:
import timm model = timm.create_model("hf_hub:OwenElliott/image-safety-classifier-s", pretrained=True) - Transformers
How to use OwenElliott/image-safety-classifier-s with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="OwenElliott/image-safety-classifier-s") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OwenElliott/image-safety-classifier-s", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 917 Bytes
9767418 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | {
"architecture": "swiftformer_s",
"num_classes": 3,
"num_features": 224,
"global_pool": "avg",
"pretrained_cfg": {
"tag": "dist_in1k",
"custom_load": false,
"input_size": [
3,
224,
224
],
"fixed_input_size": true,
"interpolation": "bicubic",
"crop_pct": 0.95,
"crop_mode": "center",
"mean": [
0.485,
0.456,
0.406
],
"std": [
0.229,
0.224,
0.225
],
"num_classes": 1000,
"label_names": [
"NSFL",
"NSFW",
"SFW"
],
"pool_size": null,
"first_conv": "stem.0",
"classifier": [
"head",
"head_dist"
],
"license": "apache-2.0",
"origin_url": "https://github.com/Amshaker/SwiftFormer",
"paper_name": "SwiftFormer: Efficient Additive Attention for Transformer-based Real-time Mobile Vision Applications",
"paper_ids": "arXiv:2303.15446"
}
} |