updated packages, reformatting bits of the notebooks

This commit is contained in:
aj 2021-01-01 22:05:49 +00:00
parent 6ad5fab2a0
commit c7292cc00a
7 changed files with 323 additions and 297 deletions

View File

@ -1,3 +1,6 @@
computer vision testing computer vision
================== ==================
Jupyter scratchpad for playing with computer vision
(Using [MSRCv2 Set](https://www.microsoft.com/en-us/research/project/image-understanding/))

View File

@ -1,32 +0,0 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h2><center>average RGB</center></h2>"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"<h3><center>arrays</center></h3>" "# arrays"
] ]
}, },
{ {
@ -115,7 +115,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"<h3><center>inserting</center></h3>" "# inserting"
] ]
}, },
{ {
@ -537,4 +537,4 @@
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 4 "nbformat_minor": 4
} }

File diff suppressed because one or more lines are too long

View File

@ -1,55 +1,78 @@
attrs==19.3.0 anyio==2.0.2
backcall==0.1.0 argon2-cffi==20.1.0
bleach==3.1.4 async-generator==1.10
attrs==20.3.0
Babel==2.9.0
backcall==0.2.0
bleach==3.2.1
certifi==2020.12.5
cffi==1.14.4
chardet==4.0.0
colorama==0.4.4
cycler==0.10.0 cycler==0.10.0
decorator==4.4.1 decorator==4.4.2
defusedxml==0.6.0 defusedxml==0.6.0
entrypoints==0.3 entrypoints==0.3
importlib-metadata==1.2.0 idna==2.10
ipykernel==5.1.3 importlib-metadata==3.3.0
ipython==7.10.1 ipykernel==5.4.2
ipython==7.19.0
ipython-genutils==0.2.0 ipython-genutils==0.2.0
jedi==0.15.1 jedi==0.18.0
Jinja2==2.10.3 Jinja2==2.11.2
joblib==0.14.0 joblib==1.0.0
json5==0.8.5 json5==0.9.5
jsonschema==3.2.0 jsonschema==3.2.0
jupyter-client==5.3.4 jupyter-client==6.1.7
jupyter-core==4.6.1 jupyter-core==4.7.0
jupyterlab==1.2.3 jupyter-server==1.1.3
jupyterlab-server==1.0.6 jupyterlab==3.0.0
kiwisolver==1.1.0 jupyterlab-pygments==0.1.2
jupyterlab-server==2.0.0
kiwisolver==1.3.1
MarkupSafe==1.1.1 MarkupSafe==1.1.1
matplotlib==3.1.2 matplotlib==3.3.3
mistune==0.8.4 mistune==0.8.4
more-itertools==8.0.2 more-itertools==8.6.0
nbconvert==5.6.1 nbclassic==0.2.5
nbformat==4.4.0 nbclient==0.5.1
notebook==6.1.5 nbconvert==6.0.7
numpy==1.17.4 nbformat==5.0.8
opencv-python==4.1.2.30 nest-asyncio==1.4.3
pandas==0.25.3 notebook==6.1.6
pandocfilters==1.4.2 numpy==1.19.4
parso==0.5.1 opencv-python==4.4.0.46
pexpect==4.7.0 packaging==20.8
pandas==1.2.0
pandocfilters==1.4.3
parso==0.8.1
pexpect==4.8.0
pickleshare==0.7.5 pickleshare==0.7.5
prometheus-client==0.7.1 Pillow==8.0.1
prompt-toolkit==3.0.2 prometheus-client==0.9.0
ptyprocess==0.6.0 prompt-toolkit==3.0.8
Pygments==2.5.2 ptyprocess==0.7.0
pyparsing==2.4.5 pycparser==2.20
pyrsistent==0.15.6 Pygments==2.7.3
pyparsing==2.4.7
pyrsistent==0.17.3
python-dateutil==2.8.1 python-dateutil==2.8.1
pytz==2019.3 pytz==2020.5
pyzmq==18.1.1 pywin32==300
scikit-learn==0.22 pywinpty==0.5.7
scipy==1.3.3 pyzmq==20.0.0
requests==2.25.1
scikit-learn==0.24.0
scipy==1.6.0
Send2Trash==1.5.0 Send2Trash==1.5.0
six==1.13.0 six==1.15.0
terminado==0.8.3 sniffio==1.2.0
terminado==0.9.1
testpath==0.4.4 testpath==0.4.4
tornado==6.0.3 threadpoolctl==2.1.0
traitlets==4.3.3 tornado==6.1
wcwidth==0.1.7 traitlets==5.0.5
urllib3==1.26.2
wcwidth==0.2.5
webencodings==0.5.1 webencodings==0.5.1
zipp==0.6.0 zipp==3.4.0

View File

@ -1,10 +1,26 @@
{ {
"cells": [ "cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import cv2\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"\n",
"import vision.io\n",
"from vision.visualsearch import run_query\n",
"from vision.descriptor.avg_RGB import extract_average_rgb\n",
"import vision.descriptor.spatial as spatial"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"### vision" "# vision"
] ]
}, },
{ {
@ -36,12 +52,6 @@
} }
], ],
"source": [ "source": [
"from matplotlib import pyplot as plt\n",
"\n",
"import vision.io\n",
"from vision.descriptor.avg_RGB import extract_average_rgb\n",
"from vision.visualsearch import run_query\n",
"\n",
"x = vision.io.load_msrc('msrc/Images')\n", "x = vision.io.load_msrc('msrc/Images')\n",
"extract_average_rgb(images=x)\n", "extract_average_rgb(images=x)\n",
"results = run_query(x)\n", "results = run_query(x)\n",
@ -104,12 +114,6 @@
} }
], ],
"source": [ "source": [
"import cv2\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"\n",
"import vision.descriptor.spatial as spatial\n",
"\n",
"img = cv2.imread('sheep.png')[:,:,::-1]\n", "img = cv2.imread('sheep.png')[:,:,::-1]\n",
"\n", "\n",
"segments = spatial.grid_image(2, 2, img)\n", "segments = spatial.grid_image(2, 2, img)\n",
@ -123,12 +127,6 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"import cv2\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"\n",
"import vision.descriptor.spatial as spatial\n",
"\n",
"img = cv2.imread('sheep.png')[:,:,::-1]\n", "img = cv2.imread('sheep.png')[:,:,::-1]\n",
"\n", "\n",
"segments = spatial.extract_spatial_average_rgb(2, 2, img)" "segments = spatial.extract_spatial_average_rgb(2, 2, img)"
@ -156,4 +154,4 @@
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 4 "nbformat_minor": 4
} }