Instructions to use prithivMLmods/x-bot-profile-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/x-bot-profile-detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="prithivMLmods/x-bot-profile-detection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("prithivMLmods/x-bot-profile-detection") model = AutoModelForImageClassification.from_pretrained("prithivMLmods/x-bot-profile-detection", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files14 unmodified lines1516171819208 unmodified lines2930313214 unmodified lines- experimental---```pyClassification Report:precision recall f1-score support8 unmodified linesweighted avg 0.9609 0.9559 0.9557 10000```14 unmodified lines1516171819202122232425268 unmodified lines353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811914 unmodified lines- experimental---# **x-bot-profile-detection**> **x-bot-profile-detection** is a SigLIP2-based classification model designed to detect **profile authenticity types on social media platforms** (such as X/Twitter). It categorizes a profile image into four classes: **bot**, **cyborg**, **real**, or **verified**. Built on `google/siglip2-base-patch16-224`, the model leverages advanced vision-language pretraining for robust image classification.```pyClassification Report:precision recall f1-score support8 unmodified linesweighted avg 0.9609 0.9559 0.9557 10000```---## **Label Classes**The model predicts one of the following profile types:```0: bot → Automated accounts1: cyborg → Partially automated or suspiciously mixed behavior2: real → Genuine human users3: verified → Verified accounts or official profiles```---## **Installation**```bashpip install transformers torch pillow gradio```---## **Example Inference Code**```pythonimport gradio as grfrom transformers import AutoImageProcessor, SiglipForImageClassificationfrom PIL import Imageimport torch# Load model and processormodel_name = "prithivMLmods/x-bot-profile-detection"model = SiglipForImageClassification.from_pretrained(model_name)processor = AutoImageProcessor.from_pretrained(model_name)# Define class mappingid2label = {"0": "bot","1": "cyborg","2": "real","3": "verified"}def detect_profile_type(image):image = Image.fromarray(image).convert("RGB")inputs = processor(images=image, return_tensors="pt")with torch.no_grad():outputs = model(**inputs)logits = outputs.logitsprobs = torch.nn.functional.softmax(logits, dim=1).squeeze().tolist()prediction = {id2label[str(i)]: round(probs[i], 3) for i in range(len(probs))}return prediction# Create Gradio UIiface = gr.Interface(fn=detect_profile_type,inputs=gr.Image(type="numpy"),outputs=gr.Label(num_top_classes=4, label="Predicted Profile Type"),title="x-bot-profile-detection",description="Upload a social media profile picture to classify it as Bot, Cyborg, Real, or Verified using a SigLIP2 model.")if __name__ == "__main__":iface.launch()```---## **Use Cases*** Social media moderation and automation detection* Anomaly detection in public discourse* Botnet analysis and influence operation research* Platform integrity and trust verification
README.md+88-1