Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
|
5 |
+
a hand classifier detect the image is showing left hand or right hand
|
6 |
+
|
7 |
+
it is trained with hagrid dataset on vit model, google/vit-base-patch16-224-in21k.
|
8 |
+
|
9 |
+
Limitation:
|
10 |
+
it couldn't predict both hand and no hand images.
|
11 |
+
|
12 |
+
```
|
13 |
+
inputs = image_processor(image, return_tensors="pt")
|
14 |
+
with torch.no_grad():
|
15 |
+
logits = model(**inputs).logits
|
16 |
+
|
17 |
+
predicted_label = logits.argmax(-1).item()
|
18 |
+
print(f'predicted_label: {model.config.id2label[predicted_label]}')
|
19 |
+
```
|