56 lines
1.2 KiB
Plaintext
56 lines
1.2 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Explore signature captures\n",
|
|
"\n",
|
|
"Set `DATA_DIR` to a folder of common-format CSV signatures. Raw dataset formats may need a column mapping in `sigverify.io.loaders` first."
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from pathlib import Path\n",
|
|
"import matplotlib.pyplot as plt\n",
|
|
"from sigverify.io.loaders import load_csv_directory\n",
|
|
"\n",
|
|
"DATA_DIR = Path('../data/raw/mobisig')\n",
|
|
"signatures = load_csv_directory(DATA_DIR)\n",
|
|
"len(signatures)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"for signature in signatures[:6]:\n",
|
|
" plt.plot(signature.x, signature.y, label=f'{signature.user_id} ({signature.label})')\n",
|
|
"plt.gca().invert_yaxis()\n",
|
|
"plt.axis('equal')\n",
|
|
"plt.legend()\n",
|
|
"plt.show()"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"name": "python",
|
|
"version": "3.10"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|