File size: 478 Bytes
df6fcfe
 
 
8c36402
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
license: apache-2.0
---

a hand classifier detect the image is showing left hand or right hand

it is trained with hagrid dataset on vit model, google/vit-base-patch16-224-in21k.

Limitation:
it couldn't predict both hand and no hand images.

```
inputs = image_processor(image, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits

predicted_label = logits.argmax(-1).item()
print(f'predicted_label: {model.config.id2label[predicted_label]}')
```