Name | neuralfilter JSON |
Version |
0.1.9
JSON |
| download |
home_page | |
Summary | neural attention filter |
upload_time | 2023-01-29 05:17:14 |
maintainer | |
docs_url | None |
author | YeongHyeon Park |
requires_python | >=3 |
license | |
keywords |
neural-filter
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Neural Filter
=====
## Functions
#### neuralfilter.generate(x, force=False)
- <strong>x</strong>: Array with resolution $(H, W, C)$
The dimension $C$ is recommended as 1.
- <strong>force</strong>: If you want to force this operation when the dimension $C$ is higher than 1, set 'force' as True.
#### neuralfilter.batch_generate(x, force=False)
- The batch processing mode of '<a href='https://github.com/YeongHyeon/NeuralFilter#neuralfiltergeneratex-forcefalse'>generate</a>'.
- <strong>x</strong>: Array with resolution $(N, H, W, C)$
The dimension $C$ is recommended as 1.
- <strong>force</strong>: If you want to force this operation when the dimension $C$ is higher than 1, set 'force' as True.
batch_generate(x, force=False)
## Usage
``` python
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import neuralfilter
(x_tr, y_tr), (x_te, y_te) = tf.keras.datasets.mnist.load_data()
idx = 1
a = neuralfilter.generate(np.expand_dims(x_tr[idx], axis=-1))
plt.figure(figsize=(9, 3), dpi=100)
plt.subplot(1, 3, 1)
plt.imshow(x_tr[idx], cmap='gray')
plt.xticks([], [])
plt.yticks([], [])
plt.subplot(1, 3, 2)
plt.imshow(a, cmap='jet')
plt.xticks([], [])
plt.yticks([], [])
plt.subplot(1, 3, 3)
plt.imshow(x_tr[idx], cmap='gray')
plt.imshow(a, cmap='jet', alpha=0.5)
plt.xticks([], [])
plt.yticks([], [])
plt.tight_layout()
plt.savefig('sample.png')
plt.show()
```
<img src="https://github.com/YeongHyeon/NeuralFilter/blob/main/figures/sample.png" width="500">
Raw data
{
"_id": null,
"home_page": "",
"name": "neuralfilter",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "neural-filter",
"author": "YeongHyeon Park",
"author_email": "young200405@gmail.com",
"download_url": "",
"platform": null,
"description": "Neural Filter\n=====\n\n## Functions\n#### neuralfilter.generate(x, force=False)\n- <strong>x</strong>: Array with resolution $(H, W, C)$ \nThe dimension $C$ is recommended as 1. \n- <strong>force</strong>: If you want to force this operation when the dimension $C$ is higher than 1, set 'force' as True. \n\n#### neuralfilter.batch_generate(x, force=False)\n- The batch processing mode of '<a href='https://github.com/YeongHyeon/NeuralFilter#neuralfiltergeneratex-forcefalse'>generate</a>'. \n- <strong>x</strong>: Array with resolution $(N, H, W, C)$ \nThe dimension $C$ is recommended as 1. \n- <strong>force</strong>: If you want to force this operation when the dimension $C$ is higher than 1, set 'force' as True. \n\nbatch_generate(x, force=False)\n\n\n\n## Usage\n``` python\nimport numpy as np\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nimport neuralfilter\n\n(x_tr, y_tr), (x_te, y_te) = tf.keras.datasets.mnist.load_data()\n\nidx = 1\na = neuralfilter.generate(np.expand_dims(x_tr[idx], axis=-1))\n\nplt.figure(figsize=(9, 3), dpi=100)\nplt.subplot(1, 3, 1)\nplt.imshow(x_tr[idx], cmap='gray')\nplt.xticks([], [])\nplt.yticks([], [])\n\nplt.subplot(1, 3, 2)\nplt.imshow(a, cmap='jet')\nplt.xticks([], [])\nplt.yticks([], [])\n\nplt.subplot(1, 3, 3)\nplt.imshow(x_tr[idx], cmap='gray')\nplt.imshow(a, cmap='jet', alpha=0.5)\nplt.xticks([], [])\nplt.yticks([], [])\n\nplt.tight_layout()\nplt.savefig('sample.png')\nplt.show()\n```\n\n<img src=\"https://github.com/YeongHyeon/NeuralFilter/blob/main/figures/sample.png\" width=\"500\">\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "neural attention filter",
"version": "0.1.9",
"split_keywords": [
"neural-filter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3b6c9ce607d0e0d4fa7c7977527d572192c2c47798ef75a4f0bd94bdbf7c0f4e",
"md5": "d1ce3d718719e53fac35eb70cb1cb5a8",
"sha256": "1c2a1b58959ec6944024bafb633382032001a69b0455aefc8ab30022267741ae"
},
"downloads": -1,
"filename": "neuralfilter-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d1ce3d718719e53fac35eb70cb1cb5a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 3716,
"upload_time": "2023-01-29T05:17:14",
"upload_time_iso_8601": "2023-01-29T05:17:14.733549Z",
"url": "https://files.pythonhosted.org/packages/3b/6c/9ce607d0e0d4fa7c7977527d572192c2c47798ef75a4f0bd94bdbf7c0f4e/neuralfilter-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-29 05:17:14",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "neuralfilter"
}