diffusers / shot-categorizer-v0

huggingface.co
Total runs: 99
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: March 06 2025

Introduction of shot-categorizer-v0

Model Details of shot-categorizer-v0

Shot Categorizer 🎬

Shot categorization model finetuned from the microsoft/Florence-2-large model. This model can be used to obtain metadata information about shots which can further be used to curate datasets of different kinds.

Training configuration:

  • Batch size: 16
  • Gradient accumulation steps: 4
  • Learning rate: 1e-6
  • Epochs: 20
  • Max grad norm: 1.0
  • Hardware: 8xH100s

Training was conducted using FP16 mixed-precision and DeepSpeed Zero2 scheme. The vision tower of the model was kept frozen during the training. We used the diffusers/ShotDEAD-v0 dataset for conducting training.

Training code is available here .

Inference
from transformers import AutoModelForCausalLM, AutoProcessor
import torch
from PIL import Image
import requests


folder_path = "diffusers/shot-categorizer-v0"
model = (
    AutoModelForCausalLM.from_pretrained(folder_path, torch_dtype=torch.float16, trust_remote_code=True)
    .to("cuda")
    .eval()
)
processor = AutoProcessor.from_pretrained(folder_path, trust_remote_code=True)

prompts = ["<COLOR>", "<LIGHTING>", "<LIGHTING_TYPE>", "<COMPOSITION>"]
img_path = "./assets/image_3.jpg"
image = Image.open(img_path).convert("RGB")

with torch.no_grad() and torch.inference_mode():
    for prompt in prompts:
        inputs = processor(text=prompt, images=image, return_tensors="pt").to("cuda", torch.float16)
        generated_ids = model.generate(
            input_ids=inputs["input_ids"],
            pixel_values=inputs["pixel_values"],
            max_new_tokens=1024,
            early_stopping=False,
            do_sample=False,
            num_beams=3,
        )
        generated_text = processor.batch_decode(generated_ids, skip_special_tokens=False)[0]
        parsed_answer = processor.post_process_generation(
            generated_text, task=prompt, image_size=(image.width, image.height)
        )
        print(parsed_answer)

Should print:

{'<COLOR>': 'Cool, Saturated, Cyan, Blue'}
{'<LIGHTING>': 'Soft light, Low contrast'}
{'<LIGHTING_TYPE>': 'Daylight, Sunny'}
{'<COMPOSITION>': 'Left heavy'}

Runs of diffusers shot-categorizer-v0 on huggingface.co

99
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About shot-categorizer-v0 huggingface.co Model

More shot-categorizer-v0 license Visit here:

https://choosealicense.com/licenses/mit

shot-categorizer-v0 huggingface.co

shot-categorizer-v0 huggingface.co is an AI model on huggingface.co that provides shot-categorizer-v0's model effect (), which can be used instantly with this diffusers shot-categorizer-v0 model. huggingface.co supports a free trial of the shot-categorizer-v0 model, and also provides paid use of the shot-categorizer-v0. Support call shot-categorizer-v0 model through api, including Node.js, Python, http.

shot-categorizer-v0 huggingface.co Url

https://huggingface.co/diffusers/shot-categorizer-v0

diffusers shot-categorizer-v0 online free

shot-categorizer-v0 huggingface.co is an online trial and call api platform, which integrates shot-categorizer-v0's modeling effects, including api services, and provides a free online trial of shot-categorizer-v0, you can try shot-categorizer-v0 online for free by clicking the link below.

diffusers shot-categorizer-v0 online free url in huggingface.co:

https://huggingface.co/diffusers/shot-categorizer-v0

shot-categorizer-v0 install

shot-categorizer-v0 is an open source model from GitHub that offers a free installation service, and any user can find shot-categorizer-v0 on GitHub to install. At the same time, huggingface.co provides the effect of shot-categorizer-v0 install, users can directly use shot-categorizer-v0 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

shot-categorizer-v0 install url in huggingface.co:

https://huggingface.co/diffusers/shot-categorizer-v0

Url of shot-categorizer-v0

shot-categorizer-v0 huggingface.co Url

Provider of shot-categorizer-v0 huggingface.co

diffusers
ORGANIZATIONS

Other API from diffusers

huggingface.co

Total runs: 46.7K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 22 2024
huggingface.co

Total runs: 2.5K
Run Growth: -1.2K
Growth Rate: -46.64%
Updated:February 08 2023
huggingface.co

Total runs: 645
Run Growth: 125
Growth Rate: 19.38%
Updated:February 24 2025
huggingface.co

Total runs: 20
Run Growth: 3
Growth Rate: 15.00%
Updated:January 27 2023
huggingface.co

Total runs: 5
Run Growth: -22
Growth Rate: -440.00%
Updated:February 07 2024
huggingface.co

Total runs: 1
Run Growth: -1
Growth Rate: -100.00%
Updated:March 14 2023