YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
ResNet18 Approval Regressor (1β10)
Author: Dan Jung and Scotty McGee
Model Description
- Architecture: ResNet18 backbone, final fully connected layer outputs a scalar rating.
- Framework: PyTorch (see requirements.txt for dependencies).
- Task: Image regression. Predicts clothing "approval" ratings on a continuous scale from 1 to 10.
- Input: RGB clothing images, resized to 224x224.
- Output: Scalar approval score.
Use
import torch
from PIL import Image
from torchvision import transforms
from model import load_model
cfg = {"image_size": 224, "mean": [0.485, 0.456, 0.406], "std": [0.229, 0.224, 0.225], "label_range": [1.0, 10.0], "task": "image_regression", "backbone": "resnet18", "target": "approval(1-10)"}
tf = transforms.Compose([
transforms.Resize((cfg["image_size"], cfg["image_size"])),
transforms.ToTensor(),
transforms.Normalize(mean=cfg["mean"], std=cfg["std"]),
])
m = load_model("pytorch_model.bin")
img = Image.open("your_image.jpg").convert("RGB")
x = tf(img).unsqueeze(0)
with torch.no_grad():
y = m(x).squeeze(1).clamp(1.0, 10.0).item()
print(y)
Training Dataset and Procedure
- Dataset: 24679-Project-1
- Preprocessing: Images resized, normalized with standard Imagenet parameters.
- Validation: MAE and RMSE
- Config: Batch size 32, 4 Epochs, and Adam optimizer
Performance
- Validation MAE: 0.438 after 4 epochs
- Validation RMSE: 0.599
Intended Uses
- Automated clothing quality/style rating based on Dan's and Scotty's preferences.
Ethical Considerations
- Ratings are subjectivel ensures fairness and representation in labeling/clothing types.
- Downloads last month
- 12
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support