"\u001b[0;32m<ipython-input-21-29c839d25695>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 11\u001b[0m [1, 'magenta']],\n\u001b[1;32m 12\u001b[0m \u001b[0;31m# Intensity of each vertex, which will be interpolated and color-coded\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0mintensity\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlinspace\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m12\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mendpoint\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m \u001b[0mintensitymode\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'cell'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;31m# i, j and k give the vertices of triangles\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
" 'cabinet',\n",
"\u001b[0;31mNameError\u001b[0m: name 'np' is not defined"
" 'ceiling',\n",
]
" 'chair',\n",
" 'desk',\n",
" 'door',\n",
" 'floor',\n",
" 'lamp',\n",
" 'prop',\n",
" 'shelves',\n",
" 'television',\n",
" 'towel',\n",
" 'unknown',\n",
" 'wall',\n",
" 'window'}"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
}
],
],
"source": [
"source": [
"import plotly.graph_objects as go\n",
"classes = set()\n",
"fig = go.Figure(data=[\n",
"for labebag',\n",
" go.Mesh3d(\n",
" 'bed',\n",
" # 8 vertices of a cube\n",
" 'bookshelf',\n",
" x=[0, 0, 1, 1, 0, 0, 1, 1],\n",
" 'box',\n",
" y=[0, 1, 1, 0, 0, 1, 1, 0],\n",
" 'cabinet',\n",
" z=[0, 0, 0, 0, 1, 1, 1, 1],\n",
" 'ceiling',\n",
" colorbar_title='z',\n",
" 'chair',\n",
" colorscale=[[0, 'gold'],\n",
" 'desk',\n",
" [0.5, 'mediumturquoise'],\n",
" 'door',\n",
" [1, 'magenta']],\n",
" 'floor',\n",
" # Intensity of each vertex, which will be interpolated and color-coded\n",