Downloads · 30 days
0
NNEngine/RenNEt18_CIFAR10
RenNEt18_CIFAR10 is a image classification model from NNEngine. Use it when you need a label for an image. The card lists the license as mit.
This is a ResNet-18 model trained on the CIFAR-10 dataset, exported to the ONNX format for easy deployment across different platforms.
Downloads · 30 days
0
Access
Public
Updated Aug 15, 2025
Repo size
44.7 MB
Likes
1
Public
Click a slice to open those files.
.onnx44.7 MB · 100%
From the Hugging Face model README
This is a ResNet-18 model trained on the CIFAR-10 dataset, exported to the ONNX format for easy deployment across different platforms.
3 × 224 × 224 RGB imagesThis model is designed for educational purposes, demos, and quick prototyping of ONNX-based image classification workflows.
import onnxruntime as ort
import numpy as np
from PIL import Image
# Load model
session = ort.InferenceSession("resnet18_cifar10.onnx")
# Preprocess image
def preprocess(img_path):
img = Image.open(img_path).convert("RGB").resize((224, 224))
img_data = np.array(img).astype(np.float32) / 255.0
img_data = np.transpose(img_data, (2, 0, 1)) # CHW format
img_data = np.expand_dims(img_data, axis=0) # Batch dimension
return img_data
input_data = preprocess("example.jpg")
# Run inference
outputs = session.run(None, {"input": input_data})
pred_class = np.argmax(outputs[0])
print("Predicted class:", pred_class)