MTG / mtg-jamendo-dataset

Metadata, scripts and baselines for the MTG-Jamendo dataset
Apache License 2.0
254 stars 35 forks source link

Bitwise exact duplicates #52

Open raraz15 opened 3 weeks ago

raraz15 commented 3 weeks ago

Description

The mtg-jamendo dataset contains multiple instances of duplicate audio files, which are bitwise exact copies but have different filenames. These duplicates might cause issues in applications that rely on data uniqueness, such as audio fingerprinting.

Steps to Reproduce

  1. Clone the mtg-jamendo repository.
  2. Use the hash generation code from FMA datasets issue #23 to generate hash values for each MP3 file in the raw_30s directory.
  3. Identify files with identical hash values with the following code:
hashes = json.load(open(hashes_path))
dup_ = []
for hash, track_ids in hashes.items():
    if len(track_ids) > 1:
        print(track_ids)
        dup_.append(len(track_ids))
print(len(dup_))
print(sum(dup_))
print(max(dup_))

Expected Behavior

Each audio file should be unique without any bitwise duplicates.

Actual Behavior

Out of 55,701 MP3 files in the raw_30s directory, a small percentage are found to be exact duplicates:

Examples of Duplicates

Additional Context

This issue may not affect all use cases but could be critical for applications that require distinct audio samples, such as for training machine learning models or for audio fingerprinting applications.

Suggested Fix

A thorough audit and removal of duplicate files, or at least documentation in the dataset metadata indicating the presence of duplicates.

dbogdanov commented 3 weeks ago

Thank you for this duplicate analysis!

We could provide alternative deduplicated versions for autotagging.tsv (--> autotagging_dedup.tsv) and all derivative tagging subsets (autotagging_top50tags.tsv, autotagging_genre.tsv, autotagging_instrument.tsv, and autotagging_moodtheme.tsv --> autotagging_top50tags_dedup.tsv, autotagging_genre_dedup.tsv, autotagging_instrument_dedup.tsv, and autotagging_moodtheme_dedup.tsv) and their splits.

However, for tagging this is not very critical. So we could start with creating the autotagging_dedup.tsv first.