Downloads · 30 days
7
10% of all-time downloads
JuicyTurtle/model_test_1
model_test_1 is a image classification model from JuicyTurtle. Use it when you need a label for an image. The card lists the license as mit.
Downloads · 30 days
7
10% of all-time downloads
All-time downloads
70
Public
Repo size
44.8 MB
Likes
0
Public
Click a slice to open those files.
.bin44.8 MB · 100%
From the Hugging Face model README
ResNet-18 model for eroadwork
import torch
from torchvision import models, transforms
from torch import nn
from PIL import Image
# Load model
model = models.resnet18(weights=None)
model.fc = nn.Linear(512, 2)
model.load_state_dict(torch.load('pytorch_model.bin'))
model.eval()
# Prepare image
transform = transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
])
image = Image.open('your_image.jpg')
input_tensor = transform(image).unsqueeze(0)
# Inference
with torch.no_grad():
output = model(input_tensor)
prediction = torch.nn.functional.softmax(output, dim=1)
print(f"No Roadwork: {prediction[0][0]:.2%}")
print(f"Roadwork: {prediction[0][1]:.2%}")
5Fc8jh7Yu65v7K4hi9s6d3MkkGJ8g4
2025-10-24 02:12:45