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

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

WIDE

image/jpeg

MEDIUM

image/jpeg

LONG-LENS

image/jpeg

TELEPHOTO

image/jpeg

Model description

This model is a fine-tuned version of 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
Downloads last month
24
Safetensors
Model size
85.8M params
Tensor type
F32
·

Finetuned from

Space using tonyassi/camera-lens-focal-length 1