924 lines
525 KiB
Text
924 lines
525 KiB
Text
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"deletable": true,
|
||
|
"editable": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"#%quickref\n",
|
||
|
"%qtconsole"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"deletable": true,
|
||
|
"editable": true
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Scan for files in /home/ruben/Documents/Projecten/2017/ALLES WAT IK VOEL/testimages\n",
|
||
|
"Found 14 files\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# Load the files for scanning\n",
|
||
|
"from matplotlib.pyplot import imshow\n",
|
||
|
"import glob, os\n",
|
||
|
"\n",
|
||
|
"target_path = os.path.join(os.getcwd(), \"testimages\")\n",
|
||
|
"\n",
|
||
|
"print (\"Scan for files in {}\".format(target_path));\n",
|
||
|
"\n",
|
||
|
"files = glob.glob(os.path.join(target_path, '*.jpg'));\n",
|
||
|
"print (\"Found {} files\".format(len(files)))\n",
|
||
|
"\n",
|
||
|
"# .. for now we assume all are images"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 4,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"deletable": true,
|
||
|
"editable": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"# load as PIL Images\n",
|
||
|
"from PIL import Image\n",
|
||
|
"images = [Image.open(file) for file in files]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"deletable": true,
|
||
|
"editable": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import numpy as np\n",
|
||
|
"\n",
|
||
|
"arrays = [np.array(image) for image in images]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"deletable": true,
|
||
|
"editable": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"def getChannelImagesFromImage(arrImg):\n",
|
||
|
" \"\"\"\n",
|
||
|
" [(255,255,255)] => ( [(255,0,0)], [(0,255,0)], [(0,0,255)] )\n",
|
||
|
" Three separate images that show individual channels\n",
|
||
|
" \"\"\"\n",
|
||
|
" red = arrImg.copy()\n",
|
||
|
" red[:,:,1] = 0\n",
|
||
|
" red[:,:,2] = 0\n",
|
||
|
"\n",
|
||
|
" green = arrImg.copy()\n",
|
||
|
" green[:,:,0] = 0\n",
|
||
|
" green[:,:,2] = 0\n",
|
||
|
"\n",
|
||
|
" blue = arrImg.copy()\n",
|
||
|
" blue[:,:,0] = 0\n",
|
||
|
" blue[:,:,1] = 0\n",
|
||
|
" return (red, green, blue)\n",
|
||
|
"\n",
|
||
|
"# (red,green,blue) = getChannelImagesFromImage(arrays[0])\n",
|
||
|
"# print (red)\n",
|
||
|
"# images[0].show()\n",
|
||
|
"# Image.fromarray(red).show()\n",
|
||
|
"# Image.fromarray(green).show()\n",
|
||
|
"# Image.fromarray(blue).show()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 16,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"deletable": true,
|
||
|
"editable": true
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.image.AxesImage at 0x7f0d928f2828>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count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98iSiLPuU1jMoa/Bd652n\n6lf4fJr1wiCWz/HfvGsfP3J3k2AjlJYoJamqOr3zHufrMY9khJQgUDX1U/maChJ+c46UckCQtUYa\nrEPLCFkzBMO5FDapig2lwlpLHMeUZYGKI6qg8NLjbJ9eNMrHn3OsL17Er6+xuxXTyQRBKc6Wlmx0\nlNv3TdPONbIpGYlgVw5TTSCpte0sgUG//nxhHR6/CIvdHmvzyywuzLE6N8fitatEWjMzM8XevTPs\nnRpj/0TK7Ihjx0gDMoFMUwIwsBC8QgWLoFbHjQxooUBUaCpsCIiQgLdIYYb9JDbbXWPAdQpyY51t\nXctfD/24Vf7Wox2GFfle4FeorY3fDiH8i78u/X33HQ9/+aWv3KD5bW34BpBsNcU3nm0A0IY2uAHK\ncKOpvZWC2FLPGzTrjWdbO/dmDXIj7UaaN6I8btbAt9Zno45a6zekN7a2bSOPre3amv/N72/dXLbm\nd3N9UIJgDQqFcwqLRsYQaah6K0RpC28tOIcPEqIUr0A4QzADYuFRcZNuWSHznDUF/9fHX+QTz15m\nbO9B3rZvnHs6gXceG6VZgpOgW3B2Hn73L17h0SvLmM4EZiCQ/WW+/94ZPnDnLg4pSNU6VkiEARsn\nRNYhdEDIGBsENGC+Cx/53S/z+GKFbk8SehZvILh1gvfk7Yz3vOs4u3eCNjA/t8par8cLZ1ZwxtDK\nE6ZHG7QTzy2zE4xqz217W3QCJAJsCaMJkNQUsHc1ECwJWBrA8jXHuasXeGluwKlFy7Vr12i3xoi0\nppmnjI/mjI00caZitJERaYntXeMDx/cyEUPpIAq1ohUCOA299YooihEakPWmImOoHJDC2VV49ULF\nr/3Z44zGgS/95DvwlQH
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f0d929ad198>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"def getImageAsHSV(image):\n",
|
||
|
" hsv = np.array(image.convert('HSV'))\n",
|
||
|
"\n",
|
||
|
"# If you want to get individual channels use\n",
|
||
|
"# hue = hsv[:,:,0]\n",
|
||
|
"# sat = hsv[:,:,1]\n",
|
||
|
"# val = hsv[:,:,2]\n",
|
||
|
"\n",
|
||
|
"# hue = hsv.copy()\n",
|
||
|
"# hsv[:,:,0] = 255 #all hue to 100%\n",
|
||
|
"# hsv[:,:,1] = 255 #all saturation to 100%\n",
|
||
|
"# hsv[:,:,2] = 255 #all brightness to 100%\n",
|
||
|
" return hsv\n",
|
||
|
"\n",
|
||
|
"# hue_img = Image.fromarray(getImageAsHSV(images[4]), mode=\"HSV\")\n",
|
||
|
"\n",
|
||
|
"# %matplotlib inline\n",
|
||
|
"# imshow(np.asarray(hue_img.convert('RGB')))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"deletable": true,
|
||
|
"editable": true
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"452 640 3\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.image.AxesImage at 0x7f0d872a0e10>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 10,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAMUAAAD8CAYAAADHTWCVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsvHeUXmW59//ZfT99+mSSSSWVUEMnCSXUgEhVVARBFDzK\nEURFUUQB4RWwIWA/FlCQA1ioofceSEhIr5OZybRnnnnq7ntfvz8G0OPP97z8cVxH1sp3rb2e5977\n2td9te++d70VEWEXdmEX/gr1f9uAXdiFfzXsIsUu7MLfYR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Kg1H0AqKtJy8KfAzBE9fgmOG2DMOJpw6+OEmcm0\nLrmc4sNfpe3obxBueQxj9w+x/fnbaGluJtj4INmkhL30Fjw1j60LcRRSuv/zWJMW4O18k45UwEhq\nD9yRLXTvcQRDa55AkZAJp95KtOlBUFWCDQ+i+8MkJ/8Je+gFhktVOuYfhZKd+P4hxf77LZCXL82i\nf/D3nHbaaXzvs0voZitDfhatbR7p0usUlnyD6LlvMZI7gHxlBbXs7nQeeSljD1+GVtmISUCj7WDS\npddJn3kf1PsJrQ6qT11NpNh0HnQ2Qy/9is6jL2fn/V9FM1N07nU8I+ufpXXmIfS/uYxO7y38OZ/A\n2v003KevJHPAZ+h77V464m2MuQqZyfvRtONuwiNvwXvxBnJxkfCEO4i3LKPasxyCGh37nAx+hZIj\n+INv0a6NEuRnYzRNwZh2OEOv34tSWo9NnXIjon3OIqJVv0VtncMYbVDZRtdex1Er9pG4ZVoO+iRS\nmI4S1gkeuoAo8EgdfxP
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f0d92b11f60>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# sorting pixels by hue\n",
|
||
|
"# http://stackoverflow.com/a/2828121\n",
|
||
|
"# Sort by column: a[a[:,1].argsort()]\n",
|
||
|
"hsv = np.array(images[4].convert('HSV'))\n",
|
||
|
"print (len(hsv), len(hsv[0]), len(hsv[0,0]))\n",
|
||
|
"height = len(hsv)\n",
|
||
|
"singleLine = np.concatenate(hsv)\n",
|
||
|
"sortedLine = np.array(sorted(singleLine, key=lambda pixel: pixel[0])) # change pixel[0] to 1 or 2 for saturation & brightness\n",
|
||
|
"sortedImage = sortedLine.reshape(int(len(sortedLine)/height), height, 3)\n",
|
||
|
"\n",
|
||
|
"sortedImg = Image.fromarray(sortedImage, mode=\"HSV\")\n",
|
||
|
"\n",
|
||
|
"sortedImg.show()\n",
|
||
|
"\n",
|
||
|
"%matplotlib inline\n",
|
||
|
"imshow(np.asarray(sortedImg.convert('RGB')))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 63,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Total 289280\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"[<matplotlib.lines.Line2D at 0x7f0d7df97a58>]"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 63,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXmYHNV57n9fr7OPlhktaEECCbBYDWKxcRww2CCIUUhw\nDE5snDjBN9dcx9f2TbCTEEKcxc6NSbC5iXHAJtgYMLZBNiKYzWwGIYHQvo320Uij0Wj2md6qzv2j\nqnp6erqnW7NUa6a/3/PoUXd1dfep6eq333rPd84RYwyKoihKeRAodQMURVEU/1DRVxRFKSNU9BVF\nUcoIFX1FUZQyQkVfURSljFDRVxRFKSNU9BVFUcoIFX1FUZQyQkVfURSljAiVugHZNDQ0mEWLFpW6\nGYqiKJOKt99++5gxprHQfied6C9atIh169aVuhmKoiiTChHZX8x+Gu8oiqKUESr6iqIoZURRoi8i\n14rIDhFpEpE7cjz+QRF5R0RSInJT1mO3isgu99+t49VwRVEU5cQpKPoiEgTuA1YAy4BbRGRZ1m4H\ngE8Dj2Q9dwbwN8ClwCXA34jI9LE3W1EURRkNxTj9S4AmY8weY0wCeBRYmbmDMWafMWYjYGc99xrg\nOWPMcWNMB/AccO04tFtRFEUZBcWI/jz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QGUkCGitvjLx\nqOj7jGV5mX6AkI7ILXsSlk0kU/Q111cmGBV9nxlSp68lm2VPPGkTCQaoDKvoK/6gou8zmSNyg4GA\nrpxV5iQsm2g4Q/Q13lEmGBV9n8l2+kmt0y9rEinX6Wumr/iEir7PeM4+HHQyfWNQt1/GxFM2kVBQ\n4x3FN1T0fcZz+gFxyjY
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7f0d84099f28>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"hues = np.zeros(255)\n",
|
||
|
"\n",
|
||
|
"# Get the spread of hue in an image\n",
|
||
|
"# for image in images:\n",
|
||
|
"image = images[4]\n",
|
||
|
"hsv = np.array(image.convert('HSV'))\n",
|
||
|
"hue = hsv[:,:,0]\n",
|
||
|
"print(\"Total %s\" % len(hue.flatten()))\n",
|
||
|
"values, boxes = scipy.histogram(hue, 255, range=(0,255), density=True)\n",
|
||
|
"# print(values)\n",
|
||
|
"\n",
|
||
|
"from pylab import *\n",
|
||
|
"plot(values)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 137,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import struct\n",
|
||
|
"import scipy\n",
|
||
|
"import scipy.misc\n",
|
||
|
"import scipy.cluster\n",
|
||
|
"import codecs\n",
|
||
|
"from IPython.display import Markdown, display, HTML\n",
|
||
|
"\n",
|
||
|
"NUM_CLUSTERS = 64\n",
|
||
|
"\n",
|
||
|
"def getColourAsHex(colour):\n",
|
||
|
" return '#' + ''.join(format(c, '02x') for c in colour.astype(int))\n",
|
||
|
"\n",
|
||
|
"def getColoursForImageByClusters(image):\n",
|
||
|
" \"\"\"\n",
|
||
|
" Adapted on answers by\n",
|
||
|
" Peter Hansen (http://stackoverflow.com/a/3244061)\n",
|
||
|
" & Johan Mickos (http://stackoverflow.com/a/34140327)\n",
|
||
|
" \"\"\"\n",
|
||
|
" im = image.copy().resize((150, 150)) # optional, to reduce time\n",
|
||
|
" ar = scipy.misc.fromimage(im)\n",
|
||
|
" shape = ar.shape\n",
|
||
|
" ar = ar.reshape(scipy.product(shape[:2]), shape[2])\n",
|
||
|
"\n",
|
||
|
"# print( 'finding clusters')\n",
|
||
|
" codes, dist = scipy.cluster.vq.kmeans(ar.astype(float), NUM_CLUSTERS)\n",
|
||
|
"# print ('cluster centres:\\n', codes)\n",
|
||
|
" \n",
|
||
|
" vecs, dist = scipy.cluster.vq.vq(ar, codes) # assign codes\n",
|
||
|
" counts, bins = scipy.histogram(vecs, len(codes)) # count occurrences\n",
|
||
|
" \n",
|
||
|
"# When only looking for single color: \n",
|
||
|
"# index_max = scipy.argmax(counts) # find most frequent\n",
|
||
|
"# peak = codes[index_max]\n",
|
||
|
"# colour = ''.join(chr(c) for c in peak).encode('hex')\n",
|
||
|
"# print( 'most frequent is %s (#%s)' % (peak, colour))\n",
|
||
|
" \n",
|
||
|
" percentages = 100 * counts / sum(counts)\n",
|
||
|
"# print(\"Percentages\", percentages)\n",
|
||
|
"# colours = [ in codes]\n",
|
||
|
"# print(colours)\n",
|
||
|
" return list(zip(codes, percentages))\n",
|
||
|
"\n",
|
||
|
"def getColoursForImageByPxAvg(image):\n",
|
||
|
" im = image.copy().resize((8, 8))\n",
|
||
|
" pixels = np.concatenate(scipy.misc.fromimage(im))\n",
|
||
|
"# colours = ['#' + ''.join(format(c, '02x') for c in color.astype(int)) for color in pixels]\n",
|
||
|
" percentages = np.zeros(len(pixels)) + (100 / len(pixels))\n",
|
||
|
" return list(zip(pixels, percentages))\n",
|
||
|
"\n",
|
||
|
"def getColoursAsHTML(colours):\n",
|
||
|
" return \" \".join(['<span style=\"background:%s\">%s - (%s %%)</span>' % (getColourAsHex(colour[0]), getColourAsHex(colour[0]), colour[1]) for colour in colours]);\n",
|
||
|
"\n",
|
||
|
"# for image in images:\n",
|
||
|
"# display(image)\n",
|
||
|
"# print(\"Method 1: clustering (%s clusters)\" % NUM_CLUSTERS)\n",
|
||
|
"# colours = getColoursForImageByClusters(image)\n",
|
||
|
"# display(HTML(getColoursAsHTML(colours)))\n",
|
||
|
" \n",
|
||
|
"# print(\"Method 2: scaling\")\n",
|
||
|
"# colours = getColoursForImageByPxAvg(image)\n",
|
||
|
"# display(HTML(getColoursAsHTML(colours)))\n",
|
||
|
" \n",
|
||
|
"# break"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 142,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Get colours for all images\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#2d3530\">#2d3530 - (1.24888888889 %)</span> <span style=\"background:#322d51\">#322d51 - (1.36888888889 %)</span> <span style=\"background:#9e9295\">#9e9295 - (0.844444444444 %)</span> <span style=\"background:#947d81\">#947d81 - (0.742222222222 %)</span> <span style=\"background:#aeb5b6\">#aeb5b6 - (1.02666666667 %)</span> <span style=\"background:#b9b281\">#b9b281 - (0.48 %)</span> <span style=\"background:#a2686c\">#a2686c - (0.817777777778 %)</span> <span style=\"background:#56688c\">#56688c - (0.342222222222 %)</span> <span style=\"background:#1a3472\">#1a3472 - (1.51111111111 %)</span> <span style=\"background:#a58111\">#a58111 - (1.36 %)</span> <span style=\"background:#a32e10\">#a32e10 - (0.924444444444 %)</span> <span style=\"background:#3c4d76\">#3c4d76 - (1.10666666667 %)</span> <span style=\"background:#b5a6aa\">#b5a6aa - (2.28444444444 %)</span> <span style=\"background:#b9b7ba\">#b9b7ba - (5.18666666667 %)</span> <span style=\"background:#120d0d\">#120d0d - (1.48888888889 %)</span> <span style=\"background:#aeadae\">#aeadae - (5.11111111111 %)</span> <span style=\"background:#b2bdd4\">#b2bdd4 - (0.435555555556 %)</span> <span style=\"background:#78443f\">#78443f - (1.13333333333 %)</span> <span style=\"background:#acacb1\">#acacb1 - (1.96 %)</span> <span style=\"background:#a08a36\">#a08a36 - (0.56 %)</span> <span style=\"background:#941624\">#941624 - (0.955555555556 %)</span> <span style=\"background:#c7c0c3\">#c7c0c3 - (0.511111111111 %)</span> <span style=\"background:#5f5b5c\">#5f5b5c - (0.773333333333 %)</span> <span style=\"background:#bbb9c1\">#bbb9c1 - (1.66666666667 %)</span> <span style=\"background:#cf7f8b\">#cf7f8b - (0.493333333333 %)</span> <span style=\"background:#c26973\">#c26973 - (0.595555555556 %)</span> <span style=\"background:#7c7273\">#7c7273 - (0.751111111111 %)</span> <span style=\"background:#b6b09c\">#b6b09c - (0.675555555556 %)</span> <span style=\"background:#834225\">#834225 - (1.04444444444 %)</span> <span style=\"background:#c2bc98\">#c2bc98 - (0.684444444444 %)</span> <span style=\"background:#b49399\">#b49399 - (1.02666666667 %)</span> <span style=\"background:#b9b9ab\">#b9b9ab - (0.906666666667 %)</span> <span style=\"background:#c5b8a9\">#c5b8a9 - (0.711111111111 %)</span> <span style=\"background:#5b2624\">#5b2624 - (0.728888888889 %)</span> <span style=\"background:#b6afac\">#b6afac - (2.29777777778 %)</span> <span style=\"background:#96aec9\">#96aec9 - (0.28 %)</span> <span style=\"background:#c3a9ad\">#c3a9ad - (1.64888888889 %)</span> <span style=\"background:#bdbab6\">#bdbab6 - (1.48444444444 %)</span> <span style=\"background:#b44f56\">#b44f56 - (0.604444444444 %)</span> <span style=\"background:#adb4c3\">#adb4c3 - (1.00444444444 %)</span> <span style=\"background:#494446\">#494446 - (1.22222222222 %)</span> <span style=\"background:#d4b0b2\">#d4b0b2 - (0.764444444444 %)</span> <span style=\"background:#ca9f89\">#ca9f89 - (0.28 %)</span> <span style=\"background:#aca16b\">#aca16b - (0.511111111111 %)</span> <span style=\"background:#a7a5a7\">#a7a5a7 - (3.60888888889 %)</span> <span style=\"background:#b0aeb1\">#b0aeb1 - (4.83111111111 %)</span> <span style=\"background:#5c8fae\">#5c8fae - (0.395555555556 %)</span> <span style=\"background:#87575b\">#87575b - (1.05777777778 %)</span> <span style=\"background:#a2323d\">#a2323d - (0.768888888889 %)</span> <span style=\"background:#b1afb4\">#b1afb4 - (3.67111111111 %)</span> <span style=\"background:#b3b2b3\">#b3b2b3 - (5.71555555556 %)</span> <span style=\"background:#dba5a0\">#dba5a0 - (0.448888888889 %)</span> <span style=\"background:#9f9250\">#9f9250 - (1.00444444444 %)</span> <span style=\"background:#251e1e\">#251e1e - (2.08444444444 %)</span> <span style=\"background:#aaa9ac\">#aaa9ac - (6.57333333333 %)</span> <span style=\"background:#c69ca2\">#c69ca2 - (0.937777777778 %)</span> <span style=\"background:#b4b2b9\">#b4b2b9 - (3.91555555556 %)</span> <span style=\"background:#b18084\">#b18084 - (0.977777777778 %)</span> <span style=\"background:#bbaeb3\">#bbaeb3 - (3.39111111
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#893676\">#893676 - (1.36888888889 %)</span> <span style=\"background:#d4a3cf\">#d4a3cf - (0.791111111111 %)</span> <span style=\"background:#b1a00a\">#b1a00a - (1.6 %)</span> <span style=\"background:#972a24\">#972a24 - (1.69777777778 %)</span> <span style=\"background:#31752f\">#31752f - (1.93333333333 %)</span> <span style=\"background:#d74e51\">#d74e51 - (1.90666666667 %)</span> <span style=\"background:#dbcc37\">#dbcc37 - (1.00444444444 %)</span> <span style=\"background:#ccbe83\">#ccbe83 - (1.04 %)</span> <span style=\"background:#61acde\">#61acde - (0.835555555556 %)</span> <span style=\"background:#96b2c4\">#96b2c4 - (2.77333333333 %)</span> <span style=\"background:#73b27a\">#73b27a - (0.564444444444 %)</span> <span style=\"background:#bc997e\">#bc997e - (1.88888888889 %)</span> <span style=\"background:#733f48\">#733f48 - (1.58666666667 %)</span> <span style=\"background:#742323\">#742323 - (1.63111111111 %)</span> <span style=\"background:#b93f6c\">#b93f6c - (1.64 %)</span> <span style=\"background:#b55d5f\">#b55d5f - (1.40888888889 %)</span> <span style=\"background:#203b38\">#203b38 - (1.21777777778 %)</span> <span style=\"background:#bccdd9\">#bccdd9 - (1.99555555556 %)</span> <span style=\"background:#dcedf5\">#dcedf5 - (2.74222222222 %)</span> <span style=\"background:#465060\">#465060 - (1.25777777778 %)</span> <span style=\"background:#267c5f\">#267c5f - (0.857777777778 %)</span> <span style=\"background:#d76a92\">#d76a92 - (1.52444444444 %)</span> <span style=\"background:#dc7331\">#dc7331 - (1.76888888889 %)</span> <span style=\"background:#abbfcc\">#abbfcc - (2.53333333333 %)</span> <span style=\"background:#3b9ee3\">#3b9ee3 - (0.955555555556 %)</span> <span style=\"background:#d84f75\">#d84f75 - (1.86222222222 %)</span> <span style=\"background:#3c6a96\">#3c6a96 - (1.17333333333 %)</span> <span style=\"background:#eff9fc\">#eff9fc - (2.23111111111 %)</span> <span style=\"background:#b44125\">#b44125 - (2.78666666667 %)</span> <span style=\"background:#c3ab2d\">#c3ab2d - (0.826666666667 %)</span> <span style=\"background:#ca83b5\">#ca83b5 - (1.14666666667 %)</span> <span style=\"background:#88722f\">#88722f - (1.30222222222 %)</span> <span style=\"background:#b76f2f\">#b76f2f - (1.46666666667 %)</span> <span style=\"background:#ddd6da\">#ddd6da - (1.17777777778 %)</span> <span style=\"background:#6fab1f\">#6fab1f - (1.05777777778 %)</span> <span style=\"background:#64245b\">#64245b - (0.96 %)</span> <span style=\"background:#b0a4ad\">#b0a4ad - (1.36444444444 %)</span> <span style=\"background:#96528b\">#96528b - (3.38666666667 %)</span> <span style=\"background:#162f5b\">#162f5b - (1.30222222222 %)</span> <span style=\"background:#758ea2\">#758ea2 - (2.11111111111 %)</span> <span style=\"background:#d13c2c\">#d13c2c - (1.42666666667 %)</span> <span style=\"background:#cde1ed\">#cde1ed - (2.49333333333 %)</span> <span style=\"background:#cf7f56\">#cf7f56 - (1.24444444444 %)</span> <span style=\"background:#c8c2b8\">#c8c2b8 - (0.844444444444 %)</span> <span style=\"background:#a8a951\">#a8a951 - (0.671111111111 %)</span> <span style=\"background:#4b283a\">#4b283a - (1.81777777778 %)</span> <span style=\"background:#657687\">#657687 - (1.40888888889 %)</span> <span style=\"background:#a03e4d\">#a03e4d - (2.04 %)</span> <span style=\"background:#937b70\">#937b70 - (1.16444444444 %)</span> <span style=\"background:#228cd5\">#228cd5 - (2.00888888889 %)</span> <span style=\"background:#558058\">#558058 - (1.16 %)</span> <span style=\"background:#4281be\">#4281be - (1.40444444444 %)</span> <span style=\"background:#1b171d\">#1b171d - (1.80888888889 %)</span> <span style=\"background:#b9d6ec\">#b9d6ec - (1.82222222222 %)</span> <span style=\"background:#154b86\">#154b86 - (1.26222222222 %)</span> <span style=\"background:#998b98\">#998b98 - (1.30666666667 %)</span> <span style=\"background:#7c5569\">#7c5569 - (1.66666666667 %)</span> <span style=\"background:#186fb3\">#186fb3 - (1.00888888889 %)</span> <span style=\"background:#8ba3b2\">#8ba3b2 - (2.30666666667 %)</span> <spa
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#cff5fe\">#cff5fe - (0.275555555556 %)</span> <span style=\"background:#fdfdfe\">#fdfdfe - (4.21333333333 %)</span> <span style=\"background:#9c9ba7\">#9c9ba7 - (0.204444444444 %)</span> <span style=\"background:#f8c7d0\">#f8c7d0 - (0.582222222222 %)</span> <span style=\"background:#fcfcff\">#fcfcff - (11.9955555556 %)</span> <span style=\"background:#f6f6f8\">#f6f6f8 - (2.0 %)</span> <span style=\"background:#fefeff\">#fefeff - (2.0 %)</span> <span style=\"background:#fef7fc\">#fef7fc - (1.76 %)</span> <span style=\"background:#fbfbfe\">#fbfbfe - (15.2133333333 %)</span> <span style=\"background:#f8f651\">#f8f651 - (0.28 %)</span> <span style=\"background:#dde2ea\">#dde2ea - (0.302222222222 %)</span> <span style=\"background:#f7fbfc\">#f7fbfc - (6.46222222222 %)</span> <span style=\"background:#fdfefd\">#fdfefd - (8.64 %)</span> <span style=\"background:#ebf0f5\">#ebf0f5 - (1.34666666667 %)</span> <span style=\"background:#fddbe2\">#fddbe2 - (0.608888888889 %)</span> <span style=\"background:#f9f685\">#f9f685 - (0.12 %)</span> <span style=\"background:#fdeaef\">#fdeaef - (0.8 %)</span> <span style=\"background:#eff6fa\">#eff6fa - (2.48 %)</span> <span style=\"background:#7fc566\">#7fc566 - (0.404444444444 %)</span> <span style=\"background:#fcfdfc\">#fcfdfc - (8.10222222222 %)</span> <span style=\"background:#b7e5fd\">#b7e5fd - (0.213333333333 %)</span> <span style=\"background:#6cb6e6\">#6cb6e6 - (0.422222222222 %)</span> <span style=\"background:#e4fcfe\">#e4fcfe - (0.457777777778 %)</span> <span style=\"background:#e5828f\">#e5828f - (0.657777777778 %)</span> <span style=\"background:#96cef2\">#96cef2 - (0.337777777778 %)</span> <span style=\"background:#f4f9fc\">#f4f9fc - (4.11111111111 %)</span> <span style=\"background:#da4750\">#da4750 - (1.57333333333 %)</span> <span style=\"background:#fafefe\">#fafefe - (2.03555555556 %)</span> <span style=\"background:#c86a6c\">#c86a6c - (0.8 %)</span> <span style=\"background:#ccf3c2\">#ccf3c2 - (0.115555555556 %)</span> <span style=\"background:#5fb249\">#5fb249 - (0.751111111111 %)</span> <span style=\"background:#525560\">#525560 - (0.728888888889 %)</span> <span style=\"background:#fdf7f4\">#fdf7f4 - (1.16888888889 %)</span> <span style=\"background:#fdfbb5\">#fdfbb5 - (0.137777777778 %)</span> <span style=\"background:#f8fdfe\">#f8fdfe - (4.6 %)</span> <span style=\"background:#f9fafc\">#f9fafc - (7.41333333333 %)</span> <span style=\"background:#f394ab\">#f394ab - (1.23555555556 %)</span> <span style=\"background:#f3fee3\">#f3fee3 - (0.288888888889 %)</span> <span style=\"background:#a6d895\">#a6d895 - (0.16 %)</span> <span style=\"background:#a84e47\">#a84e47 - (0.724444444444 %)</span> <span style=\"background:#3f414b\">#3f414b - (1.16444444444 %)</span> <span style=\"background:#bec2cb\">#bec2cb - (0.248888888889 %)</span> <span style=\"background:#4065bd\">#4065bd - (0.653333333333 %)</span> <span style=\"background:#3baaf0\">#3baaf0 - (1.04888888889 %)</span> <span style=\"background:#787c8a\">#787c8a - (0.262222222222 %)</span> <span style=\"background:#eeaeba\">#eeaeba - (0.897777777778 %)</span>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#351a5b\">#351a5b - (3.59111111111 %)</span> <span style=\"background:#251442\">#251442 - (1.69333333333 %)</span> <span style=\"background:#401d7c\">#401d7c - (2.52444444444 %)</span> <span style=\"background:#56364e\">#56364e - (0.64 %)</span> <span style=\"background:#623a7d\">#623a7d - (0.991111111111 %)</span> <span style=\"background:#212d1a\">#212d1a - (0.946666666667 %)</span> <span style=\"background:#fed616\">#fed616 - (0.666666666667 %)</span> <span style=\"background:#554318\">#554318 - (0.795555555556 %)</span> <span style=\"background:#725b26\">#725b26 - (0.648888888889 %)</span> <span style=\"background:#d62123\">#d62123 - (1.85333333333 %)</span> <span style=\"background:#202306\">#202306 - (0.693333333333 %)</span> <span style=\"background:#653a6a\">#653a6a - (1.17777777778 %)</span> <span style=\"background:#2a1735\">#2a1735 - (0.928888888889 %)</span> <span style=\"background:#281419\">#281419 - (3.64 %)</span> <span style=\"background:#c7a49b\">#c7a49b - (0.302222222222 %)</span> <span style=\"background:#9e7572\">#9e7572 - (0.351111111111 %)</span> <span style=\"background:#452164\">#452164 - (2.00888888889 %)</span> <span style=\"background:#311953\">#311953 - (2.79111111111 %)</span> <span style=\"background:#81574e\">#81574e - (0.564444444444 %)</span> <span style=\"background:#4c2257\">#4c2257 - (1.83555555556 %)</span> <span style=\"background:#572b60\">#572b60 - (1.57333333333 %)</span> <span style=\"background:#422171\">#422171 - (1.68 %)</span> <span style=\"background:#4e2666\">#4e2666 - (2.06666666667 %)</span> <span style=\"background:#593596\">#593596 - (0.848888888889 %)</span> <span style=\"background:#2c1720\">#2c1720 - (4.47555555556 %)</span> <span style=\"background:#2c1557\">#2c1557 - (2.70222222222 %)</span> <span style=\"background:#311565\">#311565 - (1.85777777778 %)</span> <span style=\"background:#472384\">#472384 - (2.73777777778 %)</span> <span style=\"background:#be3f48\">#be3f48 - (0.546666666667 %)</span> <span style=\"background:#692229\">#692229 - (0.786666666667 %)</span> <span style=\"background:#2a154d\">#2a154d - (2.98666666667 %)</span> <span style=\"background:#754f8c\">#754f8c - (0.333333333333 %)</span> <span style=\"background:#321b24\">#321b24 - (4.19555555556 %)</span> <span style=\"background:#3c2d08\">#3c2d08 - (0.831111111111 %)</span> <span style=\"background:#59306f\">#59306f - (1.70666666667 %)</span> <span style=\"background:#6b3e43\">#6b3e43 - (0.817777777778 %)</span> <span style=\"background:#351a43\">#351a43 - (1.35555555556 %)</span> <span style=\"background:#fad239\">#fad239 - (1.98222222222 %)</span> <span style=\"background:#af2224\">#af2224 - (1.22222222222 %)</span> <span style=\"background:#922d35\">#922d35 - (0.915555555556 %)</span> <span style=\"background:#4c2873\">#4c2873 - (1.53777777778 %)</span> <span style=\"background:#3e1b51\">#3e1b51 - (1.52 %)</span> <span style=\"background:#381771\">#381771 - (2.12888888889 %)</span> <span style=\"background:#561211\">#561211 - (0.853333333333 %)</span> <span style=\"background:#37140c\">#37140c - (0.915555555556 %)</span> <span style=\"background:#4a1f1d\">#4a1f1d - (1.09333333333 %)</span> <span style=\"background:#201213\">#201213 - (1.33333333333 %)</span> <span style=\"background:#4e2a8d\">#4e2a8d - (2.18222222222 %)</span> <span style=\"background:#9a752a\">#9a752a - (0.773333333333 %)</span> <span style=\"background:#3e1e5c\">#3e1e5c - (2.42666666667 %)</span> <span style=\"background:#3c2129\">#3c2129 - (2.88444444444 %)</span> <span style=\"background:#781515\">#781515 - (0.551111111111 %)</span> <span style=\"background:#724b6a\">#724b6a - (0.515555555556 %)</span> <span style=\"background:#553236\">#553236 - (1.31555555556 %)</span> <span style=\"background:#162016\">#162016 - (1.32888888889 %)</span> <span style=\"background:#ecdcd3\">#ecdcd3 - (0.262222222222 %)</span> <span style=\"background:#532f7f\">#532f7f - (1.17777777778 %)</span> <span style=\"background:#31191b\">#31191b - (2.70666666667 %)</span> <span style=\"background:#200400\">#2004
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#e5fcff\">#e5fcff - (1.52 %)</span> <span style=\"background:#81afd5\">#81afd5 - (1.17333333333 %)</span> <span style=\"background:#1c6fbc\">#1c6fbc - (0.84 %)</span> <span style=\"background:#f4d934\">#f4d934 - (3.36 %)</span> <span style=\"background:#c4edfe\">#c4edfe - (1.00888888889 %)</span> <span style=\"background:#eaedf1\">#eaedf1 - (1.19555555556 %)</span> <span style=\"background:#e8bc80\">#e8bc80 - (0.613333333333 %)</span> <span style=\"background:#e3f2fd\">#e3f2fd - (1.23111111111 %)</span> <span style=\"background:#f6f4f2\">#f6f4f2 - (2.24 %)</span> <span style=\"background:#eddd60\">#eddd60 - (0.893333333333 %)</span> <span style=\"background:#b6e1fd\">#b6e1fd - (1.59555555556 %)</span> <span style=\"background:#cee5fa\">#cee5fa - (1.04444444444 %)</span> <span style=\"background:#65b1ec\">#65b1ec - (1.42666666667 %)</span> <span style=\"background:#f0ca96\">#f0ca96 - (0.568888888889 %)</span> <span style=\"background:#e9a52e\">#e9a52e - (0.248888888889 %)</span> <span style=\"background:#faf7fb\">#faf7fb - (1.54666666667 %)</span> <span style=\"background:#f3f0e9\">#f3f0e9 - (1.11555555556 %)</span> <span style=\"background:#eee17a\">#eee17a - (1.10666666667 %)</span> <span style=\"background:#f5d72d\">#f5d72d - (3.36444444444 %)</span> <span style=\"background:#91bde2\">#91bde2 - (1.19555555556 %)</span> <span style=\"background:#f2f3f8\">#f2f3f8 - (4.94222222222 %)</span> <span style=\"background:#90cefa\">#90cefa - (1.30666666667 %)</span> <span style=\"background:#f0fdfe\">#f0fdfe - (1.64888888889 %)</span> <span style=\"background:#3a82bc\">#3a82bc - (1.30222222222 %)</span> <span style=\"background:#f4f2fc\">#f4f2fc - (2.36444444444 %)</span> <span style=\"background:#f6dc3b\">#f6dc3b - (2.75555555556 %)</span> <span style=\"background:#a4c7e6\">#a4c7e6 - (0.968888888889 %)</span> <span style=\"background:#5e5433\">#5e5433 - (0.444444444444 %)</span> <span style=\"background:#f3cf1c\">#f3cf1c - (0.911111111111 %)</span> <span style=\"background:#e2ab55\">#e2ab55 - (0.657777777778 %)</span> <span style=\"background:#f4d425\">#f4d425 - (2.78666666667 %)</span> <span style=\"background:#f5b559\">#f5b559 - (1.08 %)</span> <span style=\"background:#eff5f5\">#eff5f5 - (1.46666666667 %)</span> <span style=\"background:#5392c3\">#5392c3 - (1.34666666667 %)</span> <span style=\"background:#7ac0f5\">#7ac0f5 - (1.37777777778 %)</span> <span style=\"background:#f9ecbe\">#f9ecbe - (1.03555555556 %)</span> <span style=\"background:#d5f7ff\">#d5f7ff - (0.928888888889 %)</span> <span style=\"background:#f4df50\">#f4df50 - (2.07111111111 %)</span> <span style=\"background:#ecf3fd\">#ecf3fd - (2.24888888889 %)</span> <span style=\"background:#f9f0d0\">#f9f0d0 - (1.06222222222 %)</span> <span style=\"background:#e6b469\">#e6b469 - (0.897777777778 %)</span> <span style=\"background:#68a2cf\">#68a2cf - (1.40444444444 %)</span> <span style=\"background:#dbeafa\">#dbeafa - (0.853333333333 %)</span> <span style=\"background:#f2e36a\">#f2e36a - (1.58666666667 %)</span> <span style=\"background:#ecf0f7\">#ecf0f7 - (2.32888888889 %)</span> <span style=\"background:#f5f6fc\">#f5f6fc - (3.48 %)</span> <span style=\"background:#fbf4de\">#fbf4de - (1.36 %)</span> <span style=\"background:#fcf7eb\">#fcf7eb - (1.29333333333 %)</span> <span style=\"background:#f0f5fd\">#f0f5fd - (2.63111111111 %)</span> <span style=\"background:#c7dbef\">#c7dbef - (1.07555555556 %)</span> <span style=\"background:#a4d9fc\">#a4d9fc - (1.65333333333 %)</span> <span style=\"background:#f7de45\">#f7de45 - (1.87555555556 %)</span> <span style=\"background:#f7d8af\">#f7d8af - (0.537777777778 %)</span> <span style=\"background:#f1da42\">#f1da42 - (1.34222222222 %)</span> <span style=\"background:#f4ad46\">#f4ad46 - (1.24 %)</span> <span style=\"background:#4da3e5\">#4da3e5 - (1.36444444444 %)</span> <span style=\"background:#f5f4f8\">#f5f4f8 - (4.60444444444 %)</span> <span style=\"background:#3c94d8\">#3c94d8 - (1.62222222222 %)</span> <span style=\"background:#efe48e\">#efe48e - (0.888888888889 %)</span> <span style=\"ba
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#847a56\">#847a56 - (0.955555555556 %)</span> <span style=\"background:#9c9e88\">#9c9e88 - (1.32888888889 %)</span> <span style=\"background:#989a8d\">#989a8d - (1.25777777778 %)</span> <span style=\"background:#90845a\">#90845a - (0.524444444444 %)</span> <span style=\"background:#827e64\">#827e64 - (2.76444444444 %)</span> <span style=\"background:#919486\">#919486 - (0.773333333333 %)</span> <span style=\"background:#6b6b59\">#6b6b59 - (1.22666666667 %)</span> <span style=\"background:#9c9d8e\">#9c9d8e - (2.64444444444 %)</span> <span style=\"background:#5e4619\">#5e4619 - (0.666666666667 %)</span> <span style=\"background:#98967b\">#98967b - (1.68444444444 %)</span> <span style=\"background:#8f8a6d\">#8f8a6d - (1.67555555556 %)</span> <span style=\"background:#b3b399\">#b3b399 - (0.493333333333 %)</span> <span style=\"background:#5c5b45\">#5c5b45 - (1.24888888889 %)</span> <span style=\"background:#9a9b8a\">#9a9b8a - (2.27555555556 %)</span> <span style=\"background:#a3a18b\">#a3a18b - (2.87555555556 %)</span> <span style=\"background:#81816d\">#81816d - (2.71111111111 %)</span> <span style=\"background:#9e9f92\">#9e9f92 - (1.71111111111 %)</span> <span style=\"background:#a09e88\">#a09e88 - (1.78666666667 %)</span> <span style=\"background:#312e19\">#312e19 - (1.47111111111 %)</span> <span style=\"background:#a7a48c\">#a7a48c - (1.55111111111 %)</span> <span style=\"background:#4e370d\">#4e370d - (0.924444444444 %)</span> <span style=\"background:#87866f\">#87866f - (2.88888888889 %)</span> <span style=\"background:#25220f\">#25220f - (1.27555555556 %)</span> <span style=\"background:#9c9b85\">#9c9b85 - (1.91555555556 %)</span> <span style=\"background:#898a74\">#898a74 - (2.67555555556 %)</span> <span style=\"background:#866d28\">#866d28 - (0.991111111111 %)</span> <span style=\"background:#8e8d76\">#8e8d76 - (1.88 %)</span> <span style=\"background:#a2a293\">#a2a293 - (1.41333333333 %)</span> <span style=\"background:#8a8c7b\">#8a8c7b - (1.18666666667 %)</span> <span style=\"background:#979987\">#979987 - (2.52444444444 %)</span> <span style=\"background:#878268\">#878268 - (2.04 %)</span> <span style=\"background:#816418\">#816418 - (1.36888888889 %)</span> <span style=\"background:#929076\">#929076 - (1.43555555556 %)</span> <span style=\"background:#959582\">#959582 - (2.16888888889 %)</span> <span style=\"background:#726139\">#726139 - (1.04888888889 %)</span> <span style=\"background:#787356\">#787356 - (1.37777777778 %)</span> <span style=\"background:#51503b\">#51503b - (1.27555555556 %)</span> <span style=\"background:#a5a593\">#a5a593 - (2.29777777778 %)</span> <span style=\"background:#8d763c\">#8d763c - (0.497777777778 %)</span> <span style=\"background:#68654c\">#68654c - (1.19555555556 %)</span> <span style=\"background:#66552c\">#66552c - (0.893333333333 %)</span> <span style=\"background:#3a3926\">#3a3926 - (1.41777777778 %)</span> <span style=\"background:#755812\">#755812 - (1.10222222222 %)</span> <span style=\"background:#797b6c\">#797b6c - (1.72888888889 %)</span> <span style=\"background:#93937e\">#93937e - (2.14222222222 %)</span> <span style=\"background:#48452f\">#48452f - (1.32444444444 %)</span> <span style=\"background:#171605\">#171605 - (0.715555555556 %)</span> <span style=\"background:#a0a08f\">#a0a08f - (2.05333333333 %)</span> <span style=\"background:#aaaa95\">#aaaa95 - (1.74666666667 %)</span> <span style=\"background:#828476\">#828476 - (1.19555555556 %)</span> <span style=\"background:#a7a590\">#a7a590 - (3.42222222222 %)</span> <span style=\"background:#9d9b7f\">#9d9b7f - (1.06666666667 %)</span> <span style=\"background:#a19975\">#a19975 - (0.271111111111 %)</span> <span style=\"background:#989374\">#989374 - (0.924444444444 %)</span> <span style=\"background:#7c7960\">#7c7960 - (2.35111111111 %)</span> <span style=\"background:#717365\">#717365 - (0.951111111111 %)</span> <span style=\"background:#8f907c\">#8f907c - (1.98666666667 %)</span> <span style=\"background:#a3a085\">#a3a085 - (1.18222222222 %)</span> <span style=\"background:#787245
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#f1dcd9\">#f1dcd9 - (2.94222222222 %)</span> <span style=\"background:#c7f2aa\">#c7f2aa - (0.866666666667 %)</span> <span style=\"background:#afeb8f\">#afeb8f - (0.871111111111 %)</span> <span style=\"background:#f8f6e6\">#f8f6e6 - (2.42222222222 %)</span> <span style=\"background:#f3b67f\">#f3b67f - (1.04444444444 %)</span> <span style=\"background:#98d678\">#98d678 - (0.617777777778 %)</span> <span style=\"background:#36136f\">#36136f - (0.417777777778 %)</span> <span style=\"background:#f7f49e\">#f7f49e - (0.96 %)</span> <span style=\"background:#6d1a21\">#6d1a21 - (0.404444444444 %)</span> <span style=\"background:#fbe1c0\">#fbe1c0 - (0.871111111111 %)</span> <span style=\"background:#eb8284\">#eb8284 - (1.48888888889 %)</span> <span style=\"background:#f5ebe6\">#f5ebe6 - (4.15555555556 %)</span> <span style=\"background:#dbdde3\">#dbdde3 - (1.85333333333 %)</span> <span style=\"background:#ce3c20\">#ce3c20 - (1.37333333333 %)</span> <span style=\"background:#f9e2df\">#f9e2df - (4.78666666667 %)</span> <span style=\"background:#ecf8d2\">#ecf8d2 - (1.33333333333 %)</span> <span style=\"background:#c2dda9\">#c2dda9 - (1.05777777778 %)</span> <span style=\"background:#e87b47\">#e87b47 - (1.07111111111 %)</span> <span style=\"background:#fdf4ed\">#fdf4ed - (6.02222222222 %)</span> <span style=\"background:#e2eccb\">#e2eccb - (1.40888888889 %)</span> <span style=\"background:#dbaaa4\">#dbaaa4 - (1.51111111111 %)</span> <span style=\"background:#daf6bf\">#daf6bf - (1.38222222222 %)</span> <span style=\"background:#e55536\">#e55536 - (1.55111111111 %)</span> <span style=\"background:#a3a6bb\">#a3a6bb - (0.964444444444 %)</span> <span style=\"background:#efe7dd\">#efe7dd - (2.53333333333 %)</span> <span style=\"background:#8f7261\">#8f7261 - (0.711111111111 %)</span> <span style=\"background:#e2e8f4\">#e2e8f4 - (1.53777777778 %)</span> <span style=\"background:#fde6e7\">#fde6e7 - (3.32 %)</span> <span style=\"background:#7e5998\">#7e5998 - (0.471111111111 %)</span> <span style=\"background:#984233\">#984233 - (0.795555555556 %)</span> <span style=\"background:#f5c8a8\">#f5c8a8 - (1.23555555556 %)</span> <span style=\"background:#f4f2fb\">#f4f2fb - (1.16 %)</span> <span style=\"background:#c8d6f8\">#c8d6f8 - (0.862222222222 %)</span> <span style=\"background:#ef9864\">#ef9864 - (1.19111111111 %)</span> <span style=\"background:#f8a9bf\">#f8a9bf - (1.24444444444 %)</span> <span style=\"background:#6477b2\">#6477b2 - (0.964444444444 %)</span> <span style=\"background:#97a9de\">#97a9de - (1.08 %)</span> <span style=\"background:#f2ee50\">#f2ee50 - (0.568888888889 %)</span> <span style=\"background:#c25850\">#c25850 - (1.36888888889 %)</span> <span style=\"background:#9884ab\">#9884ab - (0.791111111111 %)</span> <span style=\"background:#d57ea4\">#d57ea4 - (1.19555555556 %)</span> <span style=\"background:#cacedb\">#cacedb - (1.65777777778 %)</span> <span style=\"background:#e8d2ce\">#e8d2ce - (2.01777777778 %)</span> <span style=\"background:#e96767\">#e96767 - (1.16888888889 %)</span> <span style=\"background:#70c546\">#70c546 - (0.288888888889 %)</span> <span style=\"background:#d4e6ba\">#d4e6ba - (2.01333333333 %)</span> <span style=\"background:#f8c3c7\">#f8c3c7 - (1.50666666667 %)</span> <span style=\"background:#f299a0\">#f299a0 - (1.49333333333 %)</span> <span style=\"background:#c2796f\">#c2796f - (1.60888888889 %)</span> <span style=\"background:#fbd4d6\">#fbd4d6 - (1.88888888889 %)</span> <span style=\"background:#fdfaf2\">#fdfaf2 - (3.11111111111 %)</span> <span style=\"background:#e2bcbc\">#e2bcbc - (1.29777777778 %)</span> <span style=\"background:#f5f17c\">#f5f17c - (0.946666666667 %)</span> <span style=\"background:#a03a6c\">#a03a6c - (0.617777777778 %)</span> <span style=\"background:#7f90c7\">#7f90c7 - (1.25777777778 %)</span> <span style=\"background:#b9bccd\">#b9bccd - (1.15111111111 %)</span> <span style=\"background:#fceee9\">#fceee9 - (5.94222222222 %)</span> <span style=\"background:#f9eede\">#f9eede - (3.94222222222 %)</span> <span style=\"background:#c9948d\">#c9948d - (
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#a8d5b3\">#a8d5b3 - (0.96 %)</span> <span style=\"background:#5b9134\">#5b9134 - (1.43555555556 %)</span> <span style=\"background:#303a30\">#303a30 - (2.83555555556 %)</span> <span style=\"background:#ceeff8\">#ceeff8 - (1.20888888889 %)</span> <span style=\"background:#686d6d\">#686d6d - (0.622222222222 %)</span> <span style=\"background:#9b794e\">#9b794e - (1.27111111111 %)</span> <span style=\"background:#1a2419\">#1a2419 - (2.81777777778 %)</span> <span style=\"background:#5f9359\">#5f9359 - (0.622222222222 %)</span> <span style=\"background:#805f32\">#805f32 - (1.90666666667 %)</span> <span style=\"background:#73b036\">#73b036 - (1.41333333333 %)</span> <span style=\"background:#98cb91\">#98cb91 - (1.04888888889 %)</span> <span style=\"background:#0b1613\">#0b1613 - (2.52444444444 %)</span> <span style=\"background:#a68f6a\">#a68f6a - (1.04 %)</span> <span style=\"background:#020a08\">#020a08 - (2.80444444444 %)</span> <span style=\"background:#fefefe\">#fefefe - (10.2311111111 %)</span> <span style=\"background:#684f30\">#684f30 - (1.41333333333 %)</span> <span style=\"background:#5f340c\">#5f340c - (1.70222222222 %)</span> <span style=\"background:#6d4519\">#6d4519 - (2.13777777778 %)</span> <span style=\"background:#82ba49\">#82ba49 - (1.45333333333 %)</span> <span style=\"background:#273228\">#273228 - (3.10222222222 %)</span> <span style=\"background:#bfe8f7\">#bfe8f7 - (1.21333333333 %)</span> <span style=\"background:#816e52\">#816e52 - (1.78666666667 %)</span> <span style=\"background:#8d6b3d\">#8d6b3d - (1.48 %)</span> <span style=\"background:#715f43\">#715f43 - (1.32888888889 %)</span> <span style=\"background:#4f5c58\">#4f5c58 - (1.02666666667 %)</span> <span style=\"background:#020202\">#020202 - (2.66666666667 %)</span> <span style=\"background:#6ca543\">#6ca543 - (1.53777777778 %)</span> <span style=\"background:#8b877c\">#8b877c - (0.955555555556 %)</span> <span style=\"background:#1d5c02\">#1d5c02 - (0.617777777778 %)</span> <span style=\"background:#132020\">#132020 - (1.66222222222 %)</span> <span style=\"background:#ebf9fc\">#ebf9fc - (1.28 %)</span> <span style=\"background:#618b85\">#618b85 - (0.395555555556 %)</span> <span style=\"background:#63a128\">#63a128 - (1.85333333333 %)</span> <span style=\"background:#afdaf1\">#afdaf1 - (0.915555555556 %)</span> <span style=\"background:#79a997\">#79a997 - (0.782222222222 %)</span> <span style=\"background:#8bb9b4\">#8bb9b4 - (0.946666666667 %)</span> <span style=\"background:#dcf6fb\">#dcf6fb - (1.30666666667 %)</span> <span style=\"background:#121d13\">#121d13 - (2.95555555556 %)</span> <span style=\"background:#4d2405\">#4d2405 - (1.32888888889 %)</span> <span style=\"background:#57931c\">#57931c - (2.22222222222 %)</span> <span style=\"background:#487d22\">#487d22 - (0.986666666667 %)</span> <span style=\"background:#aca48e\">#aca48e - (0.702222222222 %)</span> <span style=\"background:#07120c\">#07120c - (2.98666666667 %)</span> <span style=\"background:#351404\">#351404 - (1.42222222222 %)</span> <span style=\"background:#48860e\">#48860e - (1.20888888889 %)</span> <span style=\"background:#48793c\">#48793c - (0.484444444444 %)</span> <span style=\"background:#f8fbfc\">#f8fbfc - (1.52 %)</span> <span style=\"background:#795324\">#795324 - (1.82222222222 %)</span> <span style=\"background:#8abe73\">#8abe73 - (1.13333333333 %)</span> <span style=\"background:#8c7c63\">#8c7c63 - (1.36444444444 %)</span> <span style=\"background:#74ab65\">#74ab65 - (1.08444444444 %)</span> <span style=\"background:#412916\">#412916 - (0.791111111111 %)</span> <span style=\"background:#b7e4d6\">#b7e4d6 - (0.964444444444 %)</span> <span style=\"background:#1e4114\">#1e4114 - (0.453333333333 %)</span> <span style=\"background:#9fc8d4\">#9fc8d4 - (0.862222222222 %)</span> <span style=\"background:#39433b\">#39433b - (2.37777777778 %)</span> <span style=\"background:#202b22\">#202b22 - (3.34666666667 %)</span> <span style=\"background:#1c0501\">#1c0501 - (1.05777777778 %)</span> <span style=\"background:#357409\">#357409 - (0.951111111
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#968f8d\">#968f8d - (3.02222222222 %)</span> <span style=\"background:#39627b\">#39627b - (0.537777777778 %)</span> <span style=\"background:#4c7086\">#4c7086 - (0.764444444444 %)</span> <span style=\"background:#97979e\">#97979e - (0.395555555556 %)</span> <span style=\"background:#847a71\">#847a71 - (1.26222222222 %)</span> <span style=\"background:#7e868e\">#7e868e - (0.813333333333 %)</span> <span style=\"background:#484440\">#484440 - (0.511111111111 %)</span> <span style=\"background:#858486\">#858486 - (1.82666666667 %)</span> <span style=\"background:#928a84\">#928a84 - (2.48888888889 %)</span> <span style=\"background:#2d2f32\">#2d2f32 - (0.355555555556 %)</span> <span style=\"background:#8a8585\">#8a8585 - (4.49333333333 %)</span> <span style=\"background:#878282\">#878282 - (3.91111111111 %)</span> <span style=\"background:#738898\">#738898 - (0.493333333333 %)</span> <span style=\"background:#848080\">#848080 - (4.16 %)</span> <span style=\"background:#8c9198\">#8c9198 - (0.635555555556 %)</span> <span style=\"background:#5e6b77\">#5e6b77 - (1.10222222222 %)</span> <span style=\"background:#9a9293\">#9a9293 - (2.52 %)</span> <span style=\"background:#a58f7b\">#a58f7b - (0.222222222222 %)</span> <span style=\"background:#8f8950\">#8f8950 - (1.03555555556 %)</span> <span style=\"background:#5f7b8f\">#5f7b8f - (0.72 %)</span> <span style=\"background:#7f4e26\">#7f4e26 - (0.524444444444 %)</span> <span style=\"background:#878224\">#878224 - (1.54666666667 %)</span> <span style=\"background:#928f8a\">#928f8a - (1.17777777778 %)</span> <span style=\"background:#858015\">#858015 - (1.10666666667 %)</span> <span style=\"background:#918871\">#918871 - (0.991111111111 %)</span> <span style=\"background:#8f8587\">#8f8587 - (1.20888888889 %)</span> <span style=\"background:#847e7d\">#847e7d - (4.72444444444 %)</span> <span style=\"background:#979396\">#979396 - (1.91555555556 %)</span> <span style=\"background:#898c90\">#898c90 - (0.928888888889 %)</span> <span style=\"background:#545557\">#545557 - (0.697777777778 %)</span> <span style=\"background:#969192\">#969192 - (2.99111111111 %)</span> <span style=\"background:#918988\">#918988 - (3.06222222222 %)</span> <span style=\"background:#6a757f\">#6a757f - (1.16888888889 %)</span> <span style=\"background:#775d45\">#775d45 - (0.511111111111 %)</span> <span style=\"background:#968d87\">#968d87 - (1.09333333333 %)</span> <span style=\"background:#74726f\">#74726f - (0.906666666667 %)</span> <span style=\"background:#98918f\">#98918f - (4.38222222222 %)</span> <span style=\"background:#7e7b7b\">#7e7b7b - (2.51111111111 %)</span> <span style=\"background:#3e4d5e\">#3e4d5e - (0.96 %)</span> <span style=\"background:#90633a\">#90633a - (0.337777777778 %)</span> <span style=\"background:#505f6d\">#505f6d - (1.01777777778 %)</span> <span style=\"background:#958c8a\">#958c8a - (1.52 %)</span> <span style=\"background:#908b8c\">#908b8c - (2.39555555556 %)</span> <span style=\"background:#8a817f\">#8a817f - (2.38666666667 %)</span> <span style=\"background:#8e8784\">#8e8784 - (3.19111111111 %)</span> <span style=\"background:#8d8762\">#8d8762 - (1.25777777778 %)</span> <span style=\"background:#898342\">#898342 - (1.4 %)</span> <span style=\"background:#9e9793\">#9e9793 - (2.09333333333 %)</span> <span style=\"background:#908886\">#908886 - (2.42666666667 %)</span> <span style=\"background:#95775c\">#95775c - (0.36 %)</span> <span style=\"background:#2a3b50\">#2a3b50 - (0.835555555556 %)</span> <span style=\"background:#666562\">#666562 - (0.853333333333 %)</span> <span style=\"background:#846c57\">#846c57 - (0.595555555556 %)</span> <span style=\"background:#9b9490\">#9b9490 - (2.49333333333 %)</span> <span style=\"background:#938f90\">#938f90 - (2.56888888889 %)</span> <span style=\"background:#9c9596\">#9c9596 - (1.98222222222 %)</span> <span style=\"background:#8d8580\">#8d8580 - (1.78666666667 %)</span> <span style=\"background:#8c8888\">#8c8888 - (2.76 %)</span> <span style=\"background:#827f54\">#827f54 - (0.777777777778 %)</span> <span styl
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#b39fbd\">#b39fbd - (0.546666666667 %)</span> <span style=\"background:#558db3\">#558db3 - (0.862222222222 %)</span> <span style=\"background:#6b6659\">#6b6659 - (2.08888888889 %)</span> <span style=\"background:#42392c\">#42392c - (2.40444444444 %)</span> <span style=\"background:#898b8c\">#898b8c - (2.18222222222 %)</span> <span style=\"background:#7c483c\">#7c483c - (0.862222222222 %)</span> <span style=\"background:#979c71\">#979c71 - (1.11111111111 %)</span> <span style=\"background:#c0b6b4\">#c0b6b4 - (1.30666666667 %)</span> <span style=\"background:#6b9ab5\">#6b9ab5 - (1.56888888889 %)</span> <span style=\"background:#86adc2\">#86adc2 - (1.51555555556 %)</span> <span style=\"background:#2c251a\">#2c251a - (0.693333333333 %)</span> <span style=\"background:#43494b\">#43494b - (0.937777777778 %)</span> <span style=\"background:#ada6a4\">#ada6a4 - (2.08888888889 %)</span> <span style=\"background:#91a3ae\">#91a3ae - (2.50666666667 %)</span> <span style=\"background:#8e887b\">#8e887b - (1.87555555556 %)</span> <span style=\"background:#6a8fa5\">#6a8fa5 - (0.991111111111 %)</span> <span style=\"background:#a0a4a6\">#a0a4a6 - (3.14666666667 %)</span> <span style=\"background:#c5c28c\">#c5c28c - (0.835555555556 %)</span> <span style=\"background:#d4acaa\">#d4acaa - (2.39555555556 %)</span> <span style=\"background:#a3b0b6\">#a3b0b6 - (1.39111111111 %)</span> <span style=\"background:#383024\">#383024 - (1.85333333333 %)</span> <span style=\"background:#9f8bb5\">#9f8bb5 - (0.737777777778 %)</span> <span style=\"background:#acb687\">#acb687 - (1.52 %)</span> <span style=\"background:#6d7a81\">#6d7a81 - (1.70666666667 %)</span> <span style=\"background:#55595a\">#55595a - (1.48888888889 %)</span> <span style=\"background:#9b9b9b\">#9b9b9b - (3.51555555556 %)</span> <span style=\"background:#4b4033\">#4b4033 - (2.69333333333 %)</span> <span style=\"background:#7f929c\">#7f929c - (1.87111111111 %)</span> <span style=\"background:#635c4b\">#635c4b - (1.96 %)</span> <span style=\"background:#577e99\">#577e99 - (1.22222222222 %)</span> <span style=\"background:#d1cbca\">#d1cbca - (0.666666666667 %)</span> <span style=\"background:#7d7974\">#7d7974 - (2.01777777778 %)</span> <span style=\"background:#55483a\">#55483a - (2.37333333333 %)</span> <span style=\"background:#a6a399\">#a6a399 - (1.84444444444 %)</span> <span style=\"background:#8f9497\">#8f9497 - (2.16444444444 %)</span> <span style=\"background:#b6adac\">#b6adac - (1.58222222222 %)</span> <span style=\"background:#3a5a72\">#3a5a72 - (0.764444444444 %)</span> <span style=\"background:#8a9ba4\">#8a9ba4 - (2.15111111111 %)</span> <span style=\"background:#b7bc9b\">#b7bc9b - (1.35111111111 %)</span> <span style=\"background:#629fc5\">#629fc5 - (1.19555555556 %)</span> <span style=\"background:#74a7c4\">#74a7c4 - (1.65333333333 %)</span> <span style=\"background:#9db4c3\">#9db4c3 - (1.68 %)</span> <span style=\"background:#427ba7\">#427ba7 - (1.49333333333 %)</span> <span style=\"background:#c6c0bf\">#c6c0bf - (0.977777777778 %)</span> <span style=\"background:#797363\">#797363 - (1.51111111111 %)</span> <span style=\"background:#5e6467\">#5e6467 - (1.46666666667 %)</span> <span style=\"background:#995a49\">#995a49 - (1.77777777778 %)</span> <span style=\"background:#7f8182\">#7f8182 - (1.83555555556 %)</span> <span style=\"background:#a0a485\">#a0a485 - (1.33777777778 %)</span> <span style=\"background:#496c85\">#496c85 - (0.982222222222 %)</span> <span style=\"background:#c8a3a1\">#c8a3a1 - (1.34666666667 %)</span> <span style=\"background:#6d6e6e\">#6d6e6e - (1.89777777778 %)</span> <span style=\"background:#c0b665\">#c0b665 - (0.555555555556 %)</span> <span style=\"background:#97928b\">#97928b - (2.08444444444 %)</span> <span style=\"background:#96abb8\">#96abb8 - (2.36888888889 %)</span> <span style=\"background:#396d92\">#396d92 - (1.30222222222 %)</span> <span style=\"background:#768690\">#768690 - (1.62666666667 %)</span> <span style=\"background:#5a5245\">#5a5245 - (2.23555555556 %)</span> <span style=\"background:#b18f8d\">#b18f8
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#7d6e78\">#7d6e78 - (3.12 %)</span> <span style=\"background:#76696d\">#76696d - (1.50666666667 %)</span> <span style=\"background:#a26f77\">#a26f77 - (0.831111111111 %)</span> <span style=\"background:#586792\">#586792 - (0.697777777778 %)</span> <span style=\"background:#a9988a\">#a9988a - (1.26666666667 %)</span> <span style=\"background:#a57a95\">#a57a95 - (1.08444444444 %)</span> <span style=\"background:#95537b\">#95537b - (0.537777777778 %)</span> <span style=\"background:#a0a199\">#a0a199 - (0.635555555556 %)</span> <span style=\"background:#ac9aa1\">#ac9aa1 - (3.93777777778 %)</span> <span style=\"background:#6b6b87\">#6b6b87 - (0.648888888889 %)</span> <span style=\"background:#b88fa5\">#b88fa5 - (1.38222222222 %)</span> <span style=\"background:#b5a4aa\">#b5a4aa - (3.80444444444 %)</span> <span style=\"background:#8d9589\">#8d9589 - (0.68 %)</span> <span style=\"background:#a08e6f\">#a08e6f - (0.8 %)</span> <span style=\"background:#718472\">#718472 - (0.995555555556 %)</span> <span style=\"background:#998d9c\">#998d9c - (1.40888888889 %)</span> <span style=\"background:#a26e55\">#a26e55 - (0.24 %)</span> <span style=\"background:#979a91\">#979a91 - (0.56 %)</span> <span style=\"background:#a8945d\">#a8945d - (0.537777777778 %)</span> <span style=\"background:#97878c\">#97878c - (2.96444444444 %)</span> <span style=\"background:#516e57\">#516e57 - (0.915555555556 %)</span> <span style=\"background:#b6a49f\">#b6a49f - (1.62666666667 %)</span> <span style=\"background:#3c5c44\">#3c5c44 - (0.764444444444 %)</span> <span style=\"background:#a393a2\">#a393a2 - (3.0 %)</span> <span style=\"background:#6d759a\">#6d759a - (0.888888888889 %)</span> <span style=\"background:#aaa8a2\">#aaa8a2 - (0.511111111111 %)</span> <span style=\"background:#af9c95\">#af9c95 - (1.54222222222 %)</span> <span style=\"background:#b97b9e\">#b97b9e - (0.782222222222 %)</span> <span style=\"background:#0c050e\">#0c050e - (1.88 %)</span> <span style=\"background:#7e7990\">#7e7990 - (1.0 %)</span> <span style=\"background:#627b65\">#627b65 - (0.84 %)</span> <span style=\"background:#b19fa6\">#b19fa6 - (4.65333333333 %)</span> <span style=\"background:#83737a\">#83737a - (4.18222222222 %)</span> <span style=\"background:#b7a37c\">#b7a37c - (1.50222222222 %)</span> <span style=\"background:#b39e6e\">#b39e6e - (0.826666666667 %)</span> <span style=\"background:#a7979f\">#a7979f - (4.38222222222 %)</span> <span style=\"background:#b8a593\">#b8a593 - (1.33333333333 %)</span> <span style=\"background:#7e82a2\">#7e82a2 - (0.631111111111 %)</span> <span style=\"background:#9c8c92\">#9c8c92 - (3.33777777778 %)</span> <span style=\"background:#985b63\">#985b63 - (0.613333333333 %)</span> <span style=\"background:#b7a387\">#b7a387 - (1.49333333333 %)</span> <span style=\"background:#887781\">#887781 - (2.22222222222 %)</span> <span style=\"background:#a4949b\">#a4949b - (4.35555555556 %)</span> <span style=\"background:#6b5f62\">#6b5f62 - (1.24888888889 %)</span> <span style=\"background:#bca8b1\">#bca8b1 - (3.6 %)</span> <span style=\"background:#9c6788\">#9c6788 - (0.897777777778 %)</span> <span style=\"background:#aa977c\">#aa977c - (1.26666666667 %)</span> <span style=\"background:#a09097\">#a09097 - (3.16444444444 %)</span> <span style=\"background:#9390a7\">#9390a7 - (0.648888888889 %)</span> <span style=\"background:#918087\">#918087 - (2.55111111111 %)</span> <span style=\"background:#818d7f\">#818d7f - (0.946666666667 %)</span> <span style=\"background:#887b79\">#887b79 - (1.98222222222 %)</span> <span style=\"background:#190d19\">#190d19 - (1.37777777778 %)</span> <span style=\"background:#455988\">#455988 - (0.546666666667 %)</span> <span style=\"background:#8b8598\">#8b8598 - (1.17333333333 %)</span> <span style=\"background:#8d7e80\">#8d7e80 - (2.07555555556 %)</span> <span style=\"background:#c09aaf\">#c09aaf - (1.17777777778 %)</span> <span style=\"background:#604f57\">#604f57 - (0.742222222222 %)</span> <span style=\"background:#ae8a99\">#ae8a99 - (1.32444444444 %)</span> <span style=\"background:#ab7f8
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#ac98d7\">#ac98d7 - (0.413333333333 %)</span> <span style=\"background:#8a8fcb\">#8a8fcb - (0.622222222222 %)</span> <span style=\"background:#a6d1f4\">#a6d1f4 - (3.35111111111 %)</span> <span style=\"background:#44a7d9\">#44a7d9 - (0.4 %)</span> <span style=\"background:#92bcea\">#92bcea - (1.42222222222 %)</span> <span style=\"background:#7d7fbd\">#7d7fbd - (1.64 %)</span> <span style=\"background:#96c0e4\">#96c0e4 - (3.85333333333 %)</span> <span style=\"background:#98c4e7\">#98c4e7 - (3.52888888889 %)</span> <span style=\"background:#a7af9e\">#a7af9e - (0.622222222222 %)</span> <span style=\"background:#944d4c\">#944d4c - (0.44 %)</span> <span style=\"background:#de6dca\">#de6dca - (0.36 %)</span> <span style=\"background:#90c8f4\">#90c8f4 - (0.324444444444 %)</span> <span style=\"background:#416db2\">#416db2 - (1.26666666667 %)</span> <span style=\"background:#a2cdf0\">#a2cdf0 - (2.49333333333 %)</span> <span style=\"background:#86abd3\">#86abd3 - (3.66222222222 %)</span> <span style=\"background:#7cb0e3\">#7cb0e3 - (0.56 %)</span> <span style=\"background:#9d7594\">#9d7594 - (1.05333333333 %)</span> <span style=\"background:#6094d1\">#6094d1 - (0.906666666667 %)</span> <span style=\"background:#5d59a6\">#5d59a6 - (0.408888888889 %)</span> <span style=\"background:#5c82bd\">#5c82bd - (0.866666666667 %)</span> <span style=\"background:#376c84\">#376c84 - (0.591111111111 %)</span> <span style=\"background:#62b6e4\">#62b6e4 - (0.302222222222 %)</span> <span style=\"background:#49956c\">#49956c - (0.893333333333 %)</span> <span style=\"background:#7e9fc5\">#7e9fc5 - (2.32444444444 %)</span> <span style=\"background:#8eb7df\">#8eb7df - (3.55111111111 %)</span> <span style=\"background:#305da9\">#305da9 - (1.29333333333 %)</span> <span style=\"background:#a3cef1\">#a3cef1 - (3.09333333333 %)</span> <span style=\"background:#a0ccef\">#a0ccef - (3.06666666667 %)</span> <span style=\"background:#d155a9\">#d155a9 - (0.257777777778 %)</span> <span style=\"background:#81a4ca\">#81a4ca - (4.28888888889 %)</span> <span style=\"background:#6ea5a1\">#6ea5a1 - (0.493333333333 %)</span> <span style=\"background:#2c3e95\">#2c3e95 - (0.822222222222 %)</span> <span style=\"background:#b072c2\">#b072c2 - (0.4 %)</span> <span style=\"background:#97b6dc\">#97b6dc - (0.955555555556 %)</span> <span style=\"background:#9bc6eb\">#9bc6eb - (2.55111111111 %)</span> <span style=\"background:#b29f3f\">#b29f3f - (1.33333333333 %)</span> <span style=\"background:#bc6d48\">#bc6d48 - (0.853333333333 %)</span> <span style=\"background:#3075c6\">#3075c6 - (0.72 %)</span> <span style=\"background:#44525e\">#44525e - (0.404444444444 %)</span> <span style=\"background:#9396a6\">#9396a6 - (1.02666666667 %)</span> <span style=\"background:#b9b5e8\">#b9b5e8 - (0.44 %)</span> <span style=\"background:#766cb4\">#766cb4 - (1.26666666667 %)</span> <span style=\"background:#7796bf\">#7796bf - (1.41777777778 %)</span> <span style=\"background:#9ecaec\">#9ecaec - (2.84888888889 %)</span> <span style=\"background:#4e83a5\">#4e83a5 - (0.475555555556 %)</span> <span style=\"background:#a7d4f6\">#a7d4f6 - (3.48 %)</span> <span style=\"background:#89afd5\">#89afd5 - (4.21777777778 %)</span> <span style=\"background:#a4d0f3\">#a4d0f3 - (5.28 %)</span> <span style=\"background:#2ca5e1\">#2ca5e1 - (0.844444444444 %)</span> <span style=\"background:#4881c9\">#4881c9 - (0.875555555556 %)</span> <span style=\"background:#729ed6\">#729ed6 - (0.817777777778 %)</span> <span style=\"background:#669382\">#669382 - (0.737777777778 %)</span> <span style=\"background:#92bce2\">#92bce2 - (4.49333333333 %)</span> <span style=\"background:#8ab0db\">#8ab0db - (2.87555555556 %)</span> <span style=\"background:#968a37\">#968a37 - (0.92 %)</span> <span style=\"background:#aba36b\">#aba36b - (0.911111111111 %)</span> <span style=\"background:#85a8ce\">#85a8ce - (3.76444444444 %)</span> <span style=\"background:#cd91d9\">#cd91d9 - (0.582222222222 %)</span> <span style=\"background:#a5b3be\">#a5b3be - (0.928888888889 %)</span> <span style=\"background:#8eb4db\"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#fefeff\">#fefeff - (66.7466666667 %)</span> <span style=\"background:#faeb6e\">#faeb6e - (1.53333333333 %)</span> <span style=\"background:#ecf6f8\">#ecf6f8 - (2.12444444444 %)</span> <span style=\"background:#c3c5c9\">#c3c5c9 - (0.36 %)</span> <span style=\"background:#56585d\">#56585d - (0.466666666667 %)</span> <span style=\"background:#818183\">#818183 - (0.431111111111 %)</span> <span style=\"background:#ee0c59\">#ee0c59 - (1.10666666667 %)</span> <span style=\"background:#efb0ec\">#efb0ec - (0.124444444444 %)</span> <span style=\"background:#a9a9a5\">#a9a9a5 - (0.391111111111 %)</span> <span style=\"background:#fcfdfe\">#fcfdfe - (2.30666666667 %)</span> <span style=\"background:#d9e0e2\">#d9e0e2 - (0.582222222222 %)</span> <span style=\"background:#e4eff1\">#e4eff1 - (1.20444444444 %)</span> <span style=\"background:#8e682a\">#8e682a - (0.342222222222 %)</span> <span style=\"background:#ce994c\">#ce994c - (0.315555555556 %)</span> <span style=\"background:#f7c735\">#f7c735 - (0.728888888889 %)</span> <span style=\"background:#fdfdfc\">#fdfdfc - (7.35111111111 %)</span> <span style=\"background:#f9f4ad\">#f9f4ad - (0.382222222222 %)</span> <span style=\"background:#f8c6b1\">#f8c6b1 - (0.4 %)</span> <span style=\"background:#f9de55\">#f9de55 - (1.62666666667 %)</span> <span style=\"background:#f7fcfd\">#f7fcfd - (2.63111111111 %)</span> <span style=\"background:#f2f9fb\">#f2f9fb - (3.08 %)</span> <span style=\"background:#f3f1f1\">#f3f1f1 - (0.746666666667 %)</span> <span style=\"background:#f9f089\">#f9f089 - (1.01777777778 %)</span> <span style=\"background:#fcf9d3\">#fcf9d3 - (0.346666666667 %)</span> <span style=\"background:#f9f9f9\">#f9f9f9 - (2.01777777778 %)</span> <span style=\"background:#51221f\">#51221f - (0.413333333333 %)</span> <span style=\"background:#fdfdf0\">#fdfdf0 - (0.831111111111 %)</span> <span style=\"background:#eab18a\">#eab18a - (0.391111111111 %)</span>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<span style=\"background:#b3b5b6\">#b3b5b6 - (1.60888888889 %)</span> <span style=\"background:#8d4b62\">#8d4b62 - (0.888888888889 %)</span> <span style=\"background:#a0a29b\">#a0a29b - (2.69333333333 %)</span> <span style=\"background:#985e94\">#985e94 - (0.662222222222 %)</span> <span style=\"background:#c17ba8\">#c17ba8 - (0.44 %)</span> <span style=\"background:#a8aaa6\">#a8aaa6 - (4.27555555556 %)</span> <span style=\"background:#b1b2b2\">#b1b2b2 - (2.64888888889 %)</span> <span style=\"background:#434d56\">#434d56 - (0.546666666667 %)</span> <span style=\"background:#ad929a\">#ad929a - (0.346666666667 %)</span> <span style=\"background:#965d78\">#965d78 - (1.67555555556 %)</span> <span style=\"background:#d3b88b\">#d3b88b - (0.168888888889 %)</span> <span style=\"background:#9fa49f\">#9fa49f - (2.25777777778 %)</span> <span style=\"background:#a7aaaa\">#a7aaaa - (3.33777777778 %)</span> <span style=\"background:#90908c\">#90908c - (1.28 %)</span> <span style=\"background:#5e8998\">#5e8998 - (0.244444444444 %)</span> <span style=\"background:#dfe0e2\">#dfe0e2 - (1.35555555556 %)</span> <span style=\"background:#d2d4d7\">#d2d4d7 - (1.52888888889 %)</span> <span style=\"background:#06739b\">#06739b - (0.346666666667 %)</span> <span style=\"background:#9da17b\">#9da17b - (0.462222222222 %)</span> <span style=\"background:#9ca29e\">#9ca29e - (2.63555555556 %)</span> <span style=\"background:#959692\">#959692 - (2.12444444444 %)</span> <span style=\"background:#809da9\">#809da9 - (0.32 %)</span> <span style=\"background:#1d2328\">#1d2328 - (0.884444444444 %)</span> <span style=\"background:#9d9e9c\">#9d9e9c - (2.15111111111 %)</span> <span style=\"background:#c55e4d\">#c55e4d - (0.426666666667 %)</span> <span style=\"background:#dadcde\">#dadcde - (1.84444444444 %)</span> <span style=\"background:#bbbcbd\">#bbbcbd - (1.68444444444 %)</span> <span style=\"background:#95b1ba\">#95b1ba - (0.24 %)</span> <span style=\"background:#c5c8c9\">#c5c8c9 - (1.42666666667 %)</span> <span style=\"background:#6e737e\">#6e737e - (0.768888888889 %)</span> <span style=\"background:#cacdce\">#cacdce - (1.43111111111 %)</span> <span style=\"background:#aaaca9\">#aaaca9 - (3.98222222222 %)</span> <span style=\"background:#9fa19f\">#9fa19f - (2.40444444444 %)</span> <span style=\"background:#a3a6a0\">#a3a6a0 - (2.75111111111 %)</span> <span style=\"background:#ad678c\">#ad678c - (1.19111111111 %)</span> <span style=\"background:#b6a0ab\">#b6a0ab - (0.4 %)</span> <span style=\"background:#cfd1d3\">#cfd1d3 - (1.79555555556 %)</span> <span style=\"background:#9a9d9b\">#9a9d9b - (2.75111111111 %)</span> <span style=\"background:#d798c3\">#d798c3 - (0.231111111111 %)</span> <span style=\"background:#aeb0ae\">#aeb0ae - (4.14666666667 %)</span> <span style=\"background:#879e54\">#879e54 - (0.853333333333 %)</span> <span style=\"background:#bec0c2\">#bec0c2 - (1.47111111111 %)</span> <span style=\"background:#a4a4a4\">#a4a4a4 - (1.95555555556 %)</span> <span style=\"background:#808286\">#808286 - (0.804444444444 %)</span> <span style=\"background:#a4a8a6\">#a4a8a6 - (3.12888888889 %)</span> <span style=\"background:#a47b92\">#a47b92 - (0.542222222222 %)</span> <span style=\"background:#a0a5a4\">#a0a5a4 - (2.30666666667 %)</span> <span style=\"background:#c2c4c5\">#c2c4c5 - (1.32 %)</span> <span style=\"background:#58626c\">#58626c - (0.577777777778 %)</span> <span style=\"background:#acaeab\">#acaeab - (3.47111111111 %)</span> <span style=\"background:#a64131\">#a64131 - (0.986666666667 %)</span> <span style=\"background:#a6a8a3\">#a6a8a3 - (3.08 %)</span> <span style=\"background:#aaacaf\">#aaacaf - (1.60888888889 %)</span> <span style=\"background:#045675\">#045675 - (1.63555555556 %)</span> <span style=\"background:#b6b8ba\">#b6b8ba - (1.37777777778 %)</span> <span style=\"background:#d6d8da\">#d6d8da - (1.70666666667 %)</span> <span style=\"background:#9c9f99\">#9c9f99 - (3.01777777778 %)</span> <span style=\"background:#a1a39f\">#a1a39f - (2.91555555556 %)</span> <span style=\"background:#316e85\">#316e85 - (0.293333333333 %)</span> <sp
|
||
|
],
|
||
|
"text/plain": [
|
||
|
"<IPython.core.display.HTML object>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"print(\"Get colours for all images\")\n",
|
||
|
"imgColours = []\n",
|
||
|
"for image in images:\n",
|
||
|
"# display(image)\n",
|
||
|
" colours = getColoursForImageByClusters(image)\n",
|
||
|
" imgColours.append(colours)\n",
|
||
|
" output = getColoursAsHTML(colours)\n",
|
||
|
" display(HTML(output))\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 74,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"[[[233 3 166]\n",
|
||
|
" [233 3 167]\n",
|
||
|
" [233 3 167]\n",
|
||
|
" ..., \n",
|
||
|
" [198 4 173]\n",
|
||
|
" [198 4 172]\n",
|
||
|
" [198 4 172]]\n",
|
||
|
"\n",
|
||
|
" [[233 3 167]\n",
|
||
|
" [233 3 167]\n",
|
||
|
" [233 3 168]\n",
|
||
|
" ..., \n",
|
||
|
" [198 4 173]\n",
|
||
|
" [198 4 172]\n",
|
||
|
" [198 4 172]]\n",
|
||
|
"\n",
|
||
|
" [[233 3 168]\n",
|
||
|
" [233 3 168]\n",
|
||
|
" [233 3 169]\n",
|
||
|
" ..., \n",
|
||
|
" [198 4 173]\n",
|
||
|
" [198 4 172]\n",
|
||
|
" [198 4 172]]\n",
|
||
|
"\n",
|
||
|
" ..., \n",
|
||
|
" [[ 7 17 178]\n",
|
||
|
" [ 3 16 175]\n",
|
||
|
" [ 3 15 177]\n",
|
||
|
" ..., \n",
|
||
|
" [205 8 174]\n",
|
||
|
" [221 7 172]\n",
|
||
|
" [221 7 171]]\n",
|
||
|
"\n",
|
||
|
" [[ 3 115 75]\n",
|
||
|
" [ 3 109 79]\n",
|
||
|
" [ 3 99 87]\n",
|
||
|
" ..., \n",
|
||
|
" [ 0 21 164]\n",
|
||
|
" [ 2 24 155]\n",
|
||
|
" [ 7 29 148]]\n",
|
||
|
"\n",
|
||
|
" [[ 16 186 111]\n",
|
||
|
" [ 17 179 112]\n",
|
||
|
" [ 17 184 109]\n",
|
||
|
" ..., \n",
|
||
|
" [ 13 172 105]\n",
|
||
|
" [ 15 177 105]\n",
|
||
|
" [ 15 177 105]]]\n",
|
||
|
"[[233 3 166]\n",
|
||
|
" [233 3 167]\n",
|
||
|
" [233 3 167]\n",
|
||
|
" ..., \n",
|
||
|
" [ 13 172 105]\n",
|
||
|
" [ 15 177 105]\n",
|
||
|
" [ 15 177 105]]\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"hues\n",
|
||
|
"\n",
|
||
|
"for image in images:\n",
|
||
|
" img = image.copy().resize((150, 150)).convert('HSV') # optional scale, to reduce time\n",
|
||
|
" ar = np.array(img)\n",
|
||
|
" shape = ar.shape\n",
|
||
|
" ar = ar.reshape(scipy.product(shape[:2]), shape[2])\n",
|
||
|
" \n",
|
||
|
" print(ar)\n",
|
||
|
" break\n",
|
||
|
"# Find a way to limit these per image without sacrificing the maximums in the detail\n",
|
||
|
"# Finding maximums, or _clustering_!\n",
|
||
|
" "
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 153,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"#concatenate found colours of all images into one\n",
|
||
|
"allColours = sum(imgColours)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 182,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"<svg viewBox=\"-160 -160 320 320\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"-51.7001271219\" cy=\"38.030374836\" r=\"1.99288256228\" style=\"fill:#2d3530\" /><circle cx=\"-34.4049859725\" cy=\"-88.1541524636\" r=\"2.69480519481\" style=\"fill:#322d51\" /><circle cx=\"55.1844093851\" cy=\"-14.8880599213\" r=\"1\" style=\"fill:#9e9295\" /><circle cx=\"64.1409867305\" cy=\"-11.6760039413\" r=\"1\" style=\"fill:#947d81\" /><circle cx=\"-53.8799118995\" cy=\"-6.67364078148\" r=\"1\" style=\"fill:#aeb5b6\" /><circle cx=\"49.8265732445\" cy=\"63.0938334354\" r=\"1\" style=\"fill:#b9b281\" /><circle cx=\"85.6164653701\" cy=\"-5.97282016149\" r=\"1\" style=\"fill:#a2686c\" /><circle cx=\"-67.7806952611\" cy=\"-57.1290473968\" r=\"1\" style=\"fill:#56688c\" /><circle cx=\"-94.2199518224\" cy=\"-85.5727574281\" r=\"3.38235294118\" style=\"fill:#1a3472\" /><circle cx=\"97.9360437597\" cy=\"99.0421921816\" r=\"2.64705882353\" style=\"fill:#a58111\" /><circle cx=\"136.682664482\" cy=\"30.1582894959\" r=\"1\" style=\"fill:#a32e10\" /><circle cx=\"-72.9827896955\" cy=\"-67.1111153809\" r=\"1\" style=\"fill:#3c4d76\" /><circle cx=\"55.5473329927\" cy=\"-17.6261594244\" r=\"5.62256809339\" style=\"fill:#b5a6aa\" /><circle cx=\"9.28543688052\" cy=\"-50.927773954\" r=\"8.07197943445\" style=\"fill:#b9b7ba\" /><circle cx=\"75.866149531\" cy=\"-7.01833824768\" r=\"3.28358208955\" style=\"fill:#120d0d\" /><circle cx=\"30.490340243\" cy=\"-40.4128749116\" r=\"8.04347826087\" style=\"fill:#aeadae\" /><circle cx=\"-50.0459313815\" cy=\"-42.8840080302\" r=\"1\" style=\"fill:#b2bdd4\" /><circle cx=\"97.0848112192\" cy=\"8.76996019077\" r=\"1.17647058824\" style=\"fill:#78443f\" /><circle cx=\"-26.9794619317\" cy=\"-45.6533383804\" r=\"4.89795918367\" style=\"fill:#acacb1\" /><circle cx=\"78.7620605233\" cy=\"85.5689892158\" r=\"1\" style=\"fill:#a08a36\" /><circle cx=\"133.940755495\" cy=\"-15.2433807178\" r=\"1\" style=\"fill:#941624\" /><circle cx=\"46.7748268561\" cy=\"-25.4478295459\" r=\"1\" style=\"fill:#c7c0c3\" /><circle cx=\"52.8332126997\" cy=\"-13.3162231796\" r=\"1\" style=\"fill:#5f5b5c\" /><circle cx=\"-12.8003685331\" cy=\"-52.2678380534\" r=\"4.0\" style=\"fill:#bbb9c1\" /><circle cx=\"87.4905512737\" cy=\"-14.472087817\" r=\"1\" style=\"fill:#cf7f8b\" /><circle cx=\"94.9606169688\" cy=\"-11.1487826946\" r=\"1\" style=\"fill:#c26973\" /><circle cx=\"57.6922160979\" cy=\"-7.25209869362\" r=\"1\" style=\"fill:#7c7273\" /><circle cx=\"45.6502875839\" cy=\"45.6681154007\" r=\"1\" style=\"fill:#b6b09c\" /><circle cx=\"115.412863494\" cy=\"39.1679139787\" r=\"1\" style=\"fill:#834225\" /><circle cx=\"44.3086458001\" cy=\"56.2202345028\" r=\"1\" style=\"fill:#c2bc98\" /><circle cx=\"67.2749135969\" cy=\"-12.5873143773\" r=\"1\" style=\"fill:#b49399\" /><circle cx=\"28.1362545267\" cy=\"50.1329439513\" r=\"1\" style=\"fill:#b9b9ab\" /><circle cx=\"54.4339086644\" cy=\"33.8934639346\" r=\"1\" style=\"fill:#c5b8a9\" /><circle cx=\"109.972627162\" cy=\"4.55373971686\" r=\"1\" style=\"fill:#5b2624\" /><circle cx=\"52.5400812811\" cy=\"16.7267532572\" r=\"5.64796905222\" style=\"fill:#b6afac\" /><circle cx=\"-64.3428140012\" cy=\"-39.674543242\" r=\"1\" style=\"fill:#96aec9\" /><circle cx=\"62.2980819326\" cy=\"-10.2184932594\" r=\"3.93530997305\" style=\"fill:#c3a9ad\" /><circle cx=\"43.3706982573\" cy=\"32.0961359182\" r=\"3.26347305389\" style=\"fill:#bdbab6\" /><circle cx=\"105.828347973\" cy=\"-7.77916082381\" r=\"1\" style=\"fill:#b44f56\" /><circle cx=\"-46.9739182207\" cy=\"-39.7942245784\" r=\"1\" style=\"fill:#adb4c3\" /><circle cx=\"48.2207685172\" cy=\"-28.401383484\" r=\"1.81818181818\" style=\"fill:#494446\" /><circle cx=\"66.7268629437\" cy=\"-4.88165722648\" r=\"1\" style=\"fill:#d4b0b2\" /><circle cx=\"76.9108399682\" cy=\"28.9602929706\" r=\"1\" style=\"fill:#ca9f89\" /><circle cx=\"56.4745064464\" cy=\"66.8975379657\" r=\"1\" style=\"fill:#aca16b\" /><circle cx=\"38.7823679089\" cy=\"-33.8980359211\" r=\"7.22906403941\" style=\"fill:#a7a5a7\" /><circle cx=\"12.8832189792\" cy=\"-50.1252439187\" r=\"7.930082796
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import colorsys\n",
|
||
|
"import math\n",
|
||
|
"\n",
|
||
|
"# box 160, because center or circle = 100 => +/- 50 => + r of colour circle (max: 10) => 160\n",
|
||
|
"svg = '<svg viewBox=\"-160 -160 320 320\" xmlns=\"http://www.w3.org/2000/svg\">'\n",
|
||
|
"\n",
|
||
|
"radius = 100\n",
|
||
|
"\n",
|
||
|
"for colour in allColours:\n",
|
||
|
" rgb, percentage = colour\n",
|
||
|
" rgbNorm = rgb/255\n",
|
||
|
" hsv = colorsys.rgb_to_hsv(rgbNorm[0], rgbNorm[1], rgbNorm[2])\n",
|
||
|
" # find position on circle\n",
|
||
|
" radians = 2 * math.pi * hsv[0]\n",
|
||
|
" x = math.cos(radians)\n",
|
||
|
" y = math.sin(radians)\n",
|
||
|
" \n",
|
||
|
" # based on saturation, we move inwards/outwards\n",
|
||
|
" # min = 0.5, max = 1.5 (dus + 0.5)\n",
|
||
|
" pos = np.array([x,y]) * (0.5 + hsv[1]) * radius\n",
|
||
|
" # Posibilitiy: determine position based on avg(saturation, value) => dark & grey inside, shiney and colourful outside \n",
|
||
|
" # pos = np.array([x,y]) * (0.5 + (hsv[1]+hsv[2])/2) * radius\n",
|
||
|
" r = max(1,-10/percentage+10) # as r, we converge to maximum radius 10, but don't want to get smaller radi then 1\n",
|
||
|
" c = '<circle cx=\"%s\" cy=\"%s\" r=\"%s\" style=\"fill:%s\" />' % (pos[0], pos[1], r, getColourAsHex(rgb))\n",
|
||
|
" svg += c\n",
|
||
|
"\n",
|
||
|
"svg += \"</svg>\"\n",
|
||
|
"\n",
|
||
|
"print (svg)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 228,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import json\n",
|
||
|
"\n",
|
||
|
"def coloursToJson(colours):\n",
|
||
|
" colours2 = [(list(colour[0]), colour[1]) for colour in colours]\n",
|
||
|
" return json.dumps(colours2)\n",
|
||
|
"\n",
|
||
|
"def jsonToColours(string):\n",
|
||
|
" data = json.loads(string)\n",
|
||
|
" return [(np.array(d[0]), d[1]) for d in data]\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 229,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"from peewee import *\n",
|
||
|
"from playhouse.sqlite_ext import SqliteExtDatabase\n",
|
||
|
"import datetime\n",
|
||
|
"\n",
|
||
|
"class ColoursField(TextField):\n",
|
||
|
"# db_field = 'colour'\n",
|
||
|
"\n",
|
||
|
" def db_value(self, value):\n",
|
||
|
" return coloursToJson(value)\n",
|
||
|
"\n",
|
||
|
" def python_value(self, value):\n",
|
||
|
" return jsonToColours(value) # convert str to UUID\n",
|
||
|
"\n",
|
||
|
"db = SqliteExtDatabase('images.db')\n",
|
||
|
"\n",
|
||
|
"class BaseModel(Model):\n",
|
||
|
" class Meta:\n",
|
||
|
" database = db\n",
|
||
|
" \n",
|
||
|
"class Emotion(BaseModel):\n",
|
||
|
" name = CharField(unique=True)\n",
|
||
|
" \n",
|
||
|
"class Group(BaseModel):\n",
|
||
|
" name = CharField(unique=True)\n",
|
||
|
"\n",
|
||
|
"class Artwork(BaseModel):\n",
|
||
|
" author = CharField()\n",
|
||
|
" age = SmallIntegerField(index=True)\n",
|
||
|
" gender = FixedCharField(max_length=1) # we should not really use this one\n",
|
||
|
" group = ForeignKeyField(Group, related_name='artworks', index=True)\n",
|
||
|
" emotion = ForeignKeyField(Emotion, related_name='artworks', index=True)\n",
|
||
|
" created_date = DateTimeField(default=datetime.datetime.now)\n",
|
||
|
" filename = CharField()\n",
|
||
|
" colours = ColoursField() # serialised colours + percentages: [([r,g,b], percentage), ...]\n",
|
||
|
"\n",
|
||
|
"db.connect()\n",
|
||
|
"db.create_tables([Emotion, Group, Artwork])"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 230,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"m 40\n",
|
||
|
"u 41\n",
|
||
|
"f 42\n",
|
||
|
"f 43\n",
|
||
|
"u 44\n",
|
||
|
"u 45\n",
|
||
|
"f 46\n",
|
||
|
"f 47\n",
|
||
|
"m 48\n",
|
||
|
"f 49\n",
|
||
|
"m 410\n",
|
||
|
"m 411\n",
|
||
|
"f 412\n",
|
||
|
"m 413\n",
|
||
|
"m 414\n",
|
||
|
"f 415\n",
|
||
|
"f 416\n",
|
||
|
"u 417\n",
|
||
|
"f 418\n",
|
||
|
"m 419\n",
|
||
|
"f 50\n",
|
||
|
"f 51\n",
|
||
|
"m 52\n",
|
||
|
"f 53\n",
|
||
|
"u 54\n",
|
||
|
"f 55\n",
|
||
|
"u 56\n",
|
||
|
"f 57\n",
|
||
|
"u 58\n",
|
||
|
"m 59\n",
|
||
|
"u 510\n",
|
||
|
"f 511\n",
|
||
|
"u 512\n",
|
||
|
"m 513\n",
|
||
|
"u 514\n",
|
||
|
"u 515\n",
|
||
|
"u 516\n",
|
||
|
"u 517\n",
|
||
|
"f 518\n",
|
||
|
"m 519\n",
|
||
|
"m 60\n",
|
||
|
"f 61\n",
|
||
|
"f 62\n",
|
||
|
"f 63\n",
|
||
|
"m 64\n",
|
||
|
"m 65\n",
|
||
|
"f 66\n",
|
||
|
"u 67\n",
|
||
|
"f 68\n",
|
||
|
"u 69\n",
|
||
|
"u 610\n",
|
||
|
"m 611\n",
|
||
|
"m 612\n",
|
||
|
"f 613\n",
|
||
|
"m 614\n",
|
||
|
"f 615\n",
|
||
|
"u 616\n",
|
||
|
"u 617\n",
|
||
|
"f 618\n",
|
||
|
"m 619\n",
|
||
|
"u 70\n",
|
||
|
"u 71\n",
|
||
|
"f 72\n",
|
||
|
"f 73\n",
|
||
|
"m 74\n",
|
||
|
"u 75\n",
|
||
|
"m 76\n",
|
||
|
"f 77\n",
|
||
|
"f 78\n",
|
||
|
"u 79\n",
|
||
|
"f 710\n",
|
||
|
"f 711\n",
|
||
|
"u 712\n",
|
||
|
"f 713\n",
|
||
|
"f 714\n",
|
||
|
"u 715\n",
|
||
|
"f 716\n",
|
||
|
"m 717\n",
|
||
|
"m 718\n",
|
||
|
"u 719\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import random\n",
|
||
|
"from PIL import Image\n",
|
||
|
"\n",
|
||
|
"emos = [\"anger\",\"contempt\",\"disgust\",\"fear\",\"joy\",\"sadness\",\"surprise\"]\n",
|
||
|
"emotions = []\n",
|
||
|
"for emo in emos:\n",
|
||
|
" emotion = Emotion(name=emo)\n",
|
||
|
" emotion.save()\n",
|
||
|
" emotions.append(emotion)\n",
|
||
|
"\n",
|
||
|
"# # Generate some random data:\n",
|
||
|
"for i in range(4,8):\n",
|
||
|
" group = Group.create(name='Groep %s' % i)\n",
|
||
|
" group.save()\n",
|
||
|
" \n",
|
||
|
"# some images:\n",
|
||
|
" for j in range(20):\n",
|
||
|
" genders = ['m','f','u']\n",
|
||
|
" img = Artwork()\n",
|
||
|
" img.gender = random.choice(genders)\n",
|
||
|
" img.author = \"%s %s%s\" % (img.gender, i,j)\n",
|
||
|
" img.age = i + 4 + random.choice([-1,0,0,0,0,1,1,2])\n",
|
||
|
" img.group = group\n",
|
||
|
" img.emotion = random.choice(emotions)\n",
|
||
|
" img.filename = random.choice(files)\n",
|
||
|
" img.colours = getColoursForImageByClusters(Image.open(img.filename))\n",
|
||
|
" img.save()\n",
|
||
|
" print(img.author)\n",
|
||
|
" \n",
|
||
|
"\n",
|
||
|
"# # No need to set `is_published` or `created_date` since they\n",
|
||
|
"# # will just use the default values we specified.\n",
|
||
|
"# Tweet.create(user=charlie, message='My first tweet')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 211,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"'[[[179.9060773480663, 181.53867403314916, 182.0331491712707], 1.6088888888888888], [[141.23, 75.99, 98.315], 0.8888888888888888], [[160.1976149914821, 162.10732538330495, 155.62862010221465], 2.6933333333333334], [[152.99333333333334, 94.78, 148.60666666666665], 0.6622222222222223], [[193.77777777777777, 123.0, 168.3939393939394], 0.44], [[168.1039501039501, 170.13617463617464, 166.88149688149687], 4.275555555555556], [[177.01677852348993, 178.6778523489933, 178.19463087248323], 2.648888888888889], [[67.04918032786885, 77.21311475409836, 86.59016393442623], 0.5466666666666666], [[173.30769230769232, 146.56410256410257, 154.9102564102564], 0.3466666666666667], [[150.82228116710874, 93.60212201591511, 120.54111405835543], 1.6755555555555555], [[211.6315789473684, 184.57894736842104, 139.3684210526316], 0.1688888888888889], [[159.63188976377953, 164.77165354330708, 159.78543307086613], 2.2577777777777777], [[167.3994673768309, 170.4247669773635, 170.61517976031956], 3.3377777777777777], [[144.29965156794424, 144.44947735191639, 140.27177700348432], 1.28], [[94.23636363636363, 137.83636363636364, 152.38181818181818], 0.24444444444444444], [[223.64262295081969, 224.61639344262295, 226.7934426229508], 1.3555555555555556], [[210.8168604651163, 212.86627906976744, 215.2906976744186], 1.528888888888889], [[6.594936708860759, 115.18987341772151, 155.60759493670886], 0.3466666666666667], [[157.35576923076923, 161.35576923076923, 123.125], 0.4622222222222222], [[156.63006756756758, 162.0185810810811, 158.1689189189189], 2.6355555555555554], [[149.6058091286307, 150.80705394190872, 146.56639004149378], 2.1244444444444444], [[128.13698630136986, 157.04109589041096, 169.75342465753425], 0.32], [[29.6, 35.005, 40.295], 0.8844444444444445], [[157.73553719008265, 158.5702479338843, 156.62809917355372], 2.151111111111111], [[197.83333333333334, 94.44791666666667, 77.14583333333333], 0.4266666666666667], [[218.34698795180722, 220.7710843373494, 222.83132530120483], 1.8444444444444446], [[187.10290237467018, 188.79419525065964, 189.97097625329815], 1.6844444444444444], [[149.91836734693877, 177.42857142857142, 186.6326530612245], 0.24], [[197.8785046728972, 200.45794392523365, 201.70404984423675], 1.4266666666666667], [[110.91764705882353, 115.76470588235294, 126.74117647058823], 0.7688888888888888], [[202.83540372670808, 205.35403726708074, 206.77018633540374], 1.431111111111111], [[170.44977678571428, 172.41852678571428, 169.57254464285714], 3.982222222222222], [[159.3807763401109, 161.01293900184842, 159.4898336414048], 2.4044444444444446], [[163.50565428109854, 166.2697899838449, 160.48949919224555], 2.7511111111111113], [[173.92164179104478, 103.23880597014926, 140.9589552238806], 1.191111111111111], [[182.7078651685393, 160.85393258426967, 171.7078651685393], 0.4], [[207.13366336633663, 209.55940594059405, 211.4009900990099], 1.7955555555555556], [[154.0241935483871, 157.85806451612902, 155.58709677419355], 2.7511111111111113], [[215.15384615384616, 152.19230769230768, 195.76923076923077], 0.2311111111111111], [[174.42550911039658, 176.2036441586281, 174.82636655948554], 4.1466666666666665], [[135.30208333333334, 158.20833333333334, 84.25520833333333], 0.8533333333333334], [[190.00302114803625, 192.4320241691843, 194.32628398791542], 1.471111111111111], [[164.51732101616628, 164.8337182448037, 164.13856812933025], 1.9555555555555555], [[128.25698324022346, 130.3631284916201, 134.0949720670391], 0.8044444444444444], [[164.157223796034, 168.20396600566573, 166.73796033994336], 3.128888888888889], [[164.8181818181818, 123.38842975206612, 146.38842975206612], 0.5422222222222223], [[160.0853889943074, 165.45351043643265, 164.0360531309298], 2.3066666666666666], [[194.1851851851852, 196.1077441077441, 197.27609427609428], 1.32], [[88.30882352941177, 98.70588235294117, 108.88235294117646], 0.5777777777777777], [[172.02560819462227, 174.33802816901408, 171.95774647887325], 3.471111111111111], [[166.6216216216216, 65.90090090090091, 49.932432432432435], 0.9866666666666667], [[166.16450216450215, 168.14141414141415, 163.17460317460316]
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 211,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"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.5.3"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 0
|
||
|
}
|