Audio AI Itọsọna

Isọri oriṣi Orin

Isọri oriṣi orin jẹ iṣẹ ṣiṣe ti isamisi gbigbasilẹ laifọwọyi bi apata, jazz, hip-hop tabi oriṣi miiran lati inu ohun rẹ.

Gbọ si itọsọna yiiAI-ṣe afihan · ~8 min

Lori iwe yi9 min kika
  1. Akopọ
  2. Awọn gbigba bọtini
  3. Jin Dive
  4. Building a small genre classifier with an artist-aware split
  5. Real-World imuse
  6. Ojo iwaju ti Isọsọ oriṣi Orin
  7. Fifi o sinu iwa
  8. Awọn orisun ati siwaju kika
  9. Tesiwaju Ṣiṣawari
  10. Awọn ibeere ti a beere nigbagbogbo

Akopọ

It began with hand-designed features and simple classifiers in 2002, moved to convolutional networks on spectrograms, and now relies on large pretrained audio models. It underpins music search and organization, but genre labels are fuzzy and popular benchmarks have known flaws.

Awọn gbigba bọtini

  1. Music genre classification labels audio recordings by genre, usually by converting sound to a mel-spectrogram and feeding it to a trained classifier.
  2. Tzanetakis and Cook's 2002 system used hand-crafted timbre, rhythm and pitch features and reached 61% accuracy on ten genres.
  3. The GTZAN benchmark of 1,000 thirty-second clips contains exact repetitions, mislabelings and heavy artist repetition, which can inflate reported accuracy.
  4. Fine-tuning PANNs, pretrained on about 1.9 million AudioSet clips, raised GTZAN accuracy to 91.5% from 75.8% when training from scratch.
  5. Genre labels are subjective and culture-specific, so multi-label tags, hierarchies and artist-filtered evaluation give more trustworthy results than single labels.

Jin Dive

Music genre classification takes an audio file and assigns it one or more genre labels such as classical, country, disco, hip-hop, jazz, metal, pop, reggae, rock or blues. It is one of the oldest tasks in music information retrieval (MIR), the research field that builds software to search, organize and analyze music. The task sounds simple but has a philosophical problem at its core: genres are, as Tzanetakis and Cook wrote in 2002, labels created by humans with no strict definitions or boundaries, shaped by marketing, history and culture. A classifier can only learn whatever regularities its training labels happen to encode.

Every system follows the same basic pipeline. First, audio is converted to a standard format, often mono at 22,050 or 16,000 samples per second, and cut into excerpts, commonly 30 seconds. Second, the audio is turned into a representation that exposes musical structure. The most common is a mel-spectrogram, an image-like grid showing how much energy falls in each frequency band over time, with bands spaced to match human pitch perception. Third, a model maps that representation to scores for each genre. Fourth, predictions from many short windows are averaged to label the whole track. Systems differ mainly in step three: whether the features are designed by hand or learned.

The classic hand-crafted approach was set out by George Tzanetakis and Perry Cook in IEEE Transactions on Speech and Audio Processing in July 2002. They computed three families of features. Timbral texture features describe the sound's color: the spectral centroid (where the center of mass of the spectrum lies, which correlates with brightness), spectral rolloff, spectral flux (how quickly the spectrum changes), zero-crossing rate (a rough measure of noisiness) and the first five mel-frequency cepstral coefficients (MFCCs, a compact summary of the spectral envelope borrowed from speech recognition). Rhythmic features came from a beat histogram covering 40 to 200 beats per minute. Pitch features came from a histogram of detected pitches. Simple statistical classifiers, including Gaussian mixture models and k-nearest neighbors, then labeled the clips, reaching 61% accuracy on ten genres.

