facebook / sam-audio-judge

huggingface.co
Total runs: 20.4K
24-hour runs: -603
7-day runs: -1.4K
30-day runs: -13.0K
Model's Last Updated: December 23 2025

Introduction of sam-audio-judge

Model Details of sam-audio-judge

SAM-Audio Judge Model

SAM-Audio Judge is a model for evaluating the quality of audio separation results for SAM Audio . It assesses how well a separated audio matches a given text description by providing four different quality metrics: overall quality, recall, precision, and faithfulness.

Authentication

Before using SAM-Audio Judge, you need to:

  1. Request access to the checkpoints on the SAM-Audio Judge Hugging Face repo
  2. Authenticate with Hugging Face: huggingface-cli login
Usage
Basic Usage

The Judge model evaluates the quality of audio separation by comparing the input audio, separated audio, and text description.

import torch
import torchaudio
from sam_audio import SAMAudioJudgeModel, SAMAudioJudgeProcessor

# Load model and processor
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = SAMAudioJudgeModel.from_pretrained("facebook/sam-audio-judge").to(device).eval()
processor = SAMAudioJudgeProcessor.from_pretrained("facebook/sam-audio-judge")

# Load audio files
input_audio, sr = torchaudio.load("path/to/input_audio.wav")
separated_audio, sr = torchaudio.load("path/to/separated_audio.wav")

# Text description that was used for separation
description = "A man speaking"

# Process inputs
inputs = processor(
    text=[description],
    input_audio=[input_audio],  # Can also use a list of tensors (shape (1, num_samples))
    separated_audio=[separated_audio],  # Can also use a list of tensors (shape (1, num_samples))
).to(device)

# Get quality scores
with torch.inference_mode():
    result = model(**inputs)

# Access individual scores
print(f"Overall Quality: {result.overall.item():.3f}")
print(f"Recall: {result.recall.item():.3f}")
print(f"Precision: {result.precision.item():.3f}")
print(f"Faithfulness: {result.faithfulness.item():.3f}")
Batch Processing

You can evaluate multiple separation results in a single batch:

import torch
import torchaudio
from sam_audio import SAMAudioJudgeModel, SAMAudioJudgeProcessor

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = SAMAudioJudgeModel.from_pretrained("facebook/sam-audio-judge").to(device).eval()
processor = SAMAudioJudgeProcessor.from_pretrained("facebook/sam-audio-judge")

# Multiple examples
descriptions = ["A man speaking", "Piano playing a melody", "A dog barking"]
input_audios = ["input1.wav", "input2.wav", "input3.wav"]
separated_audios = ["separated1.wav", "separated2.wav", "separated3.wav"]

# Process batch
inputs = processor(
    text=descriptions,
    input_audio=input_audios,
    separated_audio=separated_audios,
).to(device)

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

# Results shape: (batch_size, 1)
for i, desc in enumerate(descriptions):
    print(f"\nExample {i+1}: {desc}")
    print(f"  Overall: {result.overall[i].item():.3f}")
    print(f"  Recall: {result.recall[i].item():.3f}")
    print(f"  Precision: {result.precision[i].item():.3f}")
    print(f"  Faithfulness: {result.faithfulness[i].item():.3f}")
Evaluating SAM-Audio Separation

Here's a complete example that performs separation with SAM-Audio and then evaluates it with the Judge model:

import torch
import torchaudio
from sam_audio import SAMAudio, SAMAudioProcessor
from sam_audio import SAMAudioJudgeModel, SAMAudioJudgeProcessor

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

# Step 1: Perform separation with SAM-Audio
sam_model = SAMAudio.from_pretrained("facebook/sam-audio-large").to(device).eval()
sam_processor = SAMAudioProcessor.from_pretrained("facebook/sam-audio-large")

audio_file = "path/to/audio.wav"
description = "A person coughing"

# Separate
inputs = sam_processor(audios=[audio_file], descriptions=[description]).to(device)
with torch.inference_mode():
    separation_result = sam_model.separate(inputs)

