{"action":"created","issue":{"url":"https://api.github.com/repos/CPJKU/madmom/issues/375","repository_url":"https://api.github.com/repos/CPJKU/madmom","labels_url":"https://api.github.com/repos/CPJKU/madmom/issues/375/labels{/name}","comments_url":"https://api.github.com/repos/CPJKU/madmom/issues/375/comments","events_url":"https://api.github.com/repos/CPJKU/madmom/issues/375/events","html_url":"https://github.com/CPJKU/madmom/issues/375","id":348929493,"node_id":"MDU6SXNzdWUzNDg5Mjk0OTM=","number":375,"title":"Broken offline tempo estimation via DBN ","user":{"login":"SebastianPoell","id":1398398,"node_id":"MDQ6VXNlcjEzOTgzOTg=","avatar_url":"https://avatars2.githubusercontent.com/u/1398398?v=4","gravatar_id":"","url":"https://api.github.com/users/SebastianPoell","html_url":"https://github.com/SebastianPoell","followers_url":"https://api.github.com/users/SebastianPoell/followers","following_url":"https://api.github.com/users/SebastianPoell/following{/other_user}","gists_url":"https://api.github.com/users/SebastianPoell/gists{/gist_id}","starred_url":"https://api.github.com/users/SebastianPoell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SebastianPoell/subscriptions","organizations_url":"https://api.github.com/users/SebastianPoell/orgs","repos_url":"https://api.github.com/users/SebastianPoell/repos","events_url":"https://api.github.com/users/SebastianPoell/events{/privacy}","received_events_url":"https://api.github.com/users/SebastianPoell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-08T23:41:46Z","updated_at":"2018-08-09T06:50:22Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Expected behaviour\r\n\r\nEstimating the offline tempo via DBN should work.\r\n\r\n### Actual behaviour\r\n\r\nHi, seems like there is a bug when estimating the tempo **offline** via **DBN**, resulting in error messages and incorrect tempo estimations.\r\n\r\nThe reason is that the activations get smoothed inside the TempoEstimationProcessor, which improves the results for `method=acf` and `method=comb` but breaks the DBN when `method=dbn` is used:\r\n\r\n```python\r\nact_smooth = int(round(self.fps * self.act_smooth))\r\nactivations = smooth_signal(activations, act_smooth)\r\n\r\n```\r\n\r\nWhy? Smoothing can lead to activations > 1. When computing the log densities for the DBN, an observation greater than 1 means that the logarithm of a minus-number is calculated, which results in minus infinity and breaks the Viterbi algorithm:\r\n\r\n```python\r\nlog_densities[:, 0] = np.log((1. - observations) / (self.observation_lambda - 1))\r\n\r\n```\r\n\r\n### Solution\r\n\r\nOne solution would be to normalize the activations after smoothing, but results turned out to be better if smoothing is simply not applied at all for `method=dbn`.\r\n\r\nTherefore, one suggestion would be that we remove the smoothing from TempoEstimationProcessor and move it directly into CombFilterTempoHistogramProcessor and ACFTempoHistogramProcessor. I could do a small PR on that if you like ;)\r\n\r\n### Steps needed to reproduce the behaviour\r\n\r\nJust use `method=dbn` for the tempo detector and try it on some activations in offline mode."},"comment":{"url":"https://api.github.com/repos/CPJKU/madmom/issues/comments/411655582","html_url":"https://github.com/CPJKU/madmom/issues/375#issuecomment-411655582","issue_url":"https://api.github.com/repos/CPJKU/madmom/issues/375","id":411655582,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTY1NTU4Mg==","user":{"login":"superbock","id":9304668,"node_id":"MDQ6VXNlcjkzMDQ2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/9304668?v=4","gravatar_id":"","url":"https://api.github.com/users/superbock","html_url":"https://github.com/superbock","followers_url":"https://api.github.com/users/superbock/followers","following_url":"https://api.github.com/users/superbock/following{/other_user}","gists_url":"https://api.github.com/users/superbock/gists{/gist_id}","starred_url":"https://api.github.com/users/superbock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superbock/subscriptions","organizations_url":"https://api.github.com/users/superbock/orgs","repos_url":"https://api.github.com/users/superbock/repos","events_url":"https://api.github.com/users/superbock/events{/privacy}","received_events_url":"https://api.github.com/users/superbock/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T06:50:22Z","updated_at":"2018-08-09T06:50:22Z","author_association":"MEMBER","body":"Yes, that's true. I thought I had a check included for DBN tempo estimation (in the old code before tempo refactoring), but I can't find it right now. Anyways, #376 fixes this. Thanks for reporting!"}}
{"actor":{"display_login":"superbock"}}