
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# Camera Lens Focal Length
This model predicts the focal length that the camera lens used to capture an image. It takes in an image and returns one of the following labels:
- ULTRA-WIDE
- WIDE
- MEDIUM
- LONG-LENS
- TELEPHOTO

### How to use
```python
from transformers import pipeline

pipe = pipeline("image-classification", model="tonyassi/camera-lens-focal-length")
result = pipe('image.png')

print(result)
```

## Dataset
Trained on a total of 5000 images. 1000 images from each label. Images were taken from popular Hollywood movies. 

### ULTRA-WIDE
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/648a824a8ca6cf9857d1349c/x9bE-CkXdKSXNhJ60yG9Q.jpeg)

### WIDE
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/648a824a8ca6cf9857d1349c/1AG65hOknZ6Tr2o-55urM.jpeg)

### MEDIUM
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/648a824a8ca6cf9857d1349c/3-JNBG3vZ5KdgM46Sq683.jpeg)

### LONG-LENS
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/648a824a8ca6cf9857d1349c/p7KXjTX5D6hydnS4K1U01.jpeg)

### TELEPHOTO
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/648a824a8ca6cf9857d1349c/u-EF60BTNcUqfFRfcz2zM.jpeg)

## Model description
This model is a fine-tuned version of [google/vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k).

### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 5

### Framework versions
- Transformers 4.35.0
- Pytorch 2.1.0+cu118
- Datasets 2.14.6
- Tokenizers 0.14.1

long-lens medium telephoto ultra-wide wide