LAION-AI / LAION-AI/CLAP

Issue reproducing retrieval results using API and hugging face implementation

Open
#140 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
213
PR merge metrics
No merged PRs in 30d

Description

Hi, I tried replicating the audio to text retrieval results using the PyPI library and the hugging face implementation, however the obtained numbers do not match with those reported in the paper.
For the hugging face implementation, I use ClapTextModelWithProjection and ClapAudioModelWithProjection. I obtain the similarity score by performing cosine similarity and sort the retrieved texts by similarity score.
Similarly for the PyPI library implementation, I use get_audio_embedding_from_data and get_text_embedding and follow the same procedure as above.
The model is initialized as following:

model = laion_clap.CLAP_Module(enable_fusion=enable_fusion)
model.load_ckpt() 

I am using Clotho version 2.1 evaluation split from here and AudioCaps val split from google drive link in repository
Could you please help me understand what could be the issue?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the reported paper setup with the Clotho 2.1 evaluation split and AudioCaps validation split, then inspect the Hugging Face CLAP projection models and the PyPI embedding calls described in the issue. Reproduce the cosine-similarity ranking with both implementations and document either the source of the mismatch or the exact conditions needed to match the reported retrieval results.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.