facebook / pe-a-frame-large

huggingface.co
Total runs: 47.1K
24-hour runs: 0
7-day runs: 13.0K
30-day runs: 19.7K
Model's Last Updated: December 24 2025

Introduction of pe-a-frame-large

Model Details of pe-a-frame-large

Perception Encoder Audio Frame (PE-A-Frame)

PE-A-Frame is a state-of-the-art audio-text embedding model. For text, the model produces a single embedding. For audio, it produces a sequence of embeddings (onen for every 40ms of audio). These embeddings can then be used for audio event localization. For convienience, model outputs temporal spans (start and end timestamps) indicating when that event (freeform audio description) occurs in the audio.

Model Description

PE-A-Frame uses contrastive learning to align frame-level audio representations with text descriptions. The model can identify precise time ranges when described audio events occur

Model Variants

We release multiple model checkpoints with varying sizes:

Quick Start
Basic Usage: Audio Event Localization
import torch
from core.audio_visual_encoder import PEAudioFrame, PEAudioFrameTransform

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

# Load model and transform
model = PEAudioFrame.from_config("pe-a-frame-large", pretrained=True).to(device)
transform = PEAudioFrameTransform.from_config("pe-a-frame-large")

# Define audio file and event descriptions
audio_file = "office_conversation.wav"
descriptions = ["a person talking", "keyboard typing", "phone ringing"]

# Process inputs
inputs = transform(audio=[audio_file], text=descriptions).to(device)

# Run inference
with torch.inference_mode():
    outputs = model(**inputs, return_spans=True)

# Print detected time spans for each event
for description, spans in zip(descriptions, outputs.spans):
    if spans:
        span_str = ", ".join([f"({start:.2f}s, {end:.2f}s)" for start, end in spans])
        print(f'"{description}": [{span_str}]')
    else:
        print(f'"{description}": No events detected')

Example Output:

"a person talking": [(2.34s, 5.67s), (8.90s, 12.45s)]
"keyboard typing": [(1.20s, 3.40s), (6.78s, 9.12s)]
"phone ringing": No events detected
Batch Processing Multiple Audio Files
import torch
from core.audio_visual_encoder import PEAudioFrame, PEAudioFrameTransform

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = PEAudioFrame.from_config("pe-a-frame-large", pretrained=True).to(device)
transform = PEAudioFrameTransform.from_config("pe-a-frame-large")

# Process multiple audio files with different descriptions
audio_files = ["meeting.wav", "street.wav", "kitchen.wav"]
descriptions = [
    "people discussing in a meeting",
    "cars passing by",
    "water running from a faucet"
]

inputs = transform(audio=audio_files, text=descriptions).to(device)

with torch.inference_mode():
    outputs = model(**inputs, return_spans=True)

# Each audio-text pair gets its own span predictions
for audio, description, spans in zip(audio_files, descriptions, outputs.spans):
    if spans:
        span_str = ", ".join([f"({start:.2f}s, {end:.2f}s)" for start, end in spans])
        print(f'"{description}": [{span_str}] in {audio}')
    else:
        print(f'"{description}": No events detected in {audio}')
Adjusting Detection Threshold

The threshold parameter controls sensitivity for event detection. Lower values detect more events (higher recall), while higher values are more selective (higher precision):

# High sensitivity - detect more events (may include false positives)
outputs_sensitive = model(**inputs, threshold=0.2)
Extracting Embeddings Without Spans

If you only need embeddings without temporal localization:

inputs = transform(audio=[audio_file], text=descriptions).to(device)

with torch.inference_mode():
    outputs = model(**inputs, return_spans=False)

# Access embeddings
audio_embeds = outputs.audio_embeds  # Shape: [batch_size, num_frames, embed_dim]
text_embeds = outputs.text_embeds    # Shape: [batch_size, embed_dim]

# Compute similarity between audio frames and text
# audio_embeds is frame-level, so you can see which frames match the description
similarities = torch.einsum("btd,bd->bt", audio_embeds, text_embeds)
# similarities shape: [batch_size, num_frames]
Usage with 🤗 Transformers
model = PeAudioFrameLevelModel.from_pretrained("facebook/pe-a-frame-large")
processor = PeAudioProcessor.from_pretrained("facebook/pe-a-frame-large")

inputs = transform(audio=[audio_file], text=descriptions, return_tensors="pt").to(device)

with torch.inference_mode():
    outputs = model(**inputs)

# Access embeddings
audio_embeds = outputs.audio_embeds  # Shape: [batch_size, num_frames, embed_dim]
text_embeds = outputs.text_audio_embeds    # Shape: [batch_size, embed_dim]

# Compute similarity between audio frames and text
# audio_embeds is frame-level, so you can see which frames match the description
similarities = torch.einsum("btd,bd->bt", audio_embeds, text_embeds)
# similarities shape: [batch_size, num_frames]
Citation
@article{pe-av2025,
  title={PEAV: An Audiovisual Perception Encoder via Large-Scale Multimodal Correspondence Learning},
  author={Apoorv Vyas, Heng-Jui Chang, Cheng-Fu Yang, Po-Yao Huang, Luya Gao, Julius Richter, Sanyuan Chen, Matt Le, Piotr Dollár, Christoph Feichtenhofer, Ann Lee, Wei-Ning Hsu},
  url={arxiv link coming soon}
  year={2025}
}
License

This model is released under the Apache 2.0 license.

Runs of facebook pe-a-frame-large on huggingface.co

47.1K
Total runs
0
24-hour runs
2.4K
3-day runs
13.0K
7-day runs
19.7K
30-day runs

More Information About pe-a-frame-large huggingface.co Model

More pe-a-frame-large license Visit here:

https://choosealicense.com/licenses/apache-2.0

pe-a-frame-large huggingface.co

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

pe-a-frame-large huggingface.co Url

https://huggingface.co/facebook/pe-a-frame-large

facebook pe-a-frame-large online free

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

facebook pe-a-frame-large online free url in huggingface.co:

https://huggingface.co/facebook/pe-a-frame-large

pe-a-frame-large install

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

pe-a-frame-large install url in huggingface.co:

https://huggingface.co/facebook/pe-a-frame-large

Url of pe-a-frame-large

pe-a-frame-large huggingface.co Url

Provider of pe-a-frame-large huggingface.co

facebook
ORGANIZATIONS

Other API from facebook

huggingface.co

Total runs: 8.1M
Run Growth: 99.3K
Growth Rate: 1.22%
Updated:January 20 2022
huggingface.co

Total runs: 5.9M
Run Growth: -2.0M
Growth Rate: -33.45%
Updated:September 15 2023
huggingface.co

Total runs: 3.1M
Run Growth: -118.3K
Growth Rate: -3.75%
Updated:January 17 2024
huggingface.co

Total runs: 2.8M
Run Growth: -913.3K
Growth Rate: -33.26%
Updated:September 06 2023
huggingface.co

Total runs: 2.0M
Run Growth: 80.2K
Growth Rate: 3.97%
Updated:November 21 2025
huggingface.co

Total runs: 2.0M
Run Growth: -719.6K
Growth Rate: -35.18%
Updated:December 28 2021
huggingface.co

Total runs: 1.4M
Run Growth: -867.5K
Growth Rate: -61.26%
Updated:March 23 2023
huggingface.co

Total runs: 1.1M
Run Growth: -1.1M
Growth Rate: -96.35%
Updated:January 25 2024
huggingface.co

Total runs: 920.9K
Run Growth: 124.5K
Growth Rate: 13.16%
Updated:September 06 2023
huggingface.co

Total runs: 528.0K
Run Growth: 97.1K
Growth Rate: 18.46%
Updated:March 17 2025
huggingface.co

Total runs: 525.4K
Run Growth: 53.5K
Growth Rate: 10.16%
Updated:May 22 2023
huggingface.co

Total runs: 386.5K
Run Growth: -56.1K
Growth Rate: -14.17%
Updated:February 29 2024
huggingface.co

Total runs: 353.3K
Run Growth: 245.5K
Growth Rate: 69.99%
Updated:June 13 2023
huggingface.co

Total runs: 311.2K
Run Growth: -32.2K
Growth Rate: -10.68%
Updated:January 12 2024
huggingface.co

Total runs: 281.6K
Run Growth: -2.9K
Growth Rate: -1.03%
Updated:June 15 2023
huggingface.co

Total runs: 259.2K
Run Growth: -22.4K
Growth Rate: -8.49%
Updated:November 17 2022
huggingface.co

Total runs: 252.0K
Run Growth: -134.0K
Growth Rate: -54.10%
Updated:January 12 2024
huggingface.co

Total runs: 236.9K
Run Growth: 14.3K
Growth Rate: 6.02%
Updated:July 23 2024
huggingface.co

Total runs: 213.8K
Run Growth: 23.7K
Growth Rate: 11.24%
Updated:February 12 2023
huggingface.co

Total runs: 182.5K
Run Growth: -131.9K
Growth Rate: -70.87%
Updated:September 06 2023
huggingface.co

Total runs: 167.4K
Run Growth: -132.6K
Growth Rate: -75.54%
Updated:September 15 2023
huggingface.co

Total runs: 150.8K
Run Growth: 34.9K
Growth Rate: 22.58%
Updated:June 03 2022
huggingface.co

Total runs: 118.0K
Run Growth: -37.5K
Growth Rate: -34.51%
Updated:November 16 2023
huggingface.co

Total runs: 108.9K
Run Growth: -150.0K
Growth Rate: -137.82%
Updated:May 22 2023
huggingface.co

Total runs: 88.9K
Run Growth: -118.8K
Growth Rate: -128.37%
Updated:July 25 2023
huggingface.co

Total runs: 85.0K
Run Growth: 14.6K
Growth Rate: 18.95%
Updated:March 28 2026
huggingface.co

Total runs: 79.3K
Run Growth: 37.3K
Growth Rate: 49.07%
Updated:December 09 2025
huggingface.co

Total runs: 72.6K
Run Growth: -84.6K
Growth Rate: -108.28%
Updated:September 01 2023
huggingface.co

Total runs: 69.5K
Run Growth: -40.2K
Growth Rate: -59.04%
Updated:September 15 2023
huggingface.co

Total runs: 66.8K
Run Growth: -108.2K
Growth Rate: -151.70%
Updated:September 06 2023
huggingface.co

Total runs: 57.0K
Run Growth: 45.9K
Growth Rate: 80.61%
Updated:March 27 2026
huggingface.co

Total runs: 47.9K
Run Growth: -39.6K
Growth Rate: -82.25%
Updated:February 12 2023
huggingface.co

Total runs: 44.8K
Run Growth: 6.0K
Growth Rate: 13.32%
Updated:January 21 2026
huggingface.co

Total runs: 39.4K
Run Growth: -5.5K
Growth Rate: -14.04%
Updated:September 05 2023
huggingface.co

Total runs: 38.7K
Run Growth: 25.7K
Growth Rate: 67.99%
Updated:October 16 2024
huggingface.co

Total runs: 37.4K
Run Growth: -11.5K
Growth Rate: -29.83%
Updated:March 13 2024
huggingface.co

Total runs: 36.8K
Run Growth: 16.3K
Growth Rate: 43.77%
Updated:February 23 2024