File size: 1,325 Bytes
d6de182 37403ee |
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 |
---
license: apache-2.0
library_name: transformers
pipeline_tag: image-classification
---
# body_complexion
This is a fine-tuned [microsoft/resnet-50](https://huggingface.co/microsoft/resnet-50) model. Dataset with men of
different bode complexion was used for fine-tuning.
### Intended Use:
The model is intended for image classification tasks specifically related to men's body types. It is designed to classify images into four categories based on body complexion: skinny, ordinary, overweight, and very muscular. The model can be utilized in applications such as:
- Health and fitness platforms for body type analysis
- Clothing recommendation systems tailored for different body types
- Visual content moderation systems to filter images based on body type
### Launch
```python
import torch
from PIL import Image
from transformers import ResNetForImageClassification, AutoImageProcessor
processor = AutoImageProcessor.from_pretrained('glazzova/body_complexion')
model = ResNetForImageClassification.from_pretrained('glazzova/body_complexion')
image = Image.open('your_pic.jpeg')
inputs = processor(image, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
# model predicts one of the 4 classes
predicted_label = logits.argmax(-1).item()
print(model.config.id2label[predicted_label])
|