{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 3331
        },
        "id": "TlmshiOs9KOA",
        "outputId": "69726cdf-c10d-4861-f6f8-3473f11cf849"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Mounted at /content/drive\n",
            "Calculating Row-wise Metrics...\n",
            "Calculating Column-wise Metrics...\n",
            "\n",
            "--- Row Metrics ---\n",
            "row_1:\n",
            "  Average PSNR: 12.75\n",
            "  Average SSIM: 45.69%\n",
            "row_2:\n",
            "  Average PSNR: 11.59\n",
            "  Average SSIM: 37.93%\n",
            "row_3:\n",
            "  Average PSNR: 11.10\n",
            "  Average SSIM: 36.03%\n",
            "row_4:\n",
            "  Average PSNR: 9.97\n",
            "  Average SSIM: 32.53%\n",
            "row_5:\n",
            "  Average PSNR: 10.37\n",
            "  Average SSIM: 31.98%\n",
            "\n",
            "--- Column Metrics ---\n",
            "col_1:\n",
            "  Average PSNR: 10.88\n",
            "  Average SSIM: 38.75%\n",
            "col_2:\n",
            "  Average PSNR: 11.07\n",
            "  Average SSIM: 34.81%\n",
            "col_3:\n",
            "  Average PSNR: 11.19\n",
            "  Average SSIM: 35.50%\n",
            "col_4:\n",
            "  Average PSNR: 11.88\n",
            "  Average SSIM: 41.08%\n",
            "col_5:\n",
            "  Average PSNR: 12.33\n",
            "  Average SSIM: 36.56%\n",
            "\n",
            "--- Row Similarity/Difference (%) ---\n",
            "row_1:\n",
            "  Average PSNR Similarity: 9.15%\n",
            "  Average SSIM Similarity: 45.69%\n",
            "row_2:\n",
            "  Average PSNR Similarity: 5.29%\n",
            "  Average SSIM Similarity: 37.93%\n",
            "row_3:\n",
            "  Average PSNR Similarity: 3.68%\n",
            "  Average SSIM Similarity: 36.03%\n",
            "row_4:\n",
            "  Average PSNR Similarity: 0.00%\n",
            "  Average SSIM Similarity: 32.53%\n",
            "row_5:\n",
            "  Average PSNR Similarity: 1.22%\n",
            "  Average SSIM Similarity: 31.98%\n",
            "\n",
            "--- Column Similarity/Difference (%) ---\n",
            "col_1:\n",
            "  Average PSNR Similarity: 2.93%\n",
            "  Average SSIM Similarity: 38.75%\n",
            "col_2:\n",
            "  Average PSNR Similarity: 3.56%\n",
            "  Average SSIM Similarity: 34.81%\n",
            "col_3:\n",
            "  Average PSNR Similarity: 3.96%\n",
            "  Average SSIM Similarity: 35.50%\n",
            "col_4:\n",
            "  Average PSNR Similarity: 6.25%\n",
            "  Average SSIM Similarity: 41.08%\n",
            "col_5:\n",
            "  Average PSNR Similarity: 7.75%\n",
            "  Average SSIM Similarity: 36.56%\n",
            "\n",
            "--- Spider Graph Summary ---\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"2c4ea16a-77a4-4cd8-abbe-50744c6da45d\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"2c4ea16a-77a4-4cd8-abbe-50744c6da45d\")) {                    Plotly.newPlot(                        \"2c4ea16a-77a4-4cd8-abbe-50744c6da45d\",                        [{\"fill\":\"toself\",\"name\":\"Average Row Similarity\",\"r\":[3.8686859506500575,36.83280959252085,3.8686859506500575],\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\"}],                        {\"polar\":{\"radialaxis\":{\"range\":[0,100],\"visible\":true}},\"title\":{\"text\":\"Average Row Similarity Metrics (Spider Graph)\"},\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('2c4ea16a-77a4-4cd8-abbe-50744c6da45d');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"da071bc5-ca22-46d9-8eef-2a7d4df1e480\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"da071bc5-ca22-46d9-8eef-2a7d4df1e480\")) {                    Plotly.newPlot(                        \"da071bc5-ca22-46d9-8eef-2a7d4df1e480\",                        [{\"fill\":\"toself\",\"name\":\"Average Column Similarity\",\"r\":[4.891578877820462,37.33972220325076,4.891578877820462],\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\"}],                        {\"polar\":{\"radialaxis\":{\"range\":[0,100],\"visible\":true}},\"title\":{\"text\":\"Average Column Similarity Metrics (Spider Graph)\"},\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('da071bc5-ca22-46d9-8eef-2a7d4df1e480');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "--- 3D Scatter Plot Summary ---\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"cf0cab05-e566-428d-bd7e-6add7bfc0ac2\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"cf0cab05-e566-428d-bd7e-6add7bfc0ac2\")) {                    Plotly.newPlot(                        \"cf0cab05-e566-428d-bd7e-6add7bfc0ac2\",                        [{\"hoverinfo\":\"text+x+y+z\",\"marker\":{\"color\":[9.152325393231838,5.2870783613765635,3.680042733114289,0.0,1.223983265527598,2.933641377506978,3.555217051666523,3.963873949105441,6.25201963182406,7.753142378999306],\"colorscale\":[[0.0,\"#440154\"],[0.1111111111111111,\"#482878\"],[0.2222222222222222,\"#3e4989\"],[0.3333333333333333,\"#31688e\"],[0.4444444444444444,\"#26828e\"],[0.5555555555555556,\"#1f9e89\"],[0.6666666666666666,\"#35b779\"],[0.7777777777777778,\"#6ece58\"],[0.8888888888888888,\"#b5de2b\"],[1.0,\"#fde725\"]],\"opacity\":0.8,\"size\":8},\"mode\":\"markers\",\"text\":[\"row_1\",\"row_2\",\"row_3\",\"row_4\",\"row_5\",\"col_1\",\"col_2\",\"col_3\",\"col_4\",\"col_5\"],\"x\":[9.152325393231838,5.2870783613765635,3.680042733114289,0.0,1.223983265527598,2.933641377506978,3.555217051666523,3.963873949105441,6.25201963182406,7.753142378999306],\"y\":[45.693588148867796,37.92752439948488,36.03371785533152,32.52939286443357,31.979824694486485,38.751010850450214,34.814543630402916,35.49548096368623,41.08147986685846,36.55609570485598],\"z\":[\"Row\",\"Row\",\"Row\",\"Row\",\"Row\",\"Column\",\"Column\",\"Column\",\"Column\",\"Column\"],\"type\":\"scatter3d\"}],                        {\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}},\"margin\":{\"l\":0,\"r\":0,\"b\":0,\"t\":40},\"title\":{\"text\":\"PSNR vs SSIM Similarity by Row\\u002fColumn (3D Scatter Plot)\"},\"scene\":{\"xaxis\":{\"title\":{\"text\":\"PSNR Similarity (%)\"}},\"yaxis\":{\"title\":{\"text\":\"SSIM Similarity (%)\"}},\"zaxis\":{\"title\":{\"text\":\"Group Type\"}}}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('cf0cab05-e566-428d-bd7e-6add7bfc0ac2');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "--- Explanation of Results ---\n",
            "English Explanation:\n",
            "\n",
            "Image Loading and Resizing:\n",
            "- Images from '/content/drive/My Drive/LoRA' were loaded and resized to 256x256 pixels to ensure consistent dimensions for metric calculations.\n",
            "\n",
            "Metrics Calculated:\n",
            "- **PSNR (Peak Signal-to-Noise Ratio):** Quantifies the difference between two images by measuring the ratio of maximum possible power of a signal to the power of corrupting noise that affects the fidelity of its representation. A *higher* PSNR value indicates a higher quality image relative to a reference image, and thus greater similarity.\n",
            "- **SSIM (Structural Similarity Index Measure):** Evaluates the similarity between two images based on three key factors: luminance, contrast, and structure. SSIM is designed to be a better measure of perceived similarity than PSNR. A value closer to 1 (or 100%) indicates higher structural similarity.\n",
            "\n",
            "Row and Column Metrics Summary:\n",
            "- The tables for 'Row Metrics' and 'Column Metrics' show the average values of PSNR, and SSIM for each row and column, respectively. For rows/columns with more than one image, these metrics are calculated by comparing each image in that row/column to the first image in that row/column, and then averaging the results.\n",
            "- PSNR and SSIM values are presented, with SSIM converted to percentage for easier interpretation (higher percentage is better).\n",
            "- The 'Row Similarity/Difference (%)' and 'Column Similarity/Difference (%)' tables provide a summary where PSNR and SSIM are shown as percentages of similarity.\n",
            "\n",
            "Spider Graph Summary:\n",
            "- Two spider graphs are presented: one for the average row similarity metrics and one for the average column similarity metrics. These graphs visually summarize the average PSNR and SSIM similarity scores, allowing for a quick comparison of overall similarity levels between rows and columns.\n",
            "\n",
            "3D Scatter Plot Summary:\n",
            "- A 3D scatter plot visualizes the PSNR and SSIM similarity scores for each individual row and column. Each point represents a row or column, with its position determined by its PSNR and SSIM similarity percentages. The third dimension (z-axis) separates the points by group type (Row or Column). This plot allows you to see the distribution and potential clustering of similarity scores for each group.\n",
            "\n",
            "Overall Interpretation:\n",
            "- By examining these metrics and visualizations, you can gain insights into the visual similarity and differences between the images in your dataset, both within rows and within columns. Higher PSNR, and higher SSIM values suggest greater similarity.\n"
          ]
        }
      ],
      "source": [
        "# - ค่า PSNR และ\n",
        "# - ค่า SSIM ของแต่ละ row และ แต่ละ col\n",
        "# - ค่า Saliency Maps\n",
        "# เพื่อดูความเหมือนและความต่าง แสดงค่า เป็น % ความเหมือนหรือความแตกต่าง ใน\n",
        "# - สรุปความหมายของค่า เป็น spider graph\n",
        "# - สรุปความหมายของค่าต่างๆ เป็น chart 3 มิติ\n",
        "# - อธิบายความหมายเป็น text in English\n",
        "\n",
        "import pandas as pd\n",
        "import os\n",
        "import numpy as np\n",
        "from PIL import Image\n",
        "# Removed tensorflow and tensorflow_hub as they are no longer needed for FID\n",
        "from skimage.metrics import structural_similarity as ssim\n",
        "from skimage.metrics import peak_signal_noise_ratio as psnr\n",
        "import matplotlib.pyplot as plt\n",
        "from mpl_toolkits.mplot3d import Axes3D\n",
        "import cv2 # OpenCV for Saliency Maps\n",
        "import plotly.graph_objects as go # Import plotly for interactive 3D scatter plot\n",
        "\n",
        "# Mount Google Drive\n",
        "from google.colab import drive\n",
        "drive.mount('/content/drive')\n",
        "\n",
        "# Define the directory containing the images\n",
        "image_dir = '/content/drive/My Drive/LoRA'\n",
        "rows = 5\n",
        "cols = 5\n",
        "\n",
        "# Define target image size\n",
        "target_size = (256, 256)\n",
        "\n",
        "# Function to load and resize image\n",
        "def load_and_resize_image(filepath):\n",
        "    try:\n",
        "        img = Image.open(filepath).convert('RGB') # Ensure RGB format\n",
        "        img_resized = img.resize(target_size)\n",
        "        return np.array(img_resized)\n",
        "    except Exception as e:\n",
        "        print(f\"Error loading or resizing image {filepath}: {e}\")\n",
        "        return None\n",
        "\n",
        "# Load and resize images\n",
        "images = {}\n",
        "for r in range(1, rows + 1):\n",
        "    for c in range(1, cols + 1):\n",
        "        filename = f'r{r}c{c}.jpg'\n",
        "        filepath = os.path.join(image_dir, filename)\n",
        "        if os.path.exists(filepath):\n",
        "            images[(r, c)] = load_and_resize_image(filepath)\n",
        "        else:\n",
        "            print(f\"Image not found: {filepath}\")\n",
        "\n",
        "# Remove None values (for images that failed to load)\n",
        "images = {k: v for k, v in images.items() if v is not None}\n",
        "\n",
        "\n",
        "# --- PSNR and SSIM Calculation ---\n",
        "def calculate_psnr_ssim(img1, img2):\n",
        "    # PSNR requires integer input (0-255 range)\n",
        "    img1_int = (img1 * 255).astype(np.uint8) if img1.max() <= 1.0 else img1.astype(np.uint8)\n",
        "    img2_int = (img2 * 255).astype(np.uint8) if img2.max() <= 1.0 else img2.astype(np.uint8)\n",
        "\n",
        "    # SSIM works best with grayscale for simplicity, or with multichannel=True\n",
        "    # For color images, calculating per channel and averaging or using multichannel=True is common\n",
        "    ssim_val = ssim(img1_int, img2_int, multichannel=True, channel_axis=2, data_range=img1_int.max() - img1_int.min())\n",
        "\n",
        "    # PSNR\n",
        "    psnr_val = psnr(img1_int, img2_int, data_range=img1_int.max() - img1_int.min())\n",
        "\n",
        "    return psnr_val, ssim_val\n",
        "\n",
        "# --- Calculate Metrics ---\n",
        "row_metrics = {}\n",
        "col_metrics = {}\n",
        "# Removed saliency_maps initialization as it's in a separate cell\n",
        "\n",
        "\n",
        "# Calculate Row-wise Metrics (compare each image in a row to the first image in that row)\n",
        "print(\"Calculating Row-wise Metrics...\")\n",
        "for r in range(1, rows + 1):\n",
        "    row_images = [images[(r, c)] for c in range(1, cols + 1) if (r, c) in images]\n",
        "    if len(row_images) > 1:\n",
        "        ref_image = row_images[0]\n",
        "        row_psnrs = []\n",
        "        row_ssims = []\n",
        "        for i in range(1, len(row_images)):\n",
        "            img = row_images[i]\n",
        "            psnr_val, ssim_val = calculate_psnr_ssim(ref_image, img)\n",
        "            row_psnrs.append(psnr_val)\n",
        "            row_ssims.append(ssim_val)\n",
        "        # Calculate average metrics for the row (excluding comparison of the first image to itself)\n",
        "        row_metrics[f'row_{r}'] = {\n",
        "            'PSNR': np.mean(row_psnrs) if row_psnrs else np.nan,\n",
        "            'SSIM': np.mean(row_ssims) if row_ssims else np.nan\n",
        "        }\n",
        "    else:\n",
        "         row_metrics[f'row_{r}'] = {'PSNR': np.nan, 'SSIM': np.nan}\n",
        "         print(f\"Not enough images in row {r} to calculate metrics.\")\n",
        "\n",
        "\n",
        "# Calculate Column-wise Metrics (compare each image in a column to the first image in that column)\n",
        "print(\"Calculating Column-wise Metrics...\")\n",
        "for c in range(1, cols + 1):\n",
        "    col_images = [images[(r, c)] for r in range(1, rows + 1) if (r, c) in images]\n",
        "    if len(col_images) > 1:\n",
        "        ref_image = col_images[0]\n",
        "        col_psnrs = []\n",
        "        col_ssims = []\n",
        "        for i in range(1, len(col_images)):\n",
        "            img = col_images[i]\n",
        "            psnr_val, ssim_val = calculate_psnr_ssim(ref_image, img)\n",
        "            col_psnrs.append(psnr_val)\n",
        "            col_ssims.append(ssim_val)\n",
        "         # Calculate average metrics for the column (excluding comparison of the first image to itself)\n",
        "        col_metrics[f'col_{c}'] = {\n",
        "            'PSNR': np.mean(col_psnrs) if col_psnrs else np.nan,\n",
        "            'SSIM': np.mean(col_ssims) if col_ssims else np.nan\n",
        "        }\n",
        "    else:\n",
        "        col_metrics[f'col_{c}'] = {'PSNR': np.nan, 'SSIM': np.nan}\n",
        "        print(f\"Not enough images in column {c} to calculate metrics.\")\n",
        "\n",
        "# --- Display Results ---\n",
        "\n",
        "print(\"\\n--- Row Metrics ---\")\n",
        "for row, metrics in row_metrics.items():\n",
        "    print(f\"{row}:\")\n",
        "    print(f\"  Average PSNR: {metrics['PSNR']:.2f}\")\n",
        "    print(f\"  Average SSIM: {metrics['SSIM'] * 100:.2f}%\") # SSIM is typically 0-1, convert to %\n",
        "\n",
        "print(\"\\n--- Column Metrics ---\")\n",
        "for col, metrics in col_metrics.items():\n",
        "    print(f\"{col}:\")\n",
        "    print(f\"  Average PSNR: {metrics['PSNR']:.2f}\")\n",
        "    print(f\"  Average SSIM: {metrics['SSIM'] * 100:.2f}%\") # SSIM is typically 0-1, convert to %\n",
        "\n",
        "# Removed Saliency Map display section\n",
        "\n",
        "# --- Summarize Metrics in % Similarity/Difference ---\n",
        "\n",
        "def get_similarity_percentage(metric_name, value):\n",
        "    if pd.isna(value):\n",
        "        return np.nan\n",
        "    elif metric_name == 'PSNR':\n",
        "        # Higher PSNR means higher similarity (lower noise/difference).\n",
        "        # PSNR is in dB. A PSNR of 20-25 dB is typically considered low quality, 30-40 dB good.\n",
        "        # Let's map PSNR to a 0-100% scale. This is also heuristic.\n",
        "        # A PSNR of 40+ could be considered near 100% similarity.\n",
        "        # A PSNR of 10 could be considered low similarity.\n",
        "        max_plausible_psnr = 40.0 # Adjusted max plausible PSNR\n",
        "        min_plausible_psnr = 10.0 # Adjusted min plausible PSNR\n",
        "        similarity = max(0, min(100, 100 * (value - min_plausible_psnr) / (max_plausible_psnr - min_plausible_psnr)))\n",
        "        return similarity\n",
        "    elif metric_name == 'SSIM':\n",
        "        # SSIM is already on a scale of 0-1, representing similarity.\n",
        "        return value * 100\n",
        "    else:\n",
        "        return np.nan\n",
        "\n",
        "row_sim_percent = {}\n",
        "col_sim_percent = {}\n",
        "\n",
        "for row, metrics in row_metrics.items():\n",
        "    row_sim_percent[row] = {\n",
        "        'PSNR': get_similarity_percentage('PSNR', metrics['PSNR']),\n",
        "        'SSIM': get_similarity_percentage('SSIM', metrics['SSIM'])\n",
        "    }\n",
        "\n",
        "for col, metrics in col_metrics.items():\n",
        "    col_sim_percent[col] = {\n",
        "        'PSNR': get_similarity_percentage('PSNR', metrics['PSNR']),\n",
        "        'SSIM': get_similarity_percentage('SSIM', metrics['SSIM'])\n",
        "    }\n",
        "\n",
        "print(\"\\n--- Row Similarity/Difference (%) ---\")\n",
        "for row, sim in row_sim_percent.items():\n",
        "    print(f\"{row}:\")\n",
        "    print(f\"  Average PSNR Similarity: {sim['PSNR']:.2f}%\")\n",
        "    print(f\"  Average SSIM Similarity: {sim['SSIM']:.2f}%\")\n",
        "\n",
        "print(\"\\n--- Column Similarity/Difference (%) ---\")\n",
        "for col, sim in col_sim_percent.items():\n",
        "    print(f\"{col}:\")\n",
        "    print(f\"  Average PSNR Similarity: {sim['PSNR']:.2f}%\")\n",
        "    print(f\"  Average SSIM Similarity: {sim['SSIM']:.2f}%\")\n",
        "\n",
        "# --- Data Preparation for Plotting ---\n",
        "\n",
        "# Prepare data for Spider Graph and 3D Scatter Plot\n",
        "metrics_labels = ['PSNR Similarity', 'SSIM Similarity']\n",
        "\n",
        "# Data for Row Spider Graph\n",
        "row_spider_values = [np.nanmean([m['PSNR'] for m in row_sim_percent.values()]),\n",
        "                     np.nanmean([m['SSIM'] for m in row_sim_percent.values()])]\n",
        "# Ensure values are within 0-100 range for plotting\n",
        "row_spider_values = [max(0, min(100, v)) if not np.isnan(v) else 0 for v in row_spider_values]\n",
        "row_spider_values += row_spider_values[:1] # Close the circle\n",
        "\n",
        "# Data for Column Spider Graph\n",
        "col_spider_values = [np.nanmean([m['PSNR'] for m in col_sim_percent.values()]),\n",
        "                     np.nanmean([m['SSIM'] for m in col_sim_percent.values()])]\n",
        "# Ensure values are within 0-100 range for plotting\n",
        "col_spider_values = [max(0, min(100, v)) if not np.isnan(v) else 0 for v in col_spider_values]\n",
        "col_spider_values += col_spider_values[:1] # Close the circle\n",
        "\n",
        "\n",
        "# Data for 3D Scatter Plot\n",
        "scatter_data = []\n",
        "for row_label, metrics in row_sim_percent.items():\n",
        "    scatter_data.append({\n",
        "        'Group': row_label,\n",
        "        'PSNR Similarity': metrics['PSNR'] if not np.isnan(metrics['PSNR']) else 0,\n",
        "        'SSIM Similarity': metrics['SSIM'] if not np.isnan(metrics['SSIM']) else 0,\n",
        "        'Type': 'Row'\n",
        "    })\n",
        "\n",
        "for col_label, metrics in col_sim_percent.items():\n",
        "    scatter_data.append({\n",
        "        'Group': col_label,\n",
        "        'PSNR Similarity': metrics['PSNR'] if not np.isnan(metrics['PSNR']) else 0,\n",
        "        'SSIM Similarity': metrics['SSIM'] if not np.isnan(metrics['SSIM']) else 0,\n",
        "        'Type': 'Column'\n",
        "    })\n",
        "\n",
        "scatter_df = pd.DataFrame(scatter_data)\n",
        "\n",
        "\n",
        "# --- Generate Spider Graphs ---\n",
        "\n",
        "print(\"\\n--- Spider Graph Summary ---\")\n",
        "\n",
        "angles = np.linspace(0, 2 * np.pi, len(metrics_labels), endpoint=False).tolist()\n",
        "angles += angles[:1] # Close the circle\n",
        "\n",
        "# Row Spider Graph\n",
        "fig_row_spider = go.Figure(\n",
        "    data=go.Scatterpolar(\n",
        "        r=row_spider_values,\n",
        "        theta=metrics_labels + [metrics_labels[0]],\n",
        "        fill='toself',\n",
        "        name='Average Row Similarity'\n",
        "    ),\n",
        "    layout=go.Layout(\n",
        "        polar=dict(\n",
        "            radialaxis=dict(\n",
        "                visible=True,\n",
        "                range=[0, 100] # Percentage range\n",
        "            )\n",
        "        ),\n",
        "        title='Average Row Similarity Metrics (Spider Graph)'\n",
        "    )\n",
        ")\n",
        "fig_row_spider.show()\n",
        "\n",
        "# Column Spider Graph\n",
        "fig_col_spider = go.Figure(\n",
        "    data=go.Scatterpolar(\n",
        "        r=col_spider_values,\n",
        "        theta=metrics_labels + [metrics_labels[0]],\n",
        "        fill='toself',\n",
        "        name='Average Column Similarity'\n",
        "    ),\n",
        "    layout=go.Layout(\n",
        "        polar=dict(\n",
        "            radialaxis=dict(\n",
        "                visible=True,\n",
        "                range=[0, 100] # Percentage range\n",
        "            )\n",
        "        ),\n",
        "        title='Average Column Similarity Metrics (Spider Graph)'\n",
        "    )\n",
        ")\n",
        "fig_col_spider.show()\n",
        "\n",
        "\n",
        "# --- Generate Interactive 3D Scatter Plot ---\n",
        "\n",
        "print(\"\\n--- 3D Scatter Plot Summary ---\")\n",
        "\n",
        "fig_scatter = go.Figure(data=[go.Scatter3d(\n",
        "    x=scatter_df['PSNR Similarity'],\n",
        "    y=scatter_df['SSIM Similarity'],\n",
        "    z=scatter_df['Type'], # Using Type for the third dimension (categorical)\n",
        "    mode='markers',\n",
        "    marker=dict(\n",
        "        size=8,\n",
        "        color=scatter_df['PSNR Similarity'], # Color by PSNR similarity\n",
        "        colorscale='Viridis',\n",
        "        opacity=0.8\n",
        "    ),\n",
        "    text=scatter_df['Group'], # Label points with Row/Column name\n",
        "    hoverinfo='text+x+y+z'\n",
        ")])\n",
        "\n",
        "# Update layout for 3D scatter plot\n",
        "fig_scatter.update_layout(\n",
        "    title='PSNR vs SSIM Similarity by Row/Column (3D Scatter Plot)',\n",
        "    scene=dict(\n",
        "        xaxis_title='PSNR Similarity (%)',\n",
        "        yaxis_title='SSIM Similarity (%)',\n",
        "        zaxis_title='Group Type' # Label for the categorical z-axis\n",
        "    ),\n",
        "    margin=dict(l=0, r=0, b=0, t=40)\n",
        ")\n",
        "\n",
        "fig_scatter.show()\n",
        "\n",
        "\n",
        "# --- Explanation in English ---\n",
        "\n",
        "print(\"\\n--- Explanation of Results ---\")\n",
        "print(\"English Explanation:\")\n",
        "\n",
        "print(\"\\nImage Loading and Resizing:\")\n",
        "print(f\"- Images from '/content/drive/My Drive/LoRA' were loaded and resized to {target_size[0]}x{target_size[1]} pixels to ensure consistent dimensions for metric calculations.\")\n",
        "\n",
        "print(\"\\nMetrics Calculated:\")\n",
        "# Updated explanation to only include PSNR and SSIM\n",
        "print(\"- **PSNR (Peak Signal-to-Noise Ratio):** Quantifies the difference between two images by measuring the ratio of maximum possible power of a signal to the power of corrupting noise that affects the fidelity of its representation. A *higher* PSNR value indicates a higher quality image relative to a reference image, and thus greater similarity.\")\n",
        "print(\"- **SSIM (Structural Similarity Index Measure):** Evaluates the similarity between two images based on three key factors: luminance, contrast, and structure. SSIM is designed to be a better measure of perceived similarity than PSNR. A value closer to 1 (or 100%) indicates higher structural similarity.\")\n",
        "# Removed FID and Saliency Maps from explanation\n",
        "print(\"\\nRow and Column Metrics Summary:\")\n",
        "print(\"- The tables for 'Row Metrics' and 'Column Metrics' show the average values of PSNR, and SSIM for each row and column, respectively. For rows/columns with more than one image, these metrics are calculated by comparing each image in that row/column to the first image in that row/column, and then averaging the results.\")\n",
        "print(f\"- PSNR and SSIM values are presented, with SSIM converted to percentage for easier interpretation (higher percentage is better).\")\n",
        "print(\"- The 'Row Similarity/Difference (%)' and 'Column Similarity/Difference (%)' tables provide a summary where PSNR and SSIM are shown as percentages of similarity.\")\n",
        "\n",
        "print(\"\\nSpider Graph Summary:\")\n",
        "# Updated explanation and metrics labels and separate graphs\n",
        "print(\"- Two spider graphs are presented: one for the average row similarity metrics and one for the average column similarity metrics. These graphs visually summarize the average PSNR and SSIM similarity scores, allowing for a quick comparison of overall similarity levels between rows and columns.\")\n",
        "\n",
        "print(\"\\n3D Scatter Plot Summary:\")\n",
        "# Updated explanation and metrics labels and separate graphs\n",
        "print(\"- A 3D scatter plot visualizes the PSNR and SSIM similarity scores for each individual row and column. Each point represents a row or column, with its position determined by its PSNR and SSIM similarity percentages. The third dimension (z-axis) separates the points by group type (Row or Column). This plot allows you to see the distribution and potential clustering of similarity scores for each group.\")\n",
        "\n",
        "print(\"\\nOverall Interpretation:\")\n",
        "# Updated explanation\n",
        "print(\"- By examining these metrics and visualizations, you can gain insights into the visual similarity and differences between the images in your dataset, both within rows and within columns. Higher PSNR, and higher SSIM values suggest greater similarity.\")"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import os\n",
        "import numpy as np\n",
        "import cv2\n",
        "from skimage.metrics import peak_signal_noise_ratio, structural_similarity\n",
        "from scipy.spatial import distance\n",
        "from google.colab import drive\n",
        "import plotly.express as px\n",
        "import pandas as pd\n",
        "from PIL import Image\n",
        "\n",
        "# Mount Google Drive\n",
        "drive.mount('/content/drive')\n",
        "\n",
        "# Define the directory\n",
        "image_dir = '/content/drive/My Drive/LoRA'\n",
        "\n",
        "# Define target size for resizing\n",
        "target_size = (256, 256)\n",
        "\n",
        "# Function to resize images\n",
        "def resize_image(img_path, target_size):\n",
        "    img = cv2.imread(img_path)\n",
        "    if img is None:\n",
        "        return None\n",
        "    return cv2.resize(img, target_size)\n",
        "\n",
        "# Function to calculate Color Histogram Cosine Distance\n",
        "def color_hist_distance(img1, img2):\n",
        "    hist1 = cv2.calcHist([img1], [0, 1, 2], None, [8, 8, 8], [0, 256, 0, 256, 0, 256])\n",
        "    hist2 = cv2.calcHist([img2], [0, 1, 2], None, [8, 8, 8], [0, 256, 0, 256, 0, 256])\n",
        "    hist1 = cv2.normalize(hist1, hist1).flatten()\n",
        "    hist2 = cv2.normalize(hist2, hist2).flatten()\n",
        "    return distance.cosine(hist1, hist2)\n",
        "\n",
        "# Function to calculate Edge Feature Cosine Distance (using Canny edge detection)\n",
        "def edge_feature_distance(img1, img2):\n",
        "    edges1 = cv2.Canny(cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY), 100, 200)\n",
        "    edges2 = cv2.Canny(cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY), 100, 200)\n",
        "    edges1 = edges1.flatten()\n",
        "    edges2 = edges2.flatten()\n",
        "    # Pad with zeros if lengths are different (can happen with Canny)\n",
        "    max_len = max(len(edges1), len(edges2))\n",
        "    edges1 = np.pad(edges1, (0, max_len - len(edges1)), 'constant')\n",
        "    edges2 = np.pad(edges2, (0, max_len - len(edges2)), 'constant')\n",
        "    return distance.cosine(edges1, edges2)\n",
        "\n",
        "# Load and resize images\n",
        "images = {}\n",
        "for r in range(1, 6):\n",
        "    for c in range(1, 6):\n",
        "        img_name = f'r{r}c{c}.jpg'\n",
        "        img_path = os.path.join(image_dir, img_name)\n",
        "        resized_img = resize_image(img_path, target_size)\n",
        "        if resized_img is not None:\n",
        "            images[(r, c)] = resized_img\n",
        "        else:\n",
        "            print(f\"Warning: Could not load or resize {img_name}\")\n",
        "\n",
        "# Calculate metrics for each row and column\n",
        "row_metrics = {}\n",
        "col_metrics = {}\n",
        "\n",
        "# Calculate metrics for rows\n",
        "for r in range(1, 6):\n",
        "    row_images = [images[(r, c)] for c in range(1, 6) if (r, c) in images]\n",
        "    if len(row_images) > 1:\n",
        "        psnr_list = []\n",
        "        ssim_list = []\n",
        "        mse_list = []\n",
        "        color_hist_list = []\n",
        "        edge_feature_list = []\n",
        "        for i in range(len(row_images)):\n",
        "            for j in range(i + 1, len(row_images)):\n",
        "                img1 = row_images[i]\n",
        "                img2 = row_images[j]\n",
        "                psnr_list.append(peak_signal_noise_ratio(img1, img2))\n",
        "                ssim_list.append(structural_similarity(img1, img2, channel_axis=2))\n",
        "                mse_list.append(np.mean((img1 - img2)**2))\n",
        "                color_hist_list.append(color_hist_distance(img1, img2))\n",
        "                edge_feature_list.append(edge_feature_distance(img1, img2))\n",
        "\n",
        "        # Aggregate metrics for the row (e.g., average)\n",
        "        row_metrics[f'Row {r}'] = {\n",
        "            'PSNR': np.mean(psnr_list) if psnr_list else np.nan,\n",
        "            'SSIM': np.mean(ssim_list) if ssim_list else np.nan,\n",
        "            'MSE': np.mean(mse_list) if mse_list else np.nan,\n",
        "            'Color_Hist_Dist': np.mean(color_hist_list) if color_hist_list else np.nan,\n",
        "            'Edge_Feature_Dist': np.mean(edge_feature_list) if edge_feature_list else np.nan\n",
        "        }\n",
        "\n",
        "# Calculate metrics for columns\n",
        "for c in range(1, 6):\n",
        "    col_images = [images[(r, c)] for r in range(1, 6) if (r, c) in images]\n",
        "    if len(col_images) > 1:\n",
        "        psnr_list = []\n",
        "        ssim_list = []\n",
        "        mse_list = []\n",
        "        color_hist_list = []\n",
        "        edge_feature_list = []\n",
        "        for i in range(len(col_images)):\n",
        "            for j in range(i + 1, len(col_images)):\n",
        "                img1 = col_images[i]\n",
        "                img2 = col_images[j]\n",
        "                psnr_list.append(peak_signal_noise_ratio(img1, img2))\n",
        "                ssim_list.append(structural_similarity(img1, img2, channel_axis=2))\n",
        "                mse_list.append(np.mean((img1 - img2)**2))\n",
        "                color_hist_list.append(color_hist_distance(img1, img2))\n",
        "                edge_feature_list.append(edge_feature_distance(img1, img2))\n",
        "\n",
        "        # Aggregate metrics for the column (e.g., average)\n",
        "        col_metrics[f'Col {c}'] = {\n",
        "            'PSNR': np.mean(psnr_list) if psnr_list else np.nan,\n",
        "            'SSIM': np.mean(ssim_list) if ssim_list else np.nan,\n",
        "            'MSE': np.mean(mse_list) if mse_list else np.nan,\n",
        "            'Color_Hist_Dist': np.mean(color_hist_list) if color_hist_list else np.nan,\n",
        "            'Edge_Feature_Dist': np.mean(edge_feature_list) if edge_feature_list else np.nan\n",
        "        }\n",
        "\n",
        "# Combine row and column metrics\n",
        "all_metrics = {**row_metrics, **col_metrics}\n",
        "\n",
        "# Normalize metrics to be between 0 and 1\n",
        "# Note: PSNR and SSIM are typically higher for more similarity, MSE and distances are lower.\n",
        "# We'll normalize similarity metrics (PSNR, SSIM) directly, and inverse distance metrics (MSE, distances) for consistency in spider plot.\n",
        "# A higher value on the spider plot means more *similarity*.\n",
        "\n",
        "normalized_metrics = {}\n",
        "metrics_df = pd.DataFrame.from_dict(all_metrics, orient='index')\n",
        "\n",
        "# Normalize metrics to be between 0 and 1 (higher = more similar)\n",
        "# For PSNR and SSIM, directly normalize (min-max scaling)\n",
        "metrics_df['PSNR_norm'] = (metrics_df['PSNR'] - metrics_df['PSNR'].min()) / (metrics_df['PSNR'].max() - metrics_df['PSNR'].min())\n",
        "metrics_df['SSIM_norm'] = metrics_df['SSIM'] # SSIM is already 0-1\n",
        "\n",
        "# For MSE, Color_Hist_Dist, Edge_Feature_Dist, inverse normalize (higher distance/error means less similar)\n",
        "# We'll use 1 - normalized distance/error, so a higher value indicates more similarity\n",
        "metrics_df['MSE_norm'] = 1 - (metrics_df['MSE'] - metrics_df['MSE'].min()) / (metrics_df['MSE'].max() - metrics_df['MSE'].min())\n",
        "metrics_df['Color_Hist_Sim'] = 1 - (metrics_df['Color_Hist_Dist'] - metrics_df['Color_Hist_Dist'].min()) / (metrics_df['Color_Hist_Dist'].max() - metrics_df['Color_Hist_Dist'].min())\n",
        "metrics_df['Edge_Feature_Sim'] = 1 - (metrics_df['Edge_Feature_Dist'] - metrics_df['Edge_Feature_Dist'].min()) / (metrics_df['Edge_Feature_Dist'].max() - metrics_df['Edge_Feature_Dist'].min())\n",
        "\n",
        "# Select normalized similarity columns and rename for spider plot\n",
        "spider_df = metrics_df[['PSNR_norm', 'SSIM_norm', 'MSE_norm', 'Color_Hist_Sim', 'Edge_Feature_Sim']].copy()\n",
        "spider_df.columns = ['PSNR Similarity', 'SSIM Similarity', 'MSE Similarity', 'Color Histogram Similarity', 'Edge Feature Similarity']\n",
        "spider_df = spider_df.reset_index().rename(columns={'index': 'Group'})\n",
        "\n",
        "# Convert to long format for Plotly Express spider plot\n",
        "spider_long_df = spider_df.melt(id_vars='Group', var_name='Metric', value_name='Similarity')\n",
        "\n",
        "# Create Spider Graph\n",
        "fig_spider = px.line_polar(spider_long_df, r=\"Similarity\", theta=\"Metric\", color=\"Group\", line_close=True,\n",
        "                           title=\"Image Similarity Metrics (Normalized)\")\n",
        "fig_spider.update_traces(fill='toself')\n",
        "fig_spider.show()\n",
        "\n",
        "# Summarize Spider Graph meaning in a table\n",
        "spider_summary = {\n",
        "    \"Metric\": ['PSNR Similarity', 'SSIM Similarity', 'MSE Similarity', 'Color Histogram Similarity', 'Edge Feature Similarity'],\n",
        "    \"Meaning (Higher Value)\": [\n",
        "        \"Higher Peak Signal-to-Noise Ratio (better image quality, less noise/loss from compression/processing)\",\n",
        "        \"Higher Structural Similarity Index (more similar perceived structure/texture)\",\n",
        "        \"Lower Mean Squared Error (less average pixel difference, higher similarity)\", # Note: MSE_norm is 1-MSE, so higher means lower MSE\n",
        "        \"Lower Color Histogram Cosine Distance (more similar color distribution, higher similarity)\", # Note: Color_Hist_Sim is 1-dist, so higher means lower distance\n",
        "        \"Lower Edge Feature Cosine Distance (more similar edge patterns, higher similarity)\" # Note: Edge_Feature_Sim is 1-dist, so higher means lower distance\n",
        "    ],\n",
        "    \"Interpretation\": [\n",
        "        \"Measures pixel-level difference, sensitive to noise.\",\n",
        "        \"Measures structural similarity based on luminance, contrast, and structure.\",\n",
        "        \"Measures average squared difference between pixels.\",\n",
        "        \"Compares the overall distribution of colors.\",\n",
        "        \"Compares the patterns of edges in the images.\"\n",
        "    ]\n",
        "}\n",
        "spider_summary_df = pd.DataFrame(spider_summary)\n",
        "print(\"\\n--- Spider Graph Metric Summary ---\")\n",
        "from IPython.display import display\n",
        "display(spider_summary_df)\n",
        "\n",
        "\n",
        "# Create 3D Scatter Plot\n",
        "# We can choose three relevant metrics to plot in 3D\n",
        "scatter_df = metrics_df.reset_index().rename(columns={'index': 'Group'})\n",
        "fig_scatter_3d = px.scatter_3d(scatter_df,\n",
        "                              x='PSNR_norm',\n",
        "                              y='SSIM_norm',\n",
        "                              z='Color_Hist_Sim',\n",
        "                              color='Group',\n",
        "                              hover_name='Group',\n",
        "                              title='3D Scatter Plot of Image Similarity Metrics (Normalized)')\n",
        "\n",
        "fig_scatter_3d.update_layout(scene = dict(\n",
        "    xaxis_title='PSNR Similarity',\n",
        "    yaxis_title='SSIM Similarity',\n",
        "    zaxis_title='Color Histogram Similarity'))\n",
        "\n",
        "fig_scatter_3d.show()\n",
        "\n",
        "# Explanation of the 3D Scatter Plot\n",
        "print(\"\\n--- 3D Scatter Plot Explanation ---\")\n",
        "print(\"This 3D scatter plot visualizes the relationships between three different image similarity metrics (PSNR Similarity, SSIM Similarity, and Color Histogram Similarity) for each row and column of images.\")\n",
        "print(\"- Each point represents a specific row or column (e.g., 'Row 1', 'Col 5').\")\n",
        "print(\"- The position of the point along the X-axis indicates its PSNR Similarity score (normalized 0-1).\")\n",
        "print(\"- The position along the Y-axis indicates its SSIM Similarity score (normalized 0-1).\")\n",
        "print(\"- The position along the Z-axis indicates its Color Histogram Similarity score (normalized 0-1).\")\n",
        "print(\"- Points that are clustered together in the 3D space represent rows or columns where the images within them are similarly related across these three metrics.\")\n",
        "print(\"- The color of each point distinguishes the specific row or column.\")\n",
        "print(\"- You can interact with the plot by rotating it, zooming in/out, and hovering over points to see their exact values and associated row/column.\")\n",
        "print(\"- This plot helps to identify groups of rows or columns that exhibit similar patterns of variation across the chosen metrics. For example, if all column points cluster separately from all row points, it might suggest that the images within columns are more similar to each other than images within rows, or vice versa, based on these metrics.\")\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1589
        },
        "id": "ktFvSDGB90Vw",
        "outputId": "b7cbfb1b-acce-4a5f-c448-bc94537e1cd9"
      },
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.11/dist-packages/scipy/spatial/distance.py:682: RuntimeWarning:\n",
            "\n",
            "overflow encountered in scalar multiply\n",
            "\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"949b0b21-8263-4754-aedb-39066afe8efb\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"949b0b21-8263-4754-aedb-39066afe8efb\")) {                    Plotly.newPlot(                        \"949b0b21-8263-4754-aedb-39066afe8efb\",                        [{\"hovertemplate\":\"Group=Row 1\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 1\",\"line\":{\"color\":\"#636efa\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 1\",\"r\":[1.0,0.4845354281292207,1.0,1.0,1.0,1.0],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 2\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 2\",\"line\":{\"color\":\"#EF553B\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 2\",\"r\":[0.5563148526024102,0.42473043357356416,0.16093473375632628,0.960853099822998,1.0,0.5563148526024102],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 3\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 3\",\"line\":{\"color\":\"#00cc96\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 3\",\"r\":[0.4207027945252217,0.4230142014132946,0.3009026143914558,0.5770163536071777,0.3377603852715563,0.4207027945252217],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 4\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 4\",\"line\":{\"color\":\"#ab63fa\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 4\",\"r\":[0.22326566947151827,0.41497184899343137,0.4228257597706646,0.3396196961402893,1.0,0.22326566947151827],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 5\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 5\",\"line\":{\"color\":\"#FFA15A\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 5\",\"r\":[0.0,0.34635686991104664,0.0,0.0,1.0,0.0],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 1\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 1\",\"line\":{\"color\":\"#19d3f3\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 1\",\"r\":[0.24223845226865806,0.3946095448701738,0.6465654172951382,0.9143924117088318,0.27065456687848266,0.24223845226865806],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 2\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 2\",\"line\":{\"color\":\"#FF6692\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 2\",\"r\":[0.3665961030171964,0.38602324767227864,0.26969119621112037,0.5175336599349976,1.0,0.3665961030171964],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 3\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 3\",\"line\":{\"color\":\"#B6E880\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 3\",\"r\":[0.5374324285887736,0.42070391337250423,0.14880498273281684,0.2812334895133972,0.21656212408004127,0.5374324285887736],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 4\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 4\",\"line\":{\"color\":\"#FF97FF\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 4\",\"r\":[0.2772920761659916,0.4430225185826603,0.26996768408623784,0.370786190032959,1.0,0.2772920761659916],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 5\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 5\",\"line\":{\"color\":\"#FECB52\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 5\",\"r\":[0.4047724344626801,0.41103584143176713,0.12907711559404378,0.4270327091217041,0.0,0.4047724344626801],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"}],                        {\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}},\"polar\":{\"domain\":{\"x\":[0.0,1.0],\"y\":[0.0,1.0]},\"angularaxis\":{\"direction\":\"clockwise\",\"rotation\":90}},\"legend\":{\"title\":{\"text\":\"Group\"},\"tracegroupgap\":0},\"title\":{\"text\":\"Image Similarity Metrics (Normalized)\"}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('949b0b21-8263-4754-aedb-39066afe8efb');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "--- Spider Graph Metric Summary ---\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "                       Metric  \\\n",
              "0             PSNR Similarity   \n",
              "1             SSIM Similarity   \n",
              "2              MSE Similarity   \n",
              "3  Color Histogram Similarity   \n",
              "4     Edge Feature Similarity   \n",
              "\n",
              "                              Meaning (Higher Value)  \\\n",
              "0  Higher Peak Signal-to-Noise Ratio (better imag...   \n",
              "1  Higher Structural Similarity Index (more simil...   \n",
              "2  Lower Mean Squared Error (less average pixel d...   \n",
              "3  Lower Color Histogram Cosine Distance (more si...   \n",
              "4  Lower Edge Feature Cosine Distance (more simil...   \n",
              "\n",
              "                                      Interpretation  \n",
              "0  Measures pixel-level difference, sensitive to ...  \n",
              "1  Measures structural similarity based on lumina...  \n",
              "2  Measures average squared difference between pi...  \n",
              "3       Compares the overall distribution of colors.  \n",
              "4      Compares the patterns of edges in the images.  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-4bf12a07-5e69-40d1-aa12-8f14c5f74ad7\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Metric</th>\n",
              "      <th>Meaning (Higher Value)</th>\n",
              "      <th>Interpretation</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>PSNR Similarity</td>\n",
              "      <td>Higher Peak Signal-to-Noise Ratio (better imag...</td>\n",
              "      <td>Measures pixel-level difference, sensitive to ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>SSIM Similarity</td>\n",
              "      <td>Higher Structural Similarity Index (more simil...</td>\n",
              "      <td>Measures structural similarity based on lumina...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>MSE Similarity</td>\n",
              "      <td>Lower Mean Squared Error (less average pixel d...</td>\n",
              "      <td>Measures average squared difference between pi...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Color Histogram Similarity</td>\n",
              "      <td>Lower Color Histogram Cosine Distance (more si...</td>\n",
              "      <td>Compares the overall distribution of colors.</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Edge Feature Similarity</td>\n",
              "      <td>Lower Edge Feature Cosine Distance (more simil...</td>\n",
              "      <td>Compares the patterns of edges in the images.</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-4bf12a07-5e69-40d1-aa12-8f14c5f74ad7')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-4bf12a07-5e69-40d1-aa12-8f14c5f74ad7 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-4bf12a07-5e69-40d1-aa12-8f14c5f74ad7');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "    <div id=\"df-e2771313-5189-4fb8-8996-756fb187751a\">\n",
              "      <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-e2771313-5189-4fb8-8996-756fb187751a')\"\n",
              "                title=\"Suggest charts\"\n",
              "                style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "      </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "      <script>\n",
              "        async function quickchart(key) {\n",
              "          const quickchartButtonEl =\n",
              "            document.querySelector('#' + key + ' button');\n",
              "          quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "          quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "          try {\n",
              "            const charts = await google.colab.kernel.invokeFunction(\n",
              "                'suggestCharts', [key], {});\n",
              "          } catch (error) {\n",
              "            console.error('Error during call to suggestCharts:', error);\n",
              "          }\n",
              "          quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "          quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "        }\n",
              "        (() => {\n",
              "          let quickchartButtonEl =\n",
              "            document.querySelector('#df-e2771313-5189-4fb8-8996-756fb187751a button');\n",
              "          quickchartButtonEl.style.display =\n",
              "            google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "        })();\n",
              "      </script>\n",
              "    </div>\n",
              "\n",
              "  <div id=\"id_02a2f49c-d0fa-4baa-b557-a8a822caab3e\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('spider_summary_df')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_02a2f49c-d0fa-4baa-b557-a8a822caab3e button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('spider_summary_df');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "spider_summary_df",
              "summary": "{\n  \"name\": \"spider_summary_df\",\n  \"rows\": 5,\n  \"fields\": [\n    {\n      \"column\": \"Metric\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 5,\n        \"samples\": [\n          \"SSIM Similarity\",\n          \"Edge Feature Similarity\",\n          \"MSE Similarity\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Meaning (Higher Value)\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 5,\n        \"samples\": [\n          \"Higher Structural Similarity Index (more similar perceived structure/texture)\",\n          \"Lower Edge Feature Cosine Distance (more similar edge patterns, higher similarity)\",\n          \"Lower Mean Squared Error (less average pixel difference, higher similarity)\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Interpretation\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 5,\n        \"samples\": [\n          \"Measures structural similarity based on luminance, contrast, and structure.\",\n          \"Compares the patterns of edges in the images.\",\n          \"Measures average squared difference between pixels.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"8627da6b-5c55-409a-ae51-64416977165c\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"8627da6b-5c55-409a-ae51-64416977165c\")) {                    Plotly.newPlot(                        \"8627da6b-5c55-409a-ae51-64416977165c\",                        [{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 1\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 1\"],\"legendgroup\":\"Row 1\",\"marker\":{\"color\":\"#636efa\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 1\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[1.0],\"y\":[0.4845354281292207],\"z\":[1.0],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 2\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 2\"],\"legendgroup\":\"Row 2\",\"marker\":{\"color\":\"#EF553B\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 2\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.5563148526024102],\"y\":[0.42473043357356416],\"z\":[0.9608531],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 3\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 3\"],\"legendgroup\":\"Row 3\",\"marker\":{\"color\":\"#00cc96\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 3\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.4207027945252217],\"y\":[0.4230142014132946],\"z\":[0.57701635],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 4\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 4\"],\"legendgroup\":\"Row 4\",\"marker\":{\"color\":\"#ab63fa\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 4\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.22326566947151827],\"y\":[0.41497184899343137],\"z\":[0.3396197],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 5\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 5\"],\"legendgroup\":\"Row 5\",\"marker\":{\"color\":\"#FFA15A\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 5\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.0],\"y\":[0.34635686991104664],\"z\":[0.0],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 1\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 1\"],\"legendgroup\":\"Col 1\",\"marker\":{\"color\":\"#19d3f3\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 1\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.24223845226865806],\"y\":[0.3946095448701738],\"z\":[0.9143924],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 2\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 2\"],\"legendgroup\":\"Col 2\",\"marker\":{\"color\":\"#FF6692\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 2\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.3665961030171964],\"y\":[0.38602324767227864],\"z\":[0.51753366],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 3\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 3\"],\"legendgroup\":\"Col 3\",\"marker\":{\"color\":\"#B6E880\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 3\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.5374324285887736],\"y\":[0.42070391337250423],\"z\":[0.2812335],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 4\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 4\"],\"legendgroup\":\"Col 4\",\"marker\":{\"color\":\"#FF97FF\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 4\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.2772920761659916],\"y\":[0.4430225185826603],\"z\":[0.3707862],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 5\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 5\"],\"legendgroup\":\"Col 5\",\"marker\":{\"color\":\"#FECB52\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 5\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.4047724344626801],\"y\":[0.41103584143176713],\"z\":[0.4270327],\"type\":\"scatter3d\"}],                        {\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}},\"scene\":{\"domain\":{\"x\":[0.0,1.0],\"y\":[0.0,1.0]},\"xaxis\":{\"title\":{\"text\":\"PSNR Similarity\"}},\"yaxis\":{\"title\":{\"text\":\"SSIM Similarity\"}},\"zaxis\":{\"title\":{\"text\":\"Color Histogram Similarity\"}}},\"legend\":{\"title\":{\"text\":\"Group\"},\"tracegroupgap\":0},\"title\":{\"text\":\"3D Scatter Plot of Image Similarity Metrics (Normalized)\"}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('8627da6b-5c55-409a-ae51-64416977165c');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "--- 3D Scatter Plot Explanation ---\n",
            "This 3D scatter plot visualizes the relationships between three different image similarity metrics (PSNR Similarity, SSIM Similarity, and Color Histogram Similarity) for each row and column of images.\n",
            "- Each point represents a specific row or column (e.g., 'Row 1', 'Col 5').\n",
            "- The position of the point along the X-axis indicates its PSNR Similarity score (normalized 0-1).\n",
            "- The position along the Y-axis indicates its SSIM Similarity score (normalized 0-1).\n",
            "- The position along the Z-axis indicates its Color Histogram Similarity score (normalized 0-1).\n",
            "- Points that are clustered together in the 3D space represent rows or columns where the images within them are similarly related across these three metrics.\n",
            "- The color of each point distinguishes the specific row or column.\n",
            "- You can interact with the plot by rotating it, zooming in/out, and hovering over points to see their exact values and associated row/column.\n",
            "- This plot helps to identify groups of rows or columns that exhibit similar patterns of variation across the chosen metrics. For example, if all column points cluster separately from all row points, it might suggest that the images within columns are more similar to each other than images within rows, or vice versa, based on these metrics.\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import os\n",
        "import numpy as np\n",
        "import cv2\n",
        "from skimage.metrics import peak_signal_noise_ratio, structural_similarity\n",
        "from scipy.spatial import distance\n",
        "from google.colab import drive\n",
        "import plotly.express as px\n",
        "import pandas as pd\n",
        "from PIL import Image\n",
        "\n",
        "# Mount Google Drive\n",
        "drive.mount('/content/drive')\n",
        "\n",
        "# Define the directory\n",
        "image_dir = '/content/drive/My Drive/LoRA-afterAdj'\n",
        "\n",
        "# Define target size for resizing\n",
        "target_size = (256, 256)\n",
        "\n",
        "# Function to resize images\n",
        "def resize_image(img_path, target_size):\n",
        "    img = cv2.imread(img_path)\n",
        "    if img is None:\n",
        "        return None\n",
        "    return cv2.resize(img, target_size)\n",
        "\n",
        "# Function to calculate Color Histogram Cosine Distance\n",
        "def color_hist_distance(img1, img2):\n",
        "    hist1 = cv2.calcHist([img1], [0, 1, 2], None, [8, 8, 8], [0, 256, 0, 256, 0, 256])\n",
        "    hist2 = cv2.calcHist([img2], [0, 1, 2], None, [8, 8, 8], [0, 256, 0, 256, 0, 256])\n",
        "    hist1 = cv2.normalize(hist1, hist1).flatten()\n",
        "    hist2 = cv2.normalize(hist2, hist2).flatten()\n",
        "    return distance.cosine(hist1, hist2)\n",
        "\n",
        "# Function to calculate Edge Feature Cosine Distance (using Canny edge detection)\n",
        "def edge_feature_distance(img1, img2):\n",
        "    edges1 = cv2.Canny(cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY), 100, 200)\n",
        "    edges2 = cv2.Canny(cv2.cvtColor(img2, cv2.COLOR_BGR2GRAY), 100, 200)\n",
        "    edges1 = edges1.flatten()\n",
        "    edges2 = edges2.flatten()\n",
        "    # Pad with zeros if lengths are different (can happen with Canny)\n",
        "    max_len = max(len(edges1), len(edges2))\n",
        "    edges1 = np.pad(edges1, (0, max_len - len(edges1)), 'constant')\n",
        "    edges2 = np.pad(edges2, (0, max_len - len(edges2)), 'constant')\n",
        "    return distance.cosine(edges1, edges2)\n",
        "\n",
        "# Load and resize images\n",
        "images = {}\n",
        "for r in range(1, 6):\n",
        "    for c in range(1, 6):\n",
        "        img_name = f'r{r}c{c}.jpg'\n",
        "        img_path = os.path.join(image_dir, img_name)\n",
        "        resized_img = resize_image(img_path, target_size)\n",
        "        if resized_img is not None:\n",
        "            images[(r, c)] = resized_img\n",
        "        else:\n",
        "            print(f\"Warning: Could not load or resize {img_name}\")\n",
        "\n",
        "# Calculate metrics for each row and column\n",
        "row_metrics = {}\n",
        "col_metrics = {}\n",
        "\n",
        "# Calculate metrics for rows\n",
        "for r in range(1, 6):\n",
        "    row_images = [images[(r, c)] for c in range(1, 6) if (r, c) in images]\n",
        "    if len(row_images) > 1:\n",
        "        psnr_list = []\n",
        "        ssim_list = []\n",
        "        mse_list = []\n",
        "        color_hist_list = []\n",
        "        edge_feature_list = []\n",
        "        for i in range(len(row_images)):\n",
        "            for j in range(i + 1, len(row_images)):\n",
        "                img1 = row_images[i]\n",
        "                img2 = row_images[j]\n",
        "                psnr_list.append(peak_signal_noise_ratio(img1, img2))\n",
        "                ssim_list.append(structural_similarity(img1, img2, channel_axis=2))\n",
        "                mse_list.append(np.mean((img1 - img2)**2))\n",
        "                color_hist_list.append(color_hist_distance(img1, img2))\n",
        "                edge_feature_list.append(edge_feature_distance(img1, img2))\n",
        "\n",
        "        # Aggregate metrics for the row (e.g., average)\n",
        "        row_metrics[f'Row {r}'] = {\n",
        "            'PSNR': np.mean(psnr_list) if psnr_list else np.nan,\n",
        "            'SSIM': np.mean(ssim_list) if ssim_list else np.nan,\n",
        "            'MSE': np.mean(mse_list) if mse_list else np.nan,\n",
        "            'Color_Hist_Dist': np.mean(color_hist_list) if color_hist_list else np.nan,\n",
        "            'Edge_Feature_Dist': np.mean(edge_feature_list) if edge_feature_list else np.nan\n",
        "        }\n",
        "\n",
        "# Calculate metrics for columns\n",
        "for c in range(1, 6):\n",
        "    col_images = [images[(r, c)] for r in range(1, 6) if (r, c) in images]\n",
        "    if len(col_images) > 1:\n",
        "        psnr_list = []\n",
        "        ssim_list = []\n",
        "        mse_list = []\n",
        "        color_hist_list = []\n",
        "        edge_feature_list = []\n",
        "        for i in range(len(col_images)):\n",
        "            for j in range(i + 1, len(col_images)):\n",
        "                img1 = col_images[i]\n",
        "                img2 = col_images[j]\n",
        "                psnr_list.append(peak_signal_noise_ratio(img1, img2))\n",
        "                ssim_list.append(structural_similarity(img1, img2, channel_axis=2))\n",
        "                mse_list.append(np.mean((img1 - img2)**2))\n",
        "                color_hist_list.append(color_hist_distance(img1, img2))\n",
        "                edge_feature_list.append(edge_feature_distance(img1, img2))\n",
        "\n",
        "        # Aggregate metrics for the column (e.g., average)\n",
        "        col_metrics[f'Col {c}'] = {\n",
        "            'PSNR': np.mean(psnr_list) if psnr_list else np.nan,\n",
        "            'SSIM': np.mean(ssim_list) if ssim_list else np.nan,\n",
        "            'MSE': np.mean(mse_list) if mse_list else np.nan,\n",
        "            'Color_Hist_Dist': np.mean(color_hist_list) if color_hist_list else np.nan,\n",
        "            'Edge_Feature_Dist': np.mean(edge_feature_list) if edge_feature_list else np.nan\n",
        "        }\n",
        "\n",
        "# Combine row and column metrics\n",
        "all_metrics = {**row_metrics, **col_metrics}\n",
        "\n",
        "# Normalize metrics to be between 0 and 1\n",
        "# Note: PSNR and SSIM are typically higher for more similarity, MSE and distances are lower.\n",
        "# We'll normalize similarity metrics (PSNR, SSIM) directly, and inverse distance metrics (MSE, distances) for consistency in spider plot.\n",
        "# A higher value on the spider plot means more *similarity*.\n",
        "\n",
        "normalized_metrics = {}\n",
        "metrics_df = pd.DataFrame.from_dict(all_metrics, orient='index')\n",
        "\n",
        "# Normalize metrics to be between 0 and 1 (higher = more similar)\n",
        "# For PSNR and SSIM, directly normalize (min-max scaling)\n",
        "metrics_df['PSNR_norm'] = (metrics_df['PSNR'] - metrics_df['PSNR'].min()) / (metrics_df['PSNR'].max() - metrics_df['PSNR'].min())\n",
        "metrics_df['SSIM_norm'] = metrics_df['SSIM'] # SSIM is already 0-1\n",
        "\n",
        "# For MSE, Color_Hist_Dist, Edge_Feature_Dist, inverse normalize (higher distance/error means less similar)\n",
        "# We'll use 1 - normalized distance/error, so a higher value indicates more similarity\n",
        "metrics_df['MSE_norm'] = 1 - (metrics_df['MSE'] - metrics_df['MSE'].min()) / (metrics_df['MSE'].max() - metrics_df['MSE'].min())\n",
        "metrics_df['Color_Hist_Sim'] = 1 - (metrics_df['Color_Hist_Dist'] - metrics_df['Color_Hist_Dist'].min()) / (metrics_df['Color_Hist_Dist'].max() - metrics_df['Color_Hist_Dist'].min())\n",
        "metrics_df['Edge_Feature_Sim'] = 1 - (metrics_df['Edge_Feature_Dist'] - metrics_df['Edge_Feature_Dist'].min()) / (metrics_df['Edge_Feature_Dist'].max() - metrics_df['Edge_Feature_Dist'].min())\n",
        "\n",
        "# Select normalized similarity columns and rename for spider plot\n",
        "spider_df = metrics_df[['PSNR_norm', 'SSIM_norm', 'MSE_norm', 'Color_Hist_Sim', 'Edge_Feature_Sim']].copy()\n",
        "spider_df.columns = ['PSNR Similarity', 'SSIM Similarity', 'MSE Similarity', 'Color Histogram Similarity', 'Edge Feature Similarity']\n",
        "spider_df = spider_df.reset_index().rename(columns={'index': 'Group'})\n",
        "\n",
        "# Convert to long format for Plotly Express spider plot\n",
        "spider_long_df = spider_df.melt(id_vars='Group', var_name='Metric', value_name='Similarity')\n",
        "\n",
        "# Create Spider Graph\n",
        "fig_spider = px.line_polar(spider_long_df, r=\"Similarity\", theta=\"Metric\", color=\"Group\", line_close=True,\n",
        "                           title=\"Image Similarity Metrics (Normalized)\")\n",
        "fig_spider.update_traces(fill='toself')\n",
        "fig_spider.show()\n",
        "\n",
        "# Summarize Spider Graph meaning in a table\n",
        "spider_summary = {\n",
        "    \"Metric\": ['PSNR Similarity', 'SSIM Similarity', 'MSE Similarity', 'Color Histogram Similarity', 'Edge Feature Similarity'],\n",
        "    \"Meaning (Higher Value)\": [\n",
        "        \"Higher Peak Signal-to-Noise Ratio (better image quality, less noise/loss from compression/processing)\",\n",
        "        \"Higher Structural Similarity Index (more similar perceived structure/texture)\",\n",
        "        \"Lower Mean Squared Error (less average pixel difference, higher similarity)\", # Note: MSE_norm is 1-MSE, so higher means lower MSE\n",
        "        \"Lower Color Histogram Cosine Distance (more similar color distribution, higher similarity)\", # Note: Color_Hist_Sim is 1-dist, so higher means lower distance\n",
        "        \"Lower Edge Feature Cosine Distance (more similar edge patterns, higher similarity)\" # Note: Edge_Feature_Sim is 1-dist, so higher means lower distance\n",
        "    ],\n",
        "    \"Interpretation\": [\n",
        "        \"Measures pixel-level difference, sensitive to noise.\",\n",
        "        \"Measures structural similarity based on luminance, contrast, and structure.\",\n",
        "        \"Measures average squared difference between pixels.\",\n",
        "        \"Compares the overall distribution of colors.\",\n",
        "        \"Compares the patterns of edges in the images.\"\n",
        "    ]\n",
        "}\n",
        "spider_summary_df = pd.DataFrame(spider_summary)\n",
        "print(\"\\n--- Spider Graph Metric Summary ---\")\n",
        "from IPython.display import display\n",
        "display(spider_summary_df)\n",
        "\n",
        "\n",
        "# Create 3D Scatter Plot\n",
        "# We can choose three relevant metrics to plot in 3D\n",
        "scatter_df = metrics_df.reset_index().rename(columns={'index': 'Group'})\n",
        "fig_scatter_3d = px.scatter_3d(scatter_df,\n",
        "                              x='PSNR_norm',\n",
        "                              y='SSIM_norm',\n",
        "                              z='Color_Hist_Sim',\n",
        "                              color='Group',\n",
        "                              hover_name='Group',\n",
        "                              title='3D Scatter Plot of Image Similarity Metrics (Normalized)')\n",
        "\n",
        "fig_scatter_3d.update_layout(scene = dict(\n",
        "    xaxis_title='PSNR Similarity',\n",
        "    yaxis_title='SSIM Similarity',\n",
        "    zaxis_title='Color Histogram Similarity'))\n",
        "\n",
        "fig_scatter_3d.show()\n",
        "\n",
        "# Explanation of the 3D Scatter Plot\n",
        "print(\"\\n--- 3D Scatter Plot Explanation ---\")\n",
        "print(\"This 3D scatter plot visualizes the relationships between three different image similarity metrics (PSNR Similarity, SSIM Similarity, and Color Histogram Similarity) for each row and column of images.\")\n",
        "print(\"- Each point represents a specific row or column (e.g., 'Row 1', 'Col 5').\")\n",
        "print(\"- The position of the point along the X-axis indicates its PSNR Similarity score (normalized 0-1).\")\n",
        "print(\"- The position along the Y-axis indicates its SSIM Similarity score (normalized 0-1).\")\n",
        "print(\"- The position along the Z-axis indicates its Color Histogram Similarity score (normalized 0-1).\")\n",
        "print(\"- Points that are clustered together in the 3D space represent rows or columns where the images within them are similarly related across these three metrics.\")\n",
        "print(\"- The color of each point distinguishes the specific row or column.\")\n",
        "print(\"- You can interact with the plot by rotating it, zooming in/out, and hovering over points to see their exact values and associated row/column.\")\n",
        "print(\"- This plot helps to identify groups of rows or columns that exhibit similar patterns of variation across the chosen metrics. For example, if all column points cluster separately from all row points, it might suggest that the images within columns are more similar to each other than images within rows, or vice versa, based on these metrics.\")\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1589
        },
        "id": "p4xvABxd-BBu",
        "outputId": "582a22a1-520d-41d9-91e4-9604480b8e08"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "/usr/local/lib/python3.11/dist-packages/scipy/spatial/distance.py:682: RuntimeWarning:\n",
            "\n",
            "overflow encountered in scalar multiply\n",
            "\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"513a12f5-9f78-4b89-b178-50dd50a1602b\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"513a12f5-9f78-4b89-b178-50dd50a1602b\")) {                    Plotly.newPlot(                        \"513a12f5-9f78-4b89-b178-50dd50a1602b\",                        [{\"hovertemplate\":\"Group=Row 1\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 1\",\"line\":{\"color\":\"#636efa\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 1\",\"r\":[0.9485974603904676,0.6351444218508698,0.8189722520896314,1.0,1.0,0.9485974603904676],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 2\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 2\",\"line\":{\"color\":\"#EF553B\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 2\",\"r\":[0.8354612033706521,0.6363435316142311,0.7527365549699758,0.9790909886360168,1.0,0.8354612033706521],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 3\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 3\",\"line\":{\"color\":\"#00cc96\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 3\",\"r\":[0.44905490817404575,0.5412358830063102,0.34841017624801296,0.6438026428222656,1.0,0.44905490817404575],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 4\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 4\",\"line\":{\"color\":\"#ab63fa\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 4\",\"r\":[0.34012963627292614,0.5757529447433519,0.5164819061590282,0.5151337385177612,1.0,0.34012963627292614],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Row 5\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Row 5\",\"line\":{\"color\":\"#FFA15A\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Row 5\",\"r\":[0.0961275316467917,0.5357147443433317,0.31661534199836494,0.0,0.6074941892968153,0.0961275316467917],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 1\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 1\",\"line\":{\"color\":\"#19d3f3\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 1\",\"r\":[0.7672650678171427,0.6560176499425207,0.6108745795899748,0.9649550914764404,0.14362368573850648,0.7672650678171427],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 2\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 2\",\"line\":{\"color\":\"#FF6692\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 2\",\"r\":[0.8601356988006678,0.6620047753835171,0.8206305250777224,0.908279538154602,1.0,0.8601356988006678],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 3\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 3\",\"line\":{\"color\":\"#B6E880\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 3\",\"r\":[1.0,0.6747552356391073,1.0,0.9898378849029541,0.0,1.0],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 4\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 4\",\"line\":{\"color\":\"#FF97FF\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 4\",\"r\":[0.5153998845292118,0.5921160816610808,0.4976011083140981,0.8490608930587769,1.0,0.5153998845292118],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"},{\"hovertemplate\":\"Group=Col 5\\u003cbr\\u003eSimilarity=%{r}\\u003cbr\\u003eMetric=%{theta}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"legendgroup\":\"Col 5\",\"line\":{\"color\":\"#FECB52\",\"dash\":\"solid\"},\"marker\":{\"symbol\":\"circle\"},\"mode\":\"lines\",\"name\":\"Col 5\",\"r\":[0.0,0.4659699002139284,0.0,0.23552066087722778,1.0,0.0],\"showlegend\":true,\"subplot\":\"polar\",\"theta\":[\"PSNR Similarity\",\"SSIM Similarity\",\"MSE Similarity\",\"Color Histogram Similarity\",\"Edge Feature Similarity\",\"PSNR Similarity\"],\"type\":\"scatterpolar\",\"fill\":\"toself\"}],                        {\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}},\"polar\":{\"domain\":{\"x\":[0.0,1.0],\"y\":[0.0,1.0]},\"angularaxis\":{\"direction\":\"clockwise\",\"rotation\":90}},\"legend\":{\"title\":{\"text\":\"Group\"},\"tracegroupgap\":0},\"title\":{\"text\":\"Image Similarity Metrics (Normalized)\"}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('513a12f5-9f78-4b89-b178-50dd50a1602b');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "--- Spider Graph Metric Summary ---\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "                       Metric  \\\n",
              "0             PSNR Similarity   \n",
              "1             SSIM Similarity   \n",
              "2              MSE Similarity   \n",
              "3  Color Histogram Similarity   \n",
              "4     Edge Feature Similarity   \n",
              "\n",
              "                              Meaning (Higher Value)  \\\n",
              "0  Higher Peak Signal-to-Noise Ratio (better imag...   \n",
              "1  Higher Structural Similarity Index (more simil...   \n",
              "2  Lower Mean Squared Error (less average pixel d...   \n",
              "3  Lower Color Histogram Cosine Distance (more si...   \n",
              "4  Lower Edge Feature Cosine Distance (more simil...   \n",
              "\n",
              "                                      Interpretation  \n",
              "0  Measures pixel-level difference, sensitive to ...  \n",
              "1  Measures structural similarity based on lumina...  \n",
              "2  Measures average squared difference between pi...  \n",
              "3       Compares the overall distribution of colors.  \n",
              "4      Compares the patterns of edges in the images.  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-e0a1738a-0ace-45ed-9fb1-734567dfb17c\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Metric</th>\n",
              "      <th>Meaning (Higher Value)</th>\n",
              "      <th>Interpretation</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>PSNR Similarity</td>\n",
              "      <td>Higher Peak Signal-to-Noise Ratio (better imag...</td>\n",
              "      <td>Measures pixel-level difference, sensitive to ...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>SSIM Similarity</td>\n",
              "      <td>Higher Structural Similarity Index (more simil...</td>\n",
              "      <td>Measures structural similarity based on lumina...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>MSE Similarity</td>\n",
              "      <td>Lower Mean Squared Error (less average pixel d...</td>\n",
              "      <td>Measures average squared difference between pi...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>Color Histogram Similarity</td>\n",
              "      <td>Lower Color Histogram Cosine Distance (more si...</td>\n",
              "      <td>Compares the overall distribution of colors.</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>Edge Feature Similarity</td>\n",
              "      <td>Lower Edge Feature Cosine Distance (more simil...</td>\n",
              "      <td>Compares the patterns of edges in the images.</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-e0a1738a-0ace-45ed-9fb1-734567dfb17c')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-e0a1738a-0ace-45ed-9fb1-734567dfb17c button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-e0a1738a-0ace-45ed-9fb1-734567dfb17c');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "    <div id=\"df-773ea506-ff9a-43da-b474-9db5836cae38\">\n",
              "      <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-773ea506-ff9a-43da-b474-9db5836cae38')\"\n",
              "                title=\"Suggest charts\"\n",
              "                style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "      </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "      <script>\n",
              "        async function quickchart(key) {\n",
              "          const quickchartButtonEl =\n",
              "            document.querySelector('#' + key + ' button');\n",
              "          quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "          quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "          try {\n",
              "            const charts = await google.colab.kernel.invokeFunction(\n",
              "                'suggestCharts', [key], {});\n",
              "          } catch (error) {\n",
              "            console.error('Error during call to suggestCharts:', error);\n",
              "          }\n",
              "          quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "          quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "        }\n",
              "        (() => {\n",
              "          let quickchartButtonEl =\n",
              "            document.querySelector('#df-773ea506-ff9a-43da-b474-9db5836cae38 button');\n",
              "          quickchartButtonEl.style.display =\n",
              "            google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "        })();\n",
              "      </script>\n",
              "    </div>\n",
              "\n",
              "  <div id=\"id_3a175ae8-eb6d-4053-a435-9748c4822a5c\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('spider_summary_df')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_3a175ae8-eb6d-4053-a435-9748c4822a5c button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('spider_summary_df');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "spider_summary_df",
              "summary": "{\n  \"name\": \"spider_summary_df\",\n  \"rows\": 5,\n  \"fields\": [\n    {\n      \"column\": \"Metric\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 5,\n        \"samples\": [\n          \"SSIM Similarity\",\n          \"Edge Feature Similarity\",\n          \"MSE Similarity\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Meaning (Higher Value)\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 5,\n        \"samples\": [\n          \"Higher Structural Similarity Index (more similar perceived structure/texture)\",\n          \"Lower Edge Feature Cosine Distance (more similar edge patterns, higher similarity)\",\n          \"Lower Mean Squared Error (less average pixel difference, higher similarity)\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Interpretation\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 5,\n        \"samples\": [\n          \"Measures structural similarity based on luminance, contrast, and structure.\",\n          \"Compares the patterns of edges in the images.\",\n          \"Measures average squared difference between pixels.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"b5208ea7-af75-4a00-8111-c86fd208d618\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"b5208ea7-af75-4a00-8111-c86fd208d618\")) {                    Plotly.newPlot(                        \"b5208ea7-af75-4a00-8111-c86fd208d618\",                        [{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 1\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 1\"],\"legendgroup\":\"Row 1\",\"marker\":{\"color\":\"#636efa\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 1\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.9485974603904676],\"y\":[0.6351444218508698],\"z\":[1.0],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 2\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 2\"],\"legendgroup\":\"Row 2\",\"marker\":{\"color\":\"#EF553B\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 2\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.8354612033706521],\"y\":[0.6363435316142311],\"z\":[0.979091],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 3\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 3\"],\"legendgroup\":\"Row 3\",\"marker\":{\"color\":\"#00cc96\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 3\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.44905490817404575],\"y\":[0.5412358830063102],\"z\":[0.64380264],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 4\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 4\"],\"legendgroup\":\"Row 4\",\"marker\":{\"color\":\"#ab63fa\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 4\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.34012963627292614],\"y\":[0.5757529447433519],\"z\":[0.51513374],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Row 5\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Row 5\"],\"legendgroup\":\"Row 5\",\"marker\":{\"color\":\"#FFA15A\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Row 5\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.0961275316467917],\"y\":[0.5357147443433317],\"z\":[0.0],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 1\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 1\"],\"legendgroup\":\"Col 1\",\"marker\":{\"color\":\"#19d3f3\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 1\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.7672650678171427],\"y\":[0.6560176499425207],\"z\":[0.9649551],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 2\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 2\"],\"legendgroup\":\"Col 2\",\"marker\":{\"color\":\"#FF6692\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 2\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.8601356988006678],\"y\":[0.6620047753835171],\"z\":[0.90827954],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 3\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 3\"],\"legendgroup\":\"Col 3\",\"marker\":{\"color\":\"#B6E880\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 3\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[1.0],\"y\":[0.6747552356391073],\"z\":[0.9898379],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 4\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 4\"],\"legendgroup\":\"Col 4\",\"marker\":{\"color\":\"#FF97FF\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 4\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.5153998845292118],\"y\":[0.5921160816610808],\"z\":[0.8490609],\"type\":\"scatter3d\"},{\"hovertemplate\":\"\\u003cb\\u003e%{hovertext}\\u003c\\u002fb\\u003e\\u003cbr\\u003e\\u003cbr\\u003eGroup=Col 5\\u003cbr\\u003ePSNR_norm=%{x}\\u003cbr\\u003eSSIM_norm=%{y}\\u003cbr\\u003eColor_Hist_Sim=%{z}\\u003cextra\\u003e\\u003c\\u002fextra\\u003e\",\"hovertext\":[\"Col 5\"],\"legendgroup\":\"Col 5\",\"marker\":{\"color\":\"#FECB52\",\"symbol\":\"circle\"},\"mode\":\"markers\",\"name\":\"Col 5\",\"scene\":\"scene\",\"showlegend\":true,\"x\":[0.0],\"y\":[0.4659699002139284],\"z\":[0.23552066],\"type\":\"scatter3d\"}],                        {\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}},\"scene\":{\"domain\":{\"x\":[0.0,1.0],\"y\":[0.0,1.0]},\"xaxis\":{\"title\":{\"text\":\"PSNR Similarity\"}},\"yaxis\":{\"title\":{\"text\":\"SSIM Similarity\"}},\"zaxis\":{\"title\":{\"text\":\"Color Histogram Similarity\"}}},\"legend\":{\"title\":{\"text\":\"Group\"},\"tracegroupgap\":0},\"title\":{\"text\":\"3D Scatter Plot of Image Similarity Metrics (Normalized)\"}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('b5208ea7-af75-4a00-8111-c86fd208d618');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\n",
            "--- 3D Scatter Plot Explanation ---\n",
            "This 3D scatter plot visualizes the relationships between three different image similarity metrics (PSNR Similarity, SSIM Similarity, and Color Histogram Similarity) for each row and column of images.\n",
            "- Each point represents a specific row or column (e.g., 'Row 1', 'Col 5').\n",
            "- The position of the point along the X-axis indicates its PSNR Similarity score (normalized 0-1).\n",
            "- The position along the Y-axis indicates its SSIM Similarity score (normalized 0-1).\n",
            "- The position along the Z-axis indicates its Color Histogram Similarity score (normalized 0-1).\n",
            "- Points that are clustered together in the 3D space represent rows or columns where the images within them are similarly related across these three metrics.\n",
            "- The color of each point distinguishes the specific row or column.\n",
            "- You can interact with the plot by rotating it, zooming in/out, and hovering over points to see their exact values and associated row/column.\n",
            "- This plot helps to identify groups of rows or columns that exhibit similar patterns of variation across the chosen metrics. For example, if all column points cluster separately from all row points, it might suggest that the images within columns are more similar to each other than images within rows, or vice versa, based on these metrics.\n"
          ]
        }
      ]
    }
  ]
}