Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- image-classification
|
| 5 |
+
- pets
|
| 6 |
+
- dogs
|
| 7 |
+
- cats
|
| 8 |
+
- vietnam
|
| 9 |
+
library_name: timm
|
| 10 |
+
language:
|
| 11 |
+
- vi
|
| 12 |
+
- en
|
| 13 |
+
pipeline_tag: image-classification
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# pet-breed-small-v1
|
| 17 |
+
|
| 18 |
+
Mục đích: mô hình demo phân loại một số giống chó/mèo phổ biến tại Việt Nam (corgi, poodle, shiba, aln, scottish).
|
| 19 |
+
Trạng thái: minh họa giáo dục/nghiên cứu; **không** dùng cho chẩn đoán hay quyết định y tế.
|
| 20 |
+
|
| 21 |
+
## Cách dùng (minh họa)
|
| 22 |
+
```python
|
| 23 |
+
from PIL import Image
|
| 24 |
+
import torch
|
| 25 |
+
from torchvision import transforms
|
| 26 |
+
# model = torch.jit.load("model.pt").eval() # khi có trọng số
|
| 27 |
+
preprocess = transforms.Compose([transforms.Resize((224,224)), transforms.ToTensor()])
|
| 28 |
+
img = Image.open("pet.jpg").convert("RGB")
|
| 29 |
+
x = preprocess(img).unsqueeze(0)
|
| 30 |
+
# logits = model(x); probs = torch.softmax(logits, dim=1)
|