# Step 2: Evaluate the separation
judge_model = SAMAudioJudgeModel.from_pretrained("facebook/sam-audio-judge").to(device).eval()
judge_processor = SAMAudioJudgeProcessor.from_pretrained("facebook/sam-audio-judge")

# Prepare for judge
judge_inputs = judge_processor(
    text=[description],
    input_audio=[audio_file],
    separated_audio=[separation_result.target[0].unsqueeze(0)],
    sampling_rate=judge_processor.audio_sampling_rate,
).to(device)

with torch.inference_mode():
    judge_result = judge_model(**judge_inputs)

print(f"\nSeparation Quality Metrics:")
print(f"Overall Quality: {judge_result.overall.item():.3f}")
print(f"Recall: {judge_result.recall.item():.3f}")
print(f"Precision: {judge_result.precision.item():.3f}")
print(f"Faithfulness: {judge_result.faithfulness.item():.3f}")
Output Format

The SAMAudioJudgeModel returns a SAMAudioJudgeOutput object with the following attributes:

  • overall (torch.Tensor): Overall quality of shape (batch_size, 1) . This is a combined metric that represents the overall separation quality.
  • recall (torch.Tensor): Recall of shape (batch_size, 1) . Measures how much of the target sound was successfully captured in the separation.
  • precision (torch.Tensor): Precision of shape (batch_size, 1) . Measures how pure the separated sound is (i.e., how little unwanted sound is included).
  • faithfulness (torch.Tensor): Faithfulness of shape (batch_size, 1) . For target sounds present in the extracted audio, how similar to they sound to their counterparts in the input audio.

All scores are continuous values where higher values indicate better quality.

Citation

If you use SAM-Audio Judge in your research, please cite:

@article{sam-audio,
  title={SAM-Audio: Segment Anything in Audio},
  author={Bowen Shi, Andros Tjandra, John Hoffman, Helin Wang, Yi-Chiao Wu, Luya Gao, Julius Richter, Matt Le, Apoorv Vyas, Sanyuan Chen, Christoph Feichtenhofer, Piotr Doll�r, Wei-Ning Hsu, Ann Lee},
  year={2025}
  url={arxiv link coming soon}
}
License

This project is licensed under the SAM License. See the LICENSE file for details.

Runs of facebook sam-audio-judge on huggingface.co

20.4K
Total runs
-603
24-hour runs
-671
3-day runs
-1.4K
7-day runs
-13.0K
30-day runs

More Information About sam-audio-judge huggingface.co Model

More sam-audio-judge license Visit here:

https://choosealicense.com/licenses/sam-license

sam-audio-judge huggingface.co

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

sam-audio-judge huggingface.co Url

https://huggingface.co/facebook/sam-audio-judge

facebook sam-audio-judge online free

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

facebook sam-audio-judge online free url in huggingface.co:

https://huggingface.co/facebook/sam-audio-judge

sam-audio-judge install

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

sam-audio-judge install url in huggingface.co:

https://huggingface.co/facebook/sam-audio-judge

Url of sam-audio-judge

sam-audio-judge huggingface.co Url

Provider of sam-audio-judge huggingface.co

facebook
ORGANIZATIONS

Other API from facebook

huggingface.co

Total runs: 8.0M
Run Growth: 26.1K
Growth Rate: 0.33%
Updated:January 20 2022
huggingface.co

Total runs: 8.0M
Run Growth: -8.9M
Growth Rate: -110.38%
Updated:September 15 2023
huggingface.co

Total runs: 3.7M
Run Growth: -840.3K
Growth Rate: -21.97%
Updated:September 06 2023
huggingface.co

Total runs: 3.2M
Run Growth: 876.4K
Growth Rate: 27.17%
Updated:January 17 2024
huggingface.co

Total runs: 2.7M
Run Growth: -574.4K
Growth Rate: -20.96%
Updated:December 28 2021
huggingface.co

Total runs: 2.2M
Run Growth: 468.9K
Growth Rate: 20.87%
Updated:January 25 2024
huggingface.co

Total runs: 2.2M
Run Growth: 159.7K
Growth Rate: 7.39%
Updated:March 23 2023
huggingface.co

Total runs: 1.9M
Run Growth: -434.9K
Growth Rate: -23.25%
Updated:November 21 2025
huggingface.co

Total runs: 738.2K
Run Growth: -201.5K
Growth Rate: -27.91%
Updated:September 06 2023
huggingface.co

Total runs: 475.3K
Run Growth: -136.5K
Growth Rate: -28.37%
Updated:May 22 2023
huggingface.co

Total runs: 442.3K
Run Growth: 74.9K
Growth Rate: 16.95%
Updated:February 29 2024
huggingface.co

Total runs: 429.4K
Run Growth: -69.0K
Growth Rate: -16.06%
Updated:March 17 2025
huggingface.co

Total runs: 383.6K
Run Growth: -200.9K
Growth Rate: -51.66%
Updated:January 12 2024
huggingface.co

Total runs: 330.5K
Run Growth: -60.2K
Growth Rate: -17.53%
Updated:January 12 2024
huggingface.co

Total runs: 308.7K
Run Growth: 35.7K
Growth Rate: 11.47%
Updated:September 15 2023
huggingface.co

Total runs: 307.7K
Run Growth: -66.3K
Growth Rate: -21.68%
Updated:September 06 2023
huggingface.co

Total runs: 281.7K
Run Growth: -26.8K
Growth Rate: -9.17%
Updated:November 17 2022
huggingface.co

Total runs: 280.9K
Run Growth: 61.9K
Growth Rate: 21.40%
Updated:June 15 2023
huggingface.co

Total runs: 260.0K
Run Growth: 167.8K
Growth Rate: 63.90%
Updated:May 22 2023
huggingface.co

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

Total runs: 210.0K
Run Growth: -142.4K
Growth Rate: -65.85%
Updated:July 25 2023
huggingface.co

Total runs: 187.6K
Run Growth: 79.9K
Growth Rate: 42.35%
Updated:February 12 2023
huggingface.co

Total runs: 176.4K
Run Growth: 74.8K
Growth Rate: 42.40%
Updated:September 06 2023
huggingface.co

Total runs: 169.5K
Run Growth: -205.2K
Growth Rate: -119.47%
Updated:November 17 2023
huggingface.co

Total runs: 162.8K
Run Growth: -734
Growth Rate: -0.45%
Updated:September 01 2023
huggingface.co

Total runs: 147.1K
Run Growth: 108.3K
Growth Rate: 73.09%
Updated:November 16 2023
huggingface.co

Total runs: 120.4K
Run Growth: -3.4K
Growth Rate: -2.72%
Updated:June 03 2022
huggingface.co

Total runs: 109.8K
Run Growth: 26.2K
Growth Rate: 23.91%
Updated:November 20 2023
huggingface.co

Total runs: 109.5K
Run Growth: 25.9K
Growth Rate: 23.71%
Updated:January 25 2023
huggingface.co

Total runs: 107.8K
Run Growth: -8.5K
Growth Rate: -7.79%
Updated:September 15 2023
huggingface.co

Total runs: 104.7K
Run Growth: -8.1K
Growth Rate: -7.35%
Updated:June 13 2023
huggingface.co

Total runs: 100.3K
Run Growth: -210.0K
Growth Rate: -215.14%
Updated:June 13 2023
huggingface.co

Total runs: 86.7K
Run Growth: 59.4K
Growth Rate: 69.67%
Updated:February 12 2023
huggingface.co

Total runs: 61.6K
Run Growth: -17.6K
Growth Rate: -28.52%
Updated:March 28 2026
huggingface.co

Total runs: 59.2K
Run Growth: 16.3K
Growth Rate: 27.79%
Updated:January 25 2023
huggingface.co

Total runs: 50.1K
Run Growth: -19.8K
Growth Rate: -39.48%
Updated:January 29 2026