CITATION — REFERENCE ENTRY
CREPE: A Convolutional Representation for Pitch Estimation — 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)
- Key
- kim2018-crepe
- Authors
- Kim, Jong Wook; Salamon, Justin; Li, Peter; Bello, Juan Pablo
- Issued
- 2018-4
- Type
- paper-conference
- Container
- 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)
- Pages
- 161-165
Raw CSL JSON
{
"DOI": "10.1109/ICASSP.2018.8461329",
"URL": "https://arxiv.org/abs/1802.06182",
"note": "Quotes are from the arXiv preprint (1802.06182v1, 17 February 2018); locators are its sections and tables.",
"page": "161-165",
"type": "paper-conference",
"title": "CREPE: A Convolutional Representation for Pitch Estimation",
"author": [
{
"given": "Jong Wook",
"family": "Kim"
},
{
"given": "Justin",
"family": "Salamon"
},
{
"given": "Peter",
"family": "Li"
},
{
"given": "Juan Pablo",
"family": "Bello"
}
],
"issued": {
"date-parts": [
[
2018,
4
]
]
},
"container-title": "2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)"
}
Claims
-
CREPE is a data-driven monophonic pitch tracker built on a deep convolutional neural network that works directly on the time-domain waveform; its authors reported results equal to or better than pYIN, until then among the best methods, which combine DSP pipelines and heuristics. A pretrained version is freely available as an open-source Python module.
"To date, the best performing techniques, such as the pYIN algorithm, are based on a combination of DSP pipelines and heuristics. While such techniques perform very well on average, there remain many cases in which they fail to correctly estimate the pitch. In this paper, we propose a data-driven pitch tracking algorithm, CREPE, which is based on a deep convolutional neural network that operates directly on the time-domain waveform. We show that the proposed model produces state-of-the-art results, performing equally or better than pYIN. ... A pretrained version of CREPE is made freely available as an open-source Python module for easy application."
-
CREPE takes a 1024-sample excerpt of audio at 16 kHz; six convolutional layers produce a 2048-dimensional representation connected to 360 sigmoid outputs, one per pitch bin of 20 cents covering six octaves from C1 (32.70 Hz) to B7 (1975.5 Hz). The estimate is the activation-weighted average of the bins' pitches.
"The input is a 1024-sample excerpt from the time-domain audio signal, using a 16 kHz sampling rate. There are six convolutional layers that result in a 2048-dimensional latent representation, which is then connected densely to the output layer with sigmoid activations corresponding to a 360-dimensional output vector ŷ. ... The 360 pitch values are denoted as ¢1, ¢2, ..., ¢360 and are selected so that they cover six octaves with 20-cent intervals between C1 and B7, corresponding to 32.70 Hz and 1975.5 Hz. The resulting pitch estimate ¢̂ is the weighted average of the associated pitches ¢i according to the output ŷ"
-
CREPE was compared with pYIN and SWIPE, taken as the state of the art in monophonic pitch tracking, including on versions of MDB-stem-synth degraded with pub, white, pink and brown noise at signal-to-noise ratios down to 0 dB.
"We compare CREPE against the current state of the art in monophonic pitch tracking, represented by the pYIN [13] and SWIPE [12] algorithms. To examine the noise robustness of each algorithm, we also evaluate their pitch tracking performance on degraded versions of MDB-stem-synth, using the Audio Degradation Toolbox (ADT) [28]. We use four different noise sources provided by the ADT: pub, white, pink, and brown. ... We used seven different signal-to-noise ratio (SNR) values: ∞, 40, 30, 20, 10, 5, and 0 dB."
-
To have exact reference F0, CREPE was evaluated on synthesised audio: RWC-synth (6.16 hours synthesised from the RWC Music Database with a fixed, simple timbre) and MDB-stem-synth (230 MedleyDB stems of 25 instruments, 15.56 hours, resynthesised to keep their timbre and dynamics with a known F0). MedleyDB's own annotations were not used because they include manual corrections.
"we cannot use a dataset such as MedleyDB [1], since its annotation process includes manual corrections which do not guarantee a 100% perfect match between the annotation and the audio, and it can be affected, to a degree, by human subjectivity. To guarantee a perfectly objective evaluation, we must use datasets of synthesized audio in which we have perfect control over the f0 of the resulting signal. We use two such datasets: the first, RWC-synth, contains 6.16 hours of audio synthesized from the RWC Music Database [24] ... the second dataset we use is a collection of 230 monophonic stems taken from MedleyDB and re-synthesized using the methodology presented in [18], which uses an analysis/synthesis approach to generate a synthesized track with a perfect f0 annotation that maintains the timbre and dynamics of the original track. This dataset consists of 230 tracks with 25 instruments, totaling 15.56 hours of audio"
-
CREPE's first-layer filters trained on RWC-synth concentrated on the overtones rather than the fundamental; on the more varied MDB-stem-synth most overlapped the fundamental's range, suggesting the network adapts to the timbre and frequency distribution of its data.
"This indicates that the first convolutional layer in our model learns to distinguish the frequencies of the overtones rather than the fundamental frequency. ... Conversely, when the timbre is heterogeneous and more complex, as is the case for MDB-stem-synth, the model cannot rely solely on the harmonic structure and requires filters that capture the f0 periodicity directly in addition to the harmonics. In both cases, this suggests that the neural network can adapt to the distribution of timbre and frequency in the dataset of interest"
-
CREPE estimates each frame independently with no temporal tracking, unlike pYIN's hidden Markov model; its authors proposed data augmentation and a recurrent layer as future improvements.
"Pitch values tend to be continuous over time, but CREPE estimates the pitch of every frame independently without using any temporal tracking, unlike pYIN which exploits this by using an HMM to enforce temporal smoothness. We can potentially improve the performance of CREPE even further by enforcing temporal smoothness. In the future, we plan to do this by means of adding recurrent architecture to our model"
-
Earlier pitch trackers improved through better candidate-generating functions and post-processing heuristics, none learned from data except for hand-tuned parameters, unlike chord recognition and beat detection, where data-driven methods had consistently outperformed heuristics.
"A notable trend in the above methods is that the derivation of a better pitch detection system solely depends on cleverly devising a robust candidate-generating function and/or sophisticated post-processing steps, i.e. heuristics, and none of them are directly learned from data, except for manual hyperparameter tuning. This contrasts with many other problems in music information retrieval like chord ID [16] and beat detection [17], where data-driven methods have been shown to consistently outperform heuristic approaches."
-
Pitch estimation has been studied for more than half a century. Earlier methods use a candidate-generating function with pre- and post-processing: the cepstrum, the autocorrelation function, the average magnitude difference function, the normalized cross-correlation of RAPT and Praat, and YIN's cumulative mean normalized difference function. Later came SWIPE, which matches the spectrum against a sawtooth template, and pYIN; comparative studies found YIN-based methods the state of the art.
"Computational methods for monotonic pitch estimation have been studied for more than a half-century [6], and many reliable methods have been proposed since. Earlier methods commonly employ a certain candidate-generating function, accompanied by pre- and post-processing stages to produce the pitch curve. Those functions include the cepstrum [6], the autocorrelation function (ACF) [7], the average magnitude difference function (AMDF) [8], the normalized cross-correlation function (NCCF) as proposed by RAPT [9] and PRAAT [10], and the cumulative mean normalized difference function as proposed by YIN [11]. More recent approaches include SWIPE [12], which performs template matching with the spectrum of a sawtooth waveform, and pYIN [13], a probabilistic variant of YIN that uses a Hidden Markov Model (HMM) to decode the most probable sequence of pitch values. According to a few comparative studies, the state of the art is achieved by YIN-based methods [14, 15], with pYIN being the best performing method to date [13]."
-
CREPE was trained and tested with 5-fold cross-validation (60/20/20 split), with folds on MDB-stem-synth split by artist to avoid artist or album effects. Results are raw pitch accuracy and raw chroma accuracy: the share of frames within 50 cents of the reference, computed with mir_eval.
"We train the model using 5-fold cross-validation, using a 60/20/20 train, validation, and test split. For MDB-stem-synth, we use artist-conditional folds, in order to avoid training and testing on the same artist which can result in artificially high performance due to artist or album effects [25]. The evaluation of an algorithm's pitch estimation is measured in raw pitch accuracy (RPA) and raw chroma accuracy (RCA) with 50 cent thresholds [26]. These metrics measure the proportion of frames in the output for which the output of the algorithm is within 50 cents (a quarter-tone) of the ground truth. We use the reference implementation provided in mir_eval [27] to compute the evaluation metrics."
-
In music signal processing, monophonic pitch tracking is used to generate pitch annotations for multitrack datasets and as a core part of melody extraction systems; in speech analysis it supports the study of prosody.
"Pitch estimation plays an important role in music signal processing, where monophonic pitch tracking is used as a method to generate pitch annotations for multi-track datasets [1] or as a core component of melody extraction systems [2, 3]. Pitch estimation is also important for speech analysis, where prosodic aspects such as intonations may reflect various features of speech [4]."
-
With added noise, CREPE kept the highest accuracy at every level of pub and white noise and at all but the highest level of pink noise; with brown noise, which is concentrated at low frequencies, pYIN was almost unaffected.
"CREPE maintains the highest accuracy for all SNR levels for pub noise and white noise, and for all SNR levels except for the highest level of pink noise. Brown noise is the exception where pYIN's performance is almost unaffected by the noise. This can be attributed to the fact that brown noise has most of its energy at low frequencies, to which the YIN algorithm (on which pYIN is based) is particularly robust."
-
Heuristic pitch trackers often reach raw pitch accuracy close to 100%, leading some to consider the task solved, but even pYIN can give noisy results on uncommon instruments or fast-moving pitch, a problem where pitch tracks are used to make reference annotations.
"in many cases heuristics for estimating this periodicity perform extremely well with accuracies (measured in raw pitch accuracy, defined later on) close to 100%, leading some to consider the task a solved problem. This, however, is not always the case, and even top performing algorithms like pYIN can still produce noisy results for challenging audio recordings such as a sound of uncommon instruments or a pitch curve that fluctuates very fast. This is particularly problematic for tasks that require a flawless f0 estimation, such as using the output of a pitch tracker to generate reference annotations for melody and multi-f0 estimation [18, 19]."
-
Pitch is a subjective quality that does not correspond exactly to fundamental frequency, but apart from rare exceptions it can be quantified by fundamental frequency, so outside psychoacoustics the two terms are used interchangeably.
"Pitch is defined as a subjective quality of perceived sounds and does not precisely correspond to the physical property of the fundamental frequency [5]. However, apart from a few rare exceptions, pitch can be quantified using fundamental frequency, and thus they are often used interchangeably outside psychoacoustical studies."
-
On MDB-stem-synth, raw pitch accuracy at 50 cents was 0.967 for CREPE, 0.919 for pYIN and 0.925 for SWIPE; at 10 cents it was 0.909, 0.826 and 0.816. On RWC-synth CREPE reached 0.999 against pYIN's 0.990. The gap widened as the tolerance narrowed.
"Table 1: ... MDB-stem-synth RPA 0.967±0.091 0.919±0.129 0.925±0.116 ... Table 2: ... 10 cents 0.909±0.126 0.826±0.150 0.816±0.165 ... We see that as the threshold is decreased, the difference in performance becomes more accentuated, with CREPE outperforming by over 8 percentage points when the evaluation tolerance is lowered to 10 cents."
-
CREPE's training target is a Gaussian blur, with a standard deviation of 25 cents, around the true pitch's bin, which softens the penalty for near misses; the network minimises binary cross-entropy and was implemented in Keras.
"As in [19], in order to soften the penalty for near-correct predictions, the target is Gaussian-blurred in frequency such that the energy surrounding a ground truth frequency decays with a standard deviation of 25 cents ... The network is trained to minimize the binary cross entropy between the target vector y and the predicted vector ŷ ... This architecture and the training procedures are implemented using Keras [23]."
-
CREPE did worse on higher-pitched instruments and failed on the dizi, a Chinese flute whose tracks all came from one artist and so never appeared in training when tested; it did well where timbre and range were represented in training.
"It is notable that the model performs worse for the instruments with higher average frequencies, but the performance is also dependent on the timbre. CREPE performs particularly worse on the tracks with the dizi, a Chinese transverse flute, because the tracks came from the same artist, and they are all placed in the same split. This means that for the fold in which the dizi tracks are in the test set, the training and validation sets do not contain a single dizi track, and the model fails to generalize to this previously unseen timbre. ... Unsurprisingly, the model performs well on test tracks whose timbre and frequency range are well-represented in the training set."
Available in