Views
No views yet
1from transformers import ViTForImageClassification, ViTImageProcessor
2from PIL import Image
3
4# Load model
5processor = ViTImageProcessor.from_pretrained("PayamFard123/dermaintel-wound-classifier")
6model = ViTForImageClassification.from_pretrained("PayamFard123/dermaintel-wound-classifier")
7
8# Classify image
9image = Image.open("wound_image.jpg")
10inputs = processor(images=image, return_tensors="pt")
11outputs = model(**inputs)
12predicted_class = outputs.logits.argmax(-1).item()| Index | Label |
|---|---|
| 0 | Pressure Ulcer/Injury |
| 1 | Venous Ulcer |
| 2 | Arterial Ulcer |
| 3 | Diabetic Ulcer |
| 4 | Surgical Wound |
| 5 | Traumatic Wound |
| 6 | Normal/Healthy Skin |
1@misc{dermaintel-wound-classifier,
2 title={DermaIntel Wound Type Classifier},
3 author={DermaIntel Team},
4 year={2024},
5 publisher={HuggingFace},
6 url={https://huggingface.co/PayamFard123/dermaintel-wound-classifier}
7}