CoolFace
Modelpublic

lzun/spanish-social-media-boxing-images

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes7downloads
Model Card

Model Card for Model ID

<!-- Provide a quick summary of what the model is/does. -->

This modelcard aims to be a base template for new models. It has been generated using this raw template.

Model Details

Model Description

<!-- Provide a longer summary of what this model is. -->

  • —Developed by: Luis Zúñiga
  • —Model type: Image Classification
  • —License: Apache 2.0
  • —Finetuned from model [optional]: google/vit-base-patch16-224-in21k

Model Sources [optional]

<!-- Provide the basic links for the model. -->

  • —Repository: [More Information Needed]
  • —Paper [optional]: [More Information Needed]
  • —Demo [optional]: [More Information Needed]

Uses

<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->

The main purpose of this model is to serve as a text representation tool for image classification of social media publications (mainly tweets) related to boxing sport events in Spanish.

However, this only the first part of a multimodal model, where the text model is used to represent text and then, with a fusion method, text and images can be combined for a better representation of publications containing text and images.

Direct Use

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->

This model can be used to directly assess the sentiment polarity of image elements of social media publications. However, the main usage is to be combined with the image model for multimodal sentiment analysis.

Bias, Risks, and Limitations

<!-- This section is meant to convey both technical and sociotechnical limitations. -->

The dataset used to train this model contains tweets related to boxing events, so it does not specializes in a particular topic around the sport: it covers several news during, after, and before the event takes place.

How to Get Started with the Model

Use the code below to get started with the model.

py
model_ckpt = 'google/vit-base-patch16-224-in21k'
img_feature_extractor = AutoFeatureExtractor.from_pretrained(img_model_ckpt)
img_model = ViTModel.from_pretrained('lzun/spanish-social-media-boxing-images')

inputs = img_feature_extractor(images=img, return_tensors="pt")
outputs = img_model(**inputs)
last_hidden_states = outputs.last_hidden_state

Training Details

Training Data

<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->

The model is trained with the MSSAID dataset, specifically the text from tweets. The classes are positive (1), negative (-1), neutral (0) and spam (2). However, spam and neutral classes can be combined together to form a three class classification problem. The training data is not available due to its sensitive content, but can be shared upon reasonable request.

Evaluation

Metrics

<!-- These are the evaluation metrics being used, ideally with a description of why. -->

We use Balanced Accuracy as the main evaluation metric due to the data imbalanceness. However, we keep track of accuracy, MCC and weighted F1.

Results

Citation

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

Cite our paper if you found this useful:

BibTeX:

@inproceedings{Zuniga2022, author = {Luis N Zúñiga-Morales and Jorge Ángel González-Ordiano and J.Emilio Quiroz-Ibarra and Steven J Simske}, city = {Cham}, editor = {Obdulia Pichardo Lagunas and Juan Martínez-Miranda and Bella Martínez Seis}, isbn = {978-3-031-19496-2}, booktitle = {Advances in Computational Intelligence}, pages = {18-29}, publisher = {Springer Nature Switzerland}, title = {Impact Evaluation of Multimodal Information on Sentiment Analysis}, year = {2022} }