CinemaCLIP is a ViT-B-32-256 fine-tune specialized for understanding the visual language of cinema at a frame level. It is a hybrid CLIP model with 23 classifier heads that represent a comprehensive taxonomy built...
CinemaCLIP is a ViT-B-32-256 fine-tune specialized for understanding the visual language of cinema at a frame level. It is a hybrid CLIP model with 23 classifier heads that represent a comprehensive taxonomy built...
CinemaCLIP is a ViT-B-32-256 fine-tune specialized for understanding the visual language of cinema at a frame level. It is a hybrid CLIP model with 23 classifier heads that represent a comprehensive taxonomy built with domain experts. For more info, see our launch blog post.
This repository ships three serialized forms of the same model:
from PIL import Image
from cinemaclip import CinemaCLIP
model = CinemaCLIP.from_pretrained("OZU-Technology/CinemaCLIP").eval()
# End-to-end classification on a PIL image
image = Image.open("still.jpg").convert("RGB")
predictions = model.predict_image(image)
predictions["classifier_preds"] # Classifier predictions
predictions["clip_image_embedding"]
# Just the image embedding
x = model.preprocess(image).unsqueeze(0)
image_embedding = model.encode_image(x, normalize=True) # [1, 512]
# Just the text embedding
tokens = model.tokenizer(["a medium closeup of "])
text_embedding = model.encode_text(tokens, normalize=True) # [1, 512]
The CinemaCLIP.predict_image method is demonstrative for how to get post-processed classifier outputs from the model. It is not super efficient or production ready, and must be treated as a reference above all else.
Usage (CoreML)
import coremltools as ct
from PIL import Image
img_encoder = ct.models.MLModel("ImageEncoder.mlpackage")
# Input must be 256x256 RGB, resized with BICUBIC for parity with the released torch outputs.
img = Image.open("still.jpg").convert("RGB").resize((256, 256), Image.Resampling.BICUBIC)
out = img_encoder.predict({"Image": img})
embedding = out["clip_image_embedding"] # [512]
probabilities = out["probabilities"] # [101] — concat of 23 per-category outputs
# TODO
text_encoder = ct.models.MLModel("TextEncoder.mlpackage")
Usage (ONNX)
from PIL import Image
from onnxruntime import InferenceSession
from torchvision import transforms as T
img = Image.open("still.jpg").convert("RGB")
preprocess = T.Compose([
T.Resize((256, 256), interpolation=T.InterpolationMode.BICUBIC),
T.ToTensor(), # yields float tensor in [0, 1] — no mean/std normalization
])
x = preprocess(img).unsqueeze(0).numpy()
session = InferenceSession("ImageEncoder.onnx", providers=["CPUExecutionProvider"])
emb, probs = session.run(None, {"Image": x})
Output structure
probabilities is a flat [101] vector — the concatenation of all 23 classifier heads' post-activation outputs. Label names and positions are in the shipped CinemaNetSchema.json:
The classifier heads are a mix of 3 types of classifiers:
Single label (softmax activation)
Multi label (sigmoid activation)
Binary (sigmoid activation)
Evaluation
CinemaCLIP outperforms not only the largest existing CLIP models (up to 28x larger), but also leading VLMs in cinematic understanding tasks (we benchmarked against the leading 4B VLMs).
Two inference modes are reported for CinemaCLIP:
Classifier — the shipped supervised heads on the CinemaCLIP image embedding.
0-shot — zero-shot text/image similarity using CinemaCLIP's own text encoder.
Category
CinemaCLIP 0-shot
CinemaCLIP Classifier
Qwen3.5-4B
Gemma4-4B
InternVL3.5-4B
Molmo2-4B
DFN ViT-H-14
MetaCLIP PE-bigG
OpenAI ViT-L-14
MobileCLIP-S1
DFN ViT-L-14
SigLIP2 SO400M
SigLIP2 ViT-gopt
Mean
83.2
87.7
57.6
56.7
55.3
55.3
45.9
45.2
44.8
44.2
39.0
38.7
36.5
Color Contrast
89.3
87.4
33.7
35.3
33.7
35.3
34.0
33.1
The shot.lighting.direction head ships in the classifier heads but has been excluded from the table above being a multi-label classifier.
Citation
@misc{cinemaclip2026,
title = {CinemaCLIP: A hybrid CLIP model and taxonomy for the visual language of cinema},
author = {Somani, Rahul and Marini, Anton and Stewart, Damian},
year = {2026},
publisher = {Hugging Face},
doi = {10.57967/hf/8539},
howpublished = {\url{https://huggingface.co/OZU-Technology/CinemaCLIP}},
note = {Model weights and taxonomy}
}
---
library_name: cinemaclip
pipeline_tag: zero-shot-image-classification
tags:
- clip
- vit
- cinema
- film
- movies
- multi-task
- hybrid
- cinematography
- domain-specific
- image-classification
- zero-shot
base_model: laion/CLIP-ViT-B-32-256x256-DataComp-s34B-b86K
base_model_relation: finetune
license: openrail
license_link: LICENSE.md
---
# CinemaCLIP-1.0.0
**CinemaCLIP** is a [ViT-B-32-256](https://huggingface.co/laion/CLIP-ViT-B-32-256x256-DataComp-s34B-b86K) fine-tune specialized for understanding the visual language of cinema at a frame level. It is a hybrid CLIP model with 23 classifier heads that represent a comprehensive taxonomy built with domain experts. For more info, see our [launch blog post](https://www.ozu.ai/cinemaclip).
This repository ships three serialized forms of the same model:
- **Torch** (`model.safetensors`) — load via the `cinemaclip` Python package.
- **CoreML** (`ImageEncoder.mlmodel`, `ImageEncoder.mlpackage` and `TextEncoder.mlpackage`) — for on-device Apple Neural Engine inference.
- **ONNX** (`ImageEncoder.onnx`, `TextEncoder.onnx`, plus `_fp16` variants) — for cross-platform inference.
## Install
```bash
pip install cinemaclip # core
pip install "cinemaclip[coreml]" # CoreML export/inference
pip install "cinemaclip[onnx]" # ONNX export/inference
```
## Usage (PyTorch)
```python
from PIL import Image
from cinemaclip import CinemaCLIP
model = CinemaCLIP.from_pretrained("OZU-Technology/CinemaCLIP").eval()
# End-to-end classification on a PIL image
image = Image.open("still.jpg").convert("RGB")
predictions = model.predict_image(image)
predictions["classifier_preds"] # Classifier predictions
predictions["clip_image_embedding"]
# Just the image embedding
x = model.preprocess(image).unsqueeze(0)
image_embedding = model.encode_image(x, normalize=True) # [1, 512]
# Just the text embedding
tokens = model.tokenizer(["a medium closeup of "])
text_embedding = model.encode_text(tokens, normalize=True) # [1, 512]
```
The `CinemaCLIP.predict_image` method is demonstrative for how to get post-processed classifier outputs from the model. It is not super efficient or production ready, and must be treated as a reference above all else.
## Usage (CoreML)
```python
import coremltools as ct
from PIL import Image
img_encoder = ct.models.MLModel("ImageEncoder.mlpackage")
# Input must be 256x256 RGB, resized with BICUB...