howdyaendra/xblock-social-screenshots
Updated • 5
How to use howdyaendra/microsoft-swinv2-small-patch4-window16-256-finetuned-xblockm with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="howdyaendra/microsoft-swinv2-small-patch4-window16-256-finetuned-xblockm")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("howdyaendra/microsoft-swinv2-small-patch4-window16-256-finetuned-xblockm")
model = AutoModelForImageClassification.from_pretrained("howdyaendra/microsoft-swinv2-small-patch4-window16-256-finetuned-xblockm")This model is a fine-tuned version of microsoft/swinv2-small-patch4-window16-256 on the howdyaendra/xblock-social-screenshots dataset. It achieves the following results on the evaluation set:
This model is trained on several thousand screenshots reported to the XBlock 3rd-party Bluesky labeller service. It is intended to be used to label Bluesky posts that have screenshots from social media sites embedded in them. Please also see aendra-rininsland/xblock.
Screenshot moderation
20% split of 1618 images
See notebook.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Roc Auc |
|---|---|---|---|---|
| 0.4357 | 0.9877 | 20 | 0.2544 | 0.7784 |
| 0.2027 | 1.9753 | 40 | 0.2016 | 0.8431 |
| 0.1743 | 2.9630 | 60 | 0.1701 | 0.8912 |
| 0.1625 | 4.0 | 81 | 0.1677 | 0.9083 |
| 0.1321 | 4.9877 | 101 | 0.1447 | 0.9246 |
| 0.1155 | 5.9753 | 121 | 0.1418 | 0.9311 |
| 0.0959 | 6.9630 | 141 | 0.1381 | 0.9460 |
| 0.0788 | 7.9012 | 160 | 0.1252 | 0.9535 |
Base model
microsoft/swinv2-small-patch4-window16-256