Downloads · 30 days
0
imtiazhumzah/Skin-Cancer-ConvNeXt-Tiny
Skin-Cancer-ConvNeXt-Tiny is a image classification model from imtiazhumzah. Use it when you need a label for an image. The card lists the license as mit.
This model is trained on the HAM10000 dataset to classify 7 types of skin lesions. It is intended for research and educational purposes.
Downloads · 30 days
0
Access
Public
Updated Feb 22, 2026
Repo size
111 MB
Likes
0
Public
Click a slice to open those files.
.pth111 MB · 100%
From the Hugging Face model README
This model is trained on the HAM10000 dataset to classify 7 types of skin lesions. It is intended for research and educational purposes.
To use this model, ensure you have torch and torchvision installed.
import torch
import torch.nn as nn
from torchvision.models import convnext_tiny
from huggingface_hub import hf_hub_download
# 1. Re-create the architecture
model = convnext_tiny()
# 2. Adjust the classifier head to match your 7 classes
# ConvNeXt-Tiny's classifier is a Sequence: [LayerNorm, Flatten, Linear]
n_inputs = model.classifier[2].in_features
model.classifier[2] = nn.Linear(n_inputs, 7)
# 3. Download weights from your repo
# Ensure 'filename' matches exactly what you uploaded (e.g., "model.pth" or "weights.pth")
weights_path = hf_hub_download(repo_id="imtiazhumzah/Skin-Cancer-ConvNeXt-Tiny", filename="final_skin_cancer_model.pth")
# 4. Load the weights
model.load_state_dict(torch.load(weights_path, map_location='cpu'))
model.eval()
print("Model loaded successfully!")