micmon/notebooks/dataset.ipynb

232 lines
56 KiB
Text
Raw Normal View History

2020-10-27 15:21:32 +01:00
{
"cells": [
{
"cell_type": "markdown",
"source": [
"This notebook scans for labelled audio samples in a directory,\n",
"extracts the spectrum of the samples and creates dataset files\n",
"with the spectrum data to train the audio detection model."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DEBUG:matplotlib:(private) matplotlib data path: /usr/lib/python3.8/site-packages/matplotlib/mpl-data\n",
"DEBUG:matplotlib:matplotlib data path: /usr/lib/python3.8/site-packages/matplotlib/mpl-data\n",
"DEBUG:matplotlib:CONFIGDIR=/home/blacklight/.config/matplotlib\n",
"DEBUG:matplotlib:matplotlib version 3.3.2\n",
"DEBUG:matplotlib:interactive is False\n",
"DEBUG:matplotlib:platform is linux\n",
"DEBUG:matplotlib:loaded modules: ['sys', 'builtins', '_frozen_importlib', '_imp', '_warnings', '_frozen_importlib_external', '_io', 'marshal', 'posix', '_thread', '_weakref', 'time', 'zipimport', '_codecs', 'codecs', 'encodings.aliases', 'encodings', 'encodings.utf_8', '_signal', '__main__', 'encodings.latin_1', '_abc', 'abc', 'io', '_stat', 'stat', '_collections_abc', 'genericpath', 'posixpath', 'os.path', 'os', '_sitebuiltins', '_locale', '_bootlocale', 'types', 'importlib._bootstrap', 'importlib._bootstrap_external', 'warnings', 'importlib', 'importlib.machinery', 'importlib.abc', '_operator', 'operator', 'keyword', '_heapq', 'heapq', 'itertools', 'reprlib', '_collections', 'collections', '_functools', 'functools', 'contextlib', 'importlib.util', 'google', 'google.assistant', 'google.assistant.embedded', 'googlesamples', 'googlesamples.assistant', 'google.cloud', 'google.logging', 'google.iam', 'mpl_toolkits', 'ruamel', 'sphinxcontrib', 'zope', 'site', '_weakrefset', 'weakref', 'pkgutil', 'runpy', 'ipykernel._version', '__future__', 'enum', '_sre', 'sre_constants', 'sre_parse', 'sre_compile', 'copyreg', 're', '_json', 'json.scanner', 'json.decoder', 'json.encoder', 'json', 'errno', 'signal', 'threading', '_posixsubprocess', 'select', 'collections.abc', 'math', 'selectors', 'subprocess', 'IPython.core', 'IPython.core.getipython', 'IPython.core.release', 'atexit', 'copy', 'fnmatch', 'glob', 'token', 'tokenize', 'linecache', 'traceback', '_string', 'string', 'logging', 'zlib', '_compression', '_bz2', 'bz2', '_lzma', 'lzma', 'pwd', 'grp', 'shutil', '_opcode', 'opcode', 'dis', 'inspect', '_struct', 'struct', 'six', 'traitlets.utils', 'traitlets.utils.getargspec', 'ipython_genutils._version', 'ipython_genutils', 'locale', 'ipython_genutils.encoding', 'ipython_genutils.py3compat', 'traitlets.utils.importstring', 'traitlets.utils.sentinel', 'traitlets.utils.bunch', 'traitlets.traitlets', 'traitlets._version', 'traitlets', 'decorator', 'gettext', 'argparse', '_ast', 'ast', '_bisect', 'bisect', '_sha512', '_random', 'random', 'ipython_genutils.path', 'traitlets.config.loader', 'textwrap', 'ipython_genutils.text', 'traitlets.config.configurable', 'ipython_genutils.importstring', 'traitlets.config.application', 'traitlets.config', 'pprint', 'platform', 'sysconfig', 'urllib', 'urllib.parse', '_sysconfigdata__linux_x86_64-linux-gnu', 'pydoc', 'bdb', 'IPython.utils', 'IPython.utils.ipstruct', 'IPython.utils.coloransi', 'pygments', 'IPython.utils.colorable', 'IPython.utils.PyColorize', 'IPython.utils.encoding', 'IPython.utils.py3compat', 'IPython.core.excolors', 'IPython.testing', 'IPython.testing.skipdoctest', 'cmd', 'codeop', 'code', 'pdb', 'IPython.core.debugger', 'IPython.core.display_trap', 'pexpect.exceptions', 'pexpect.utils', 'pexpect.expect', 'termios', 'tty', 'pty', 'fcntl', 'resource', 'ptyprocess.util', 'ptyprocess.ptyprocess', 'ptyprocess', 'pexpect.spawnbase', 'pexpect.pty_spawn', 'pexpect.run', 'pexpect', 'shlex', 'IPython.utils._process_common', 'IPython.utils._process_posix', 'IPython.utils.process', 'IPython.utils.decorators', 'IPython.utils.path', 'IPython.utils.data', 'IPython.utils.terminal', 'IPython.core.ultratb', 'IPython.utils._sysinfo', 'IPython.utils.sysinfo', 'IPython.core.crashhandler', 'tempfile', 'IPython.utils.importstring', 'IPython.paths', 'IPython.core.profiledir', 'IPython.core.application', 'IPython.terminal', '_hashlib', '_blake2', '_sha3', 'hashlib', 'IPython.core.compilerop', 'IPython.core.error', 'ntpath', 'pathlib', 'IPython.utils.text', 'IPython.core.magic_arguments', 'getopt', 'typing.io', 'typing.re', 'typing', 'binascii', 'mimetypes', 'IPython.core.display', 'IPython.core.page', 'getpass', 'IPython.lib.security', 'IPython.lib', '_datetime', 'datetime', 'IPython.lib.pretty', 'IPython.utils.openpy', 'IPython.utils.dir2', 'IPython.utils.wildcard', 'pygments.lexers._mapping', 'pygments.modeline', 'pygments.plugin', 'pygments.util', 'pygments.lexers', 'pygments.filter', 'pygments.token', 'pygments.filters', 'pygments.regexopt', 'pygments.lexer', 'pygments.unistring', 'pygments.lexers.p
"DEBUG:matplotlib:CACHEDIR=/home/blacklight/.cache/matplotlib\n",
"DEBUG:matplotlib.font_manager:Using fontManager instance from /home/blacklight/.cache/matplotlib/fontlist-v330.json\n",
"DEBUG:matplotlib.pyplot:Loaded backend module://ipykernel.pylab.backend_inline version unknown.\n",
"DEBUG:matplotlib.pyplot:Loaded backend module://ipykernel.pylab.backend_inline version unknown.\n"
]
}
],
"source": [
"import os\n",
"\n",
"from micmon.audio import AudioDirectory, AudioPlayer, AudioFile\n",
"from micmon.dataset import DatasetWriter\n",
"\n",
"basedir = os.path.expanduser(os.path.join('~', 'projects', 'baby-monitor'))\n",
"audio_dir = os.path.join(basedir, 'data', 'audio')\n",
"datasets_dir = os.path.join(basedir, 'data', 'datasets')\n",
"audio_dirs = AudioDirectory.scan(audio_dir)\n",
"cutoff_frequencies = [250, 7500]"
]
},
{
"cell_type": "markdown",
"source": [
"Play some audio samples"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [],
"source": [
"for audio in audio_dirs:\n",
" with AudioFile(audio, start='19:40', duration=10) as reader, \\\n",
" AudioPlayer() as player:\n",
" for sample in reader:\n",
" player.play(sample)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "markdown",
"source": [
"Plot the spectrum of the audio samples in the first 10 seconds of each audio file."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [
{
"data": {
"text/plain": "<Figure size 432x288 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPN0lEQVR4nO3df4zkd13H8efLO0ApQvlxELi72jM5KKfycylVUStVuWuNpwl/XJEfNpBLDVU0JvYIUWP4pwY1QChcLvUsqOH+gAZOelIN/iDGgN0qlF7Lwdlib3vVXkVRIbEcffvHzMEwzO7Mbr97O/OZ5yPZ7Hy/38/Ovj+7s6/5zGc+3++mqpAkzb7v2ugCJEndMNAlqREGuiQ1wkCXpEYY6JLUCANdkhoxNtCTHE7yUJK7ljmeJO9OcjLJnUle0n2ZkqRxJhmh3wzsXuH4HmBn/2M/8L7HXpYkabXGBnpVfRL48gpN9gIfqJ5PARcmeXZXBUqSJrO5g/vYCpwa2F7q73twuGGS/fRG8VxwwQUvveSSSzr49mrV5x74yjdv/9DWp2xgJdL0uOOOOx6uqi2jjnUR6Bmxb+T1BKrqEHAIYGFhoRYXFzv49mrVxQdu/ebtxRuu2sBKpOmR5F+XO9bFKpclYPvA9jbgdAf3K0lahS4C/Sjw+v5ql8uAr1TVd0y3SJLW19gplyQfBC4HnpFkCfgd4HEAVXUQOAZcCZwEvgZcs17FSpKWNzbQq+rqMccLeHNnFUmS1sQzRSWpEQa6JDXCQJekRh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M0C8FTlbVvVX1CHAE2DvUZi/wger5FHBhkmd3XKskaQWpqpUbJK8GdlfVm/rbrwNeXlXXDbT5GHBDVf19f/sTwPVVtTh0X/v
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 432x288 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPTklEQVR4nO3dbYylZ13H8e/PXYpSlPKwENhd3TVZKPWBp7FURa0istsaVxNebJEHG8imhioaE7uEqDG+qUENEAqbTV0LatgX0MBKV6rBB2IMuFOF0m1ZGFvsDlvtVBQVEsvC3xfnbDmezsy5Z/bMzjnX+X6SyZz7uq8553/NnPOba677vs+kqpAkTb9v2ewCJEnjYaBLUiMMdElqhIEuSY0w0CWpEQa6JDViZKAnOZrk4ST3rLA/Sd6ZZCHJ3UlePP4yJUmjdJmh3wbsXWX/PmBP/+Mg8J4LL0uStFYjA72qPg58aZUu+4H3Vc8ngMuSPHtcBUqSutk6hvvYDpwZ2F7stz003DHJQXqzeC699NKXXH755WN4eGm6feaLX37s9vdtf8omVqJpcNdddz1SVduW2zeOQM8ybcu+n0BVHQGOAMzNzdX8/PwYHl6abrsO3fHY7fmbr93ESjQNkvzLSvvGcZbLIrBzYHsHcHYM9ytJWoNxBPpx4HX9s12uAr5cVY9bbpEkbayRSy5J3g9cDTwjySLwW8ATAKrqMHACuAZYAL4KXL9RxUqSVjYy0KvquhH7C3jT2CqSJK2LV4pKUiMMdElqhIEuSY0w0CWpEQa6JDXCQJekRhjoktQIA12SGmGgS1IjDHRJaoSBLkmNMNAlqREGuiQ1wkCXpEYY6JLUCANdkhphoEtSIwx0SWqEgS5JjTDQJakRBrokNcJAl6RGGOiS1AgDXZIaYaBL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JJ0WnZ7lciYbDPbTt1y1gjORpJXV9Bm6JK0layboXn6R1Lo1E3RJal1zQfdMXNJa1VzQJWmtMuiS1Ig1GXQvy0hq0ZoMuiS1yKBLUiPWfNC9/CKpFWs+6JLUCoMuSY0w6JLUCIMuSY0w6JLUCIMuSY0w6JLUCIM+YKHnpPtcdUmrgUGXpEYYdElqhEFfQJfLLF6KkXQmMeiS1AiDLkmNWL/SE2jFiUsvT99y1Sldhnn6lqsmNSVJa4xBX6LBcC/n7S/nfUhqk0E/gy10pt819Kfy4LPU713uB7ozxVpZ53LzxGV5GPRVaPiHYdTlnuEfkqWO6fK9xk06sxj0NW45orzU3yEM3neX713sgeVUvh61hlN94DqV/xYL3dbpfgD1gXv1MOhacWfKc/lP5TLTpNbQ9TLbcjygnewD3alayQfxk/161PyWup7l0CnoSbYBHwXWAbdX1S1Dx9M/fiXwDeD9VfVPE56rJJ2RzpSTkrHPQ0+yDrgV2A5sBa5OsnVo2HZgS/9jF/DxCc9TkjRGlxcWXQLMVtWTVXUM2A/sGBqzA/h09TwAnJvkDROeqyRpEamqxQck7wK2VdV1/e33Au+sqhsHxtwN3FJV/9Dfvg+4uapmhm5rF70zeIALgcOnOP/zgedP8TZWG9e8NrjmteFk1vwDVTU16kCXa+gZsW/4UaDLGKpqL7C3w312kmSmqqYndXurgWteG1zz2jDpNXe55DIHbBrY3ggcPYkxkqRl1CXoDwJbkmxOchawEzgwNOYAcE16LgW+XlXPTniukqRFjL3kUlXHk9wI3EvvaYv7qupQkuv7x/cAB+k9ZXGW3tMWr12+KX+HiV2+WUVc89rgmteGia557C9FJUmrg++HLkmNMOiS1IhVGfQ
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 432x288 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly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6B8Zd0npg0CWpEQb9DHjmLulsYtB7YtwlrbV1/1ouZ7uVvNaMJK2EQV+mLi/stdwzdaMvqQ8G/XnUJdyLjfFVJc8O/jfV2cygr5EuZ/GLjRmP+2hkFgvOcn6yMFZabf5UujoM+ga03DuAlX48frvL/UfcdfyZ3Il1uU3v6FaXce+PQdeq6vJTxnJvZyU/iSz3Tmk5cxq/E1sNZ3LHuhp31qu15sVus6+59vU9X2h+k8YsNr5PnYKeZBfwfmATcHtV3TJ2PMPjVwHfAN5RVf/U81wlrZA/ZUx2JtE/Wx6yPPFx6Ek2AbcCu4GdwDVJdo4N2w3sGL7tAz7Y8zwlSRN0eWLRpcBsVZ2oqqeBw8CesTF7gI/WwL3A+Ule2fNcJUlLSFUtPSB5M7Crqt413H4b8KaqunFkzKeAW6rqH4bbnwVurqqZsdvax+AMHuAi4PgZzv9lwJNneBvrjWveGFzzxrCSNf9AVU0tdKDLNfQssG/8XqDLGKrqIHCww9fsJMlMVU33dXvrgWveGFzzxtD3mrtccpkDto1sbwVOrWCMJGkVdQn6fcCOJNuTnAPsBY6MjTkCXJuBy4CvVdXjPc9VkrSEiZdcqup0khuBuxk8bPFQVR1Lcv3w+AHgKIOHLM4yeNjidas35Wfp7fLNOuKaNwbXvDH0uuaJvxSVJK0Pvh66JDXCoEtSI9Zl0JPsSnI8yWyS/Ws9n9WQZFu
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 432x288 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAObElEQVR4nO3df6zdd13H8efLlqEb4vhxIdBWV5OyUQ3jx7XM39OptJuxmvBHh/xaWJolVNGYuBKixvAPJmrAsK1pRhmooX/AAnVU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F3SajDoq2S5Z+7+Rx4Xh+X+C026kAz6RabL2f143BeLzHL3SxeKJygrw6A35nzi3vfj87Xcn1N0nd/5POdiY1bCxR69lZ7fxb7+i5FB10VrqctS5xPTvqLfZa5djH6/pZ5nJf/yPZfHC83tXHT92vP5S/Zc17PaJyvL1SnoSXYC7wM2AHdW1XvGjmd4/Hrg68Bbq+qfep6r1CR/iH5++voXVAuXIie+Dj3JBuA2YBewHbgxyfaxYbuAbcOPvcAdPc9TkjRBlzcW7QBmq+qRqnoaOAzsHhuzG/hwDXwWuDzJS3qeqyRpCamqpQckrwd2VtXNw+03Aa+tqn0jY+4B3lNV/zDc/jRwa1XNjD3XXgZn8ABXAifPc/4vBJ48z+dYa1zz+uCa14dzWfMPVNXUQge6XEPPAvvG/xboMoaqOggc7PA9O0kyU1XTfT3fWuCa1wfXvD70veYul1zmgC0j25uB0+cwRpK0groE/RiwLcnWJJcAe4AjY2OOAG/OwDXA16rq8Z7nKklawsRLLlV1Jsk+4F4GL1s8VFUnktwyPH4AOMrgJYuzDF62eNPKTfnb9Hb5Zg1xzeuDa14fel3zxB+KSpLWBu+HLkmNMOiS1Ig1GfQkO5OcTDKbZP9qz2clJNmS5G+TPJT
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"text/plain": "<Figure size 432x288 with 1 Axes>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAOWklEQVR4nO3db4xld13H8ffHXYq2iAU6ENhd7ZoslNVQKGOp/6tV2W2NqwkPtsgfG5pNk1arMbFLiBrDE0zUIKGw2dSloKb7ABpYYaUa/EMMATtVLN2WLWOL3WGrnVpFUxLLwtcH95RcLnfmntm90+H+5v1KJnPPOb+58/t1dt/37Llzb1NVSJJm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875zqnzcKgayb0jcS0HqBWGt9nfuthrQ+m67G2s3ngntaYtc5pvW+fq/V6UOr1Wy5J9iQ5mWQxycExx5PkXd3xe5NcNv2pSpJWMzHoSbYAtwJ7gd3AtUl2jwzbC+zqPg4A753yPCVJE/Q5Q78cWKyqh6rqKeAosG9kzD7gAzXwaeDCJC+e8lwlSatIVa0+IHkdsKeqru+23wi8pqpuGhrzUeAdVfUP3fYngFuqamHkvg4wOIMHeBlw8hznfxHw+Dnex6xxzZuDa94czmbN31dVc+MO9HlSNGP2jT4K9BlDVR0GDvf4nr0kWaiq+Wnd3yxwzZuDa94cpr3mPpdcloAdQ9vbgdNnMUaStI76BP1uYFeSnUnOA/YDx0bGHAPe1P22yxXAl6vq0SnPVZK0iomXXKrqTJKbgLuALcCRqjqR5Ibu+CHgOHA1sAh8Bbhu/ab8TaZ2+WaGuObNwTVvDlNd88QnRSVJs8G3z5WkRhh0SWrETAZ90lsRtCDJjiR/m+SBJCeS3Nztf36Sv07yhe7
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"for audio in audio_dirs:\n",
" with AudioFile(audio, start=0, duration=4) as reader:\n",
" for sample in reader:\n",
" sample.plot_spectrum(low_freq=cutoff_frequencies[0],\n",
" high_freq=cutoff_frequencies[1])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "markdown",
"source": [
"Save the spectrum information and labels of the samples to a\n",
"different compressed file for each audio file."
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing audio sample /home/blacklight/projects/baby-monitor/data/audio/2020-10-25_16-36-00\n",
"Processing audio sample /home/blacklight/projects/baby-monitor/data/audio/2020-10-24_19-53-00\n",
"Processing audio sample /home/blacklight/projects/baby-monitor/data/audio/2020-10-24_17-25-00\n"
]
}
],
"source": [
"for audio in audio_dirs:\n",
" dataset_file = os.path.join(datasets_dir, os.path.basename(audio.path) + '.npz')\n",
" print(f'Processing audio sample {audio.path}')\n",
"\n",
" with AudioFile(audio) as reader, \\\n",
" DatasetWriter(dataset_file,\n",
" low_freq=cutoff_frequencies[0],\n",
" high_freq=cutoff_frequencies[1]) as writer:\n",
" for sample in reader:\n",
" writer += sample"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}