Downloads · 30 days
0
Seif-melz/defect-classifier-resnet18
defect-classifier-resnet18 is a machine learning model from Seif-melz. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch.
Steel surface defect classification model trained on NEU-DET dataset.
Downloads · 30 days
0
Access
Public
Updated Nov 23, 2025
Repo size
179 MB
Likes
0
Public
Click a slice to open those files.
.pth134 MB · 75%
From the Hugging Face model README
Steel surface defect classification model trained on NEU-DET dataset.
pytorch_model.pth: PyTorch checkpointmodel.onnx: ONNX format for deploymentmetadata.json: Model configurationtraining_history.json: Training metricsimport torch
from torchvision import models
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(repo_id="Seif-melz/defect-classifier-resnet18", filename="pytorch_model.pth")
# Load model
model = models.resnet18()
model.fc = torch.nn.Linear(model.fc.in_features, 6)
checkpoint = torch.load(model_path, map_location='cpu')
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()
import onnxruntime as ort
from huggingface_hub import hf_hub_download
# Download ONNX model
model_path = hf_hub_download(repo_id="Seif-melz/defect-classifier-resnet18", filename="model.onnx")
# Load with ONNX Runtime
session = ort.InferenceSession(model_path)
See training history in training_history.json for detailed metrics.