Skip to content

Commit

Permalink
prevent future warnings seaborn, recreate frames object
Browse files Browse the repository at this point in the history
  • Loading branch information
gbeckers committed Sep 13, 2023
1 parent 7e878e2 commit 5e5b703
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions notebooks/4_parameterselection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,21 @@
"from birdwatcher.plotting import imshow_frame # birdwatcher has vizualization tools\n",
"\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline"
"%matplotlib inline\n",
"\n",
"import warnings\n",
"# Suppress FutureWarning messages, seaborn generates very many when creating plots based on pandas\n",
"warnings.simplefilter(action='ignore', category=FutureWarning)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "001e134f",
"metadata": {},
"outputs": [],
"source": [
"bw.__version__"
]
},
{
Expand Down Expand Up @@ -459,7 +473,9 @@
"cell_type": "code",
"execution_count": null,
"id": "bb2dcde0-156b-4588-86bd-d12a90b40397",
"metadata": {},
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"rows = 'blur'\n",
Expand Down Expand Up @@ -488,7 +504,9 @@
"cell_type": "code",
"execution_count": null,
"id": "53698f3d-70e7-4739-9937-3fbc2d77c6e5",
"metadata": {},
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"params.batch_plot_parameters(default_values)"
Expand Down Expand Up @@ -621,6 +639,7 @@
"outputs": [],
"source": [
"# or, save as video with circles superimposed\n",
"frames, colorspecs = params.draw_multiple_circles(settings)\n",
"vfs_circles = frames.tovideo(f'{params.path}/multicircles.mp4', framerate=params.vfs.avgframerate)"
]
},
Expand Down Expand Up @@ -650,14 +669,6 @@
"source": [
"Also, repeat these steps with a second short representative videofragment to make sure the same parameter-value combinations provide the best results. After that, you could use these settings to run movement detection on all your videos. For this, have a look at the next notebook!"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ae23c7d4-6284-4d92-bbfe-84523146f707",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 5e5b703

Please sign in to comment.