Their dataset of 1,000 thirty-second clips, 100 for each of ten genres, recorded at 22,050 Hz from radio, CDs and MP3 files, became known as GTZAN and the standard benchmark. In 2013, Bob Sturm counted at least 100 published works that used it and documented serious faults: 50 exact repeated excerpts, 21 further repetitions of the same recording, mislabeled clips and distorted audio. Artist repetition is heavy; the 100 blues excerpts come from only nine artists, and more than a third of the reggae excerpts are by Bob Marley. When the same artist appears in both training and test sets, a model can score well by recognizing the artist or recording rather than the genre, which inflates reported accuracy.

Deep learning shifted the field around 2016. Keunwoo Choi, George Fazekas and Mark Sandler showed at ISMIR 2016 that fully convolutional networks reading mel-spectrograms reached state-of-the-art music tagging on the MagnaTagATune dataset, and that deeper networks did better on the larger Million Song Dataset, concluding that mel-spectrograms are an effective input. Convolutional networks learn their own filters for patterns such as drum hits, harmonic textures and vocal styles, removing the need to design features by hand. Larger datasets followed, notably FMA in 2017 with 106,574 tracks and 161 genres arranged in a hierarchy, with Creative Commons audio that researchers can share.

The current approach is transfer learning from large pretrained models. PANNs (Kong and colleagues, 2020) trained convolutional networks on AudioSet, a collection of about 1.9 million YouTube clips labeled with 527 sound classes, then fine-tuned them on smaller tasks. On GTZAN, the fine-tuned network scored 91.5% accuracy against 75.8% when trained from scratch, while a specialized prior system had reported 93.9%. MERT (ICLR 2024) went further with self-supervised pretraining on music audio, learning to predict hidden targets from an acoustic codec and a constant-Q transform, a pitch-aligned spectrogram, and was evaluated across 14 tasks including genre classification.

Compared with the alternatives, audio-based classification has distinct strengths and weaknesses. Metadata-based approaches use artist, label or user tags; they are cheap and often accurate for well-known music but fail for new uploads with no history. Collaborative filtering infers similarity from listening behavior rather than sound, which captures cultural context that audio cannot. Lyrics-based models help for genres defined by content or language. Audio classifiers work on any recording, including brand-new or unreleased tracks, which is why they are useful for cold-start tagging, but they see only the sound and miss context.

The limitations are significant. Genre boundaries are subjective, overlapping and culture-specific, so a single label per track is often wrong by design; FMA's hierarchy and multi-label tagging are partial answers. Benchmark numbers can mislead: Sturm showed that GTZAN's repetitions and mislabelings affect different systems differently, so accuracy rankings on it are not reliable without artist-filtered splits. GTZAN's ten categories are all Western popular and classical styles, so models trained on it say nothing about most of the world's music. Models can latch onto production artifacts, such as recording era or audio compression, instead of musical traits. In practice, fine-tuning a pretrained model on a dataset the size of GTZAN is a small job, while pretraining models such as PANNs on about 1.9 million clips, or MERT at up to 330 million parameters, requires far larger compute.

04Apẹẹrẹ ṣiṣẹ

Building a small genre classifier with an artist-aware split

  1. Download the FMA small subset, which comes with genre labels and a predefined train, validation and test split.

  2. Resample each 30-second clip to 22,050 Hz mono and compute a 128-band log-mel spectrogram with librosa.

  3. As a baseline, compute means and variances of spectral centroid, rolloff, zero-crossing rate and the first 13 MFCCs, then train a logistic regression classifier.

  4. Train a small convolutional network on the mel-spectrograms, or fine-tune a pretrained audio model such as a PANNs checkpoint with a new genre output layer.

  5. Evaluate both on the test split and print a confusion matrix showing which genres are confused with which.

  6. Check that no artist appears in both training and test sets, and compare results to a random split to see how much artist overlap inflates accuracy.

Ohun ti o fihan

Two models with test accuracies and confusion matrices. Expect the learned or pretrained model to beat the hand-crafted baseline, and expect confusions between musically adjacent genres such as rock and pop; a large gap between random-split and artist-filtered accuracy signals the model is recognizing artists, not genres.

Real-World imuse

Tzanetakis and Cook's 2002 system combined timbre, rhythm and pitch features with Gaussian mixture classifiers and reached 61% accuracy across ten genres, which the authors called comparable to reported human results.

The Free Music Archive (FMA) dataset, published at ISMIR 2017, offers 106,574 Creative Commons tracks from 16,341 artists labeled with a hierarchy of 161 genres for training and benchmarking.

PANNs, audio networks pretrained on about 1.9 million AudioSet clips, reached 91.5% accuracy on the ten-genre GTZAN benchmark after fine-tuning, against 75.8% for the same network trained from scratch.

MERT (ICLR 2024), a self-supervised music model with 95 million to 330 million parameters, was evaluated on 14 music understanding tasks including GTZAN genre classification, tagging, key detection and beat tracking.

Music libraries and streaming catalogs can use genre classifiers to suggest tags for untagged uploads, organize archives and seed recommendations, a use Tzanetakis and Cook anticipated for large online music collections.

Ojo iwaju ti Isọsọ oriṣi Orin

Research is moving from single-task genre classifiers toward general music foundation models evaluated on many tasks at once, as with MERT (ICLR 2024), which reports results across 14 music understanding tasks. Models that embed audio and text in a shared space allow free-text queries such as describing a mood or style rather than picking from a fixed genre list, which sidesteps some of the rigidity of fixed taxonomies. The evaluation problems identified by Sturm in 2013 remain relevant: GTZAN is still widely reported, and its repetitions and mislabelings mean small accuracy differences are hard to interpret. Larger and better-documented datasets such as FMA (2017) help, but labeling remains culturally specific. Open questions include how to represent hierarchical and overlapping genres, how to evaluate models fairly across cultures, how to avoid shortcut learning from production artifacts, and how to classify music that was itself generated by AI, whose audio statistics may differ from the recordings models were trained on. None of these has a settled answer.

Fifi o sinu iwa

Kini idi ti o ṣe pataki

  • Wiwọle ati arọwọto. O ṣe ilọsiwaju iraye si nipasẹ transcription, alaye, ati awọn atọkun ohun.
  • Iye owo ati isuna. Awọn ẹgbẹ Media le firanṣẹ ohun didan yiyara pẹlu awọn isuna-owo kekere.
  • Iyara ati iwọn. Awọn ọna ṣiṣe ti nkọju si alabara le ṣe ilana awọn ibaraẹnisọrọ sisọ ni iwọn nla.

Ṣọra fun

  • ilokulo ohun ati awọn ewu afarawe ṣe pọ si nigbati igbanilaaye ba sonu.
  • Yiye le ju silẹ kọja awọn asẹnti, awọn ede-ede, tabi awọn agbegbe alariwo.
  • Ohun afetigbọ sintetiki le jẹ aṣiṣe fun ọrọ ododo laisi isamisi to yege.

Next awọn igbesẹ

  1. Gba ifọkansi ti o fojuhan fun gbigba ohun, ti ẹda, ati ilotunlo.
  2. Didara idanwo kọja awọn agbohunsoke oniruuru ati awọn ipo abẹlẹ.
  3. Ṣetumo nigbati eniyan gbọdọ ṣe atunyẹwo tabi fọwọsi awọn abajade.
  4. Aami ohun sintetiki ki o tọju awọn igbasilẹ provenance fun iṣiro.

Awọn orisun ati siwaju kika

  1. IEEE Transactions on Speech and Audio Processing (2002)Musical Genre Classification of Audio Signals
  2. arXivThe GTZAN dataset: Its contents, its faults, their effects on evaluation, and its future use
  3. arXiv (ISMIR 2017)FMA: A Dataset For Music Analysis
  4. arXiv (ISMIR 2016)Automatic tagging using deep convolutional neural networks
  5. arXivPANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition
  6. arXiv (ICLR 2024)MERT: Acoustic Music Understanding Model with Large-Scale Self-supervised Training

Tesiwaju Ṣiṣawari

Ìwé ìròyìn ọfẹ

Gba ìkànìyàn AI ojoojúmọ́

Ìtàn AI mẹta tó jẹ́rìí ní gbogbo owurọ́ ọjọ́ iṣẹ́, kọ́wé ní Gẹ̀ẹ́sì tó rọrùn. Ọfẹ́ fún gbogbo àkókò, kò sí ìpolówó.

Ìmeèlì kan ní gbogbo ọjọ́ iṣẹ́. Yọkúrò ní ìkànìyàn ní ìkànìyàn kan. A kò ta tàbí pín àdírẹ́sì rẹ.

Ṣe idanwo fun ara rẹ

Take the Music Genre Classification quiz

Ìdáhùn lẹ́sẹ̀kẹsẹ̀ lórí gbogbo ìdáhùn, àti iwe-ẹ̀rí tó lè pin pẹ̀lú ID tó lè jẹ́rìí lẹ́yìn tí o bá kọ́ ẹ̀kọ́.

Bẹrẹ adanwo

Ṣe àtìlẹ́yìn ẹ̀kọ́ AI ọfẹ́. AI Understanding jẹ́ àjọ àìní èrè 501(c)(3) — kò sí ìpolówó, kò sí àkúnya owó, ní gbogbo àkókò. Ṣe ẹbun kan

Awọn ibeere ti a beere nigbagbogbo

Kini Isọri Iru Orin?

Music genre classification is the task of automatically labeling a recording as rock, jazz, hip-hop or another genre from its audio. It began with hand-designed features and simple classifiers in 2002, moved to convolutional networks on spectrograms, and now relies on large pretrained audio models. It underpins music search and organization, but genre labels are fuzzy and popular benchmarks have known flaws.

Kini mel-spectrogram, ti a lo nigbagbogbo bi titẹ sii si oriṣi-ipinsi awọn nẹtiwọọki nkankikan?

A mel-spectrogram duro fun bi agbara ni oriṣiriṣi awọn igbohunsafẹfẹ yipada lori akoko, pẹlu ipo igbohunsafẹfẹ ti o ya si iwọn mel ti o baamu iwoye ipolowo eniyan.

Iru data ala-ilẹ alailẹgbẹ wo ni o ni awọn agekuru iṣẹju-aaya 1,000 laarin awọn oriṣi 10?

GTZAN, ti a pejọ nipasẹ George Tzanetakis, ti pẹ ti jẹ aami ipilẹ-isọri oriṣi boṣewa, botilẹjẹpe o ti ṣofintoto ni bayi fun ṣiṣamisi ati awọn oṣere atunwi.

Kini idi ti iyọrisi pipe-ipejuwe-isọtọ-pipe jẹ pataki pataki?

Oriṣiriṣi jẹ aṣa, imọran iruju; songs parapo aza ati eda eniyan ara wọn koo lori akole, ki a nikan ti o tọ idahun igba ko ni tẹlẹ.

Ẹya ti a ṣe ni ọwọ wo ni a lo ni lilo pupọ ni awọn ọna ṣiṣe iyasọtọ oriṣi akọkọ?

Awọn ኤምFCC ṣe igbasilẹ timbral, irisi ohun afetigbọ ati pe o jẹ ẹya pataki fun awọn ikawe bii SVM ṣaaju ikẹkọ jinlẹ.

Kí ni a softmax Layer ni opin ti a oriṣi classifier gbejade?

Softmax ṣe iyipada awọn ikun aise ti nẹtiwọọki sinu awọn iṣeeṣe ti o lapapọ si ọkan kọja gbogbo awọn kilasi oriṣi, ati pe o ga julọ ni a yan bi asọtẹlẹ naa.