Run this model with HF Jobs
Run prithivMLmods/Gameplay-Classcode-10 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/prithivMLmods/Gameplay-Classcode-10. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/prithivMLmods/Gameplay-Classcode-10 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use prithivMLmods/Gameplay-Classcode-10 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Gameplay-Classcode-10 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="prithivMLmods/Gameplay-Classcode-10") 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/Gameplay-Classcode-10") model = AutoModelForImageClassification.from_pretrained("prithivMLmods/Gameplay-Classcode-10", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files12 unmodified lines13141516171816 unmodified lines35363712 unmodified lines- Classcode- '10'---```pyClassification Report:16 unmodified lines```12 unmodified lines13141516171819202116 unmodified lines383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512 unmodified lines- Classcode- '10'---# **Gameplay-Classcode-10**> **Gameplay-Classcode-10** is a vision-language model fine-tuned from **google/siglip2-base-patch16-224** using the **SiglipForImageClassification** architecture. It classifies gameplay screenshots or thumbnails into one of ten popular video game titles.```pyClassification Report:16 unmodified lines```The model predicts one of the following **game categories**:- **0:** Among Us- **1:** Apex Legends- **2:** Fortnite- **3:** Forza Horizon- **4:** Free Fire- **5:** Genshin Impact- **6:** God of War- **7:** Minecraft- **8:** Roblox- **9:** Terraria---# **Run with Transformers 🤗**```python!pip install -q transformers torch pillow gradio``````pythonimport gradio as grfrom transformers import AutoImageProcessor, SiglipForImageClassificationfrom PIL import Imageimport torch# Load model and processormodel_name = "prithivMLmods/Gameplay-Classcode-10" # Replace with your actual model pathmodel = SiglipForImageClassification.from_pretrained(model_name)processor = AutoImageProcessor.from_pretrained(model_name)# Label mappingid2label = {0: "Among Us",1: "Apex Legends",2: "Fortnite",3: "Forza Horizon",4: "Free Fire",5: "Genshin Impact",6: "God of War",7: "Minecraft",8: "Roblox",9: "Terraria"}def classify_game(image):"""Predicts the game title based on the gameplay 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()predictions = {id2label[i]: round(probs[i], 3) for i in range(len(probs))}predictions = dict(sorted(predictions.items(), key=lambda item: item[1], reverse=True))return predictions# Gradio interfaceiface = gr.Interface(fn=classify_game,inputs=gr.Image(type="numpy"),outputs=gr.Label(label="Game Prediction Scores"),title="Gameplay-Classcode-10",description="Upload a gameplay screenshot or thumbnail to identify the game title (Among Us, Fortnite, Minecraft, etc.).")# Launch the appif __name__ == "__main__":iface.launch()```---# **Intended Use**This model can be used for:- **Automatic tagging of gameplay content for streamers and creators**- **Organizing gaming datasets**- **Enhancing searchability in gameplay video repositories**- **Training AI systems for game-related content moderation or recommendations**
README.md+88