a b/test.ipynb
1
{
2
 "cells": [
3
  {
4
   "cell_type": "code",
5
   "execution_count": 7,
6
   "metadata": {},
7
   "outputs": [],
8
   "source": [
9
    "import tensorflow as tf\n",
10
    "from keras.utils.layer_utils import count_params\n",
11
    "model = tf.keras.models.load_model('./models/{}/{}.h5'.format('R2UNet', 'R2UNet'), compile=False)\n",
12
    "trainable_count = count_params(model.trainable_weights)"
13
   ]
14
  },
15
  {
16
   "cell_type": "code",
17
   "execution_count": 8,
18
   "metadata": {},
19
   "outputs": [
20
    {
21
     "data": {
22
      "text/plain": [
23
       "10050241"
24
      ]
25
     },
26
     "execution_count": 8,
27
     "metadata": {},
28
     "output_type": "execute_result"
29
    }
30
   ],
31
   "source": [
32
    "trainable_count"
33
   ]
34
  },
35
  {
36
   "cell_type": "code",
37
   "execution_count": 3,
38
   "metadata": {},
39
   "outputs": [
40
    {
41
     "data": {
42
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAAAAAB5Gfe6AAAFLklEQVR4nO2d25qdIAyFY7++N/HJ7UXnuEeFHAnO+m+6TxCyTAKiTokAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4BFueqUa051kbJUmA4/0FD2vQ3v4NFi1DgOPbuzEJ2pfXoRIEC9CI+PWzAQXay/tACSIFOPOeiIh7Dr36T0RhIvyN6ZaIqJ27T8QXn382JDrTLkSCuAhofP3dbRY0ovPQGS+gAv4E9ElE9/5fBPkXThvz0WumIEqAe//vvmw337O/AkEC3Pvf47oxH5dflaIdPa4PZes0dg6CkAiwHf8OzmkQIcDBAZ1+Uj4NuuF/HMdx7UQ/fW4ay/GPAOPohgLcUQF3Acxj4xQrH3gLkJWfbpXQWYC0+sRZhmSMFLBeHTN3MJNx/+0COCWB69mg5KhcGh7uxGfonjXAJyp59Ic+IeAoQMC56i0Bp4Y2BAXgNoMd6ogAvwhwK8s8/EuPEAjbEcqAHfpwE8BvXhbs/DmEQMUI4IBfhiOqgL365VJLB/FaCEkz4NauoDPz+J1SwHdlnnjJelYNYNPXXzDngI/Y4gDomR3v0OpAxVmASpX3EZp0DugfYMeuEhD73x91W0mA8cG+M1C6hjuN96+L2P+hQY8qUOCkOEaAYQVsgy86CyyFPAAGD9pgCNhG/4AImF4EwiIgJQTsEaCwz2ajfpROgZ3jbUwRwPl2N1MRKB0BS6AogYIjFl8Ff30EmDdEFPILbI71bnFiQgSw+28tVdAqQIWzURPFa0D8Q0bFBRiD55mOnQSHDRiKwCMiwEJ1ATjaQHUBwrEJMH0v4g3WN7UJYDDsi/5IpKdAyKNfBqrXgHC5qgsQjkmA5U8E6DERwHPMhi+Ex22ofSgfATz2M/U8WF6A6GnAIsATamB2BFRbBi2QAtEFvr4AwTGTLEC5DDCRsAogGr1Irp0HDRGQNQnERk39GlBo1+EFeQZoY2YkCSakgBxWtou8UWKFFKiKPAP0O3cDSZC/QSsXwGCsr4BSAH0K5CoeVgb0ArDfIGayTBGMCoFMAdjUOuOmQRGpNZCIuoVQV5SWSQEKigG1ADP2wyIUWCkCQhRIFIAd+vA/NU4UwGXwd/dEqqrgWilA/g9WawWQ10BWWorq543lIuC6EF59fs96AhRZEuavA/vGaxdBduzLsxAqBZh8fxz7dbVgDaDLMqA5LEoBzgeQh18hTIsA70UsO/WTJQA793emp8pGlgD+ZzHs082aRZCIdicFdAKIyy2rzNRl5jLwg59/hz9xGnwOCwvgUwUWFoBcSotKgCI18MfUqjGjEkBjKAb+/lZRBddOAQeWFmB3CMalBfBAI0CVpwWJyB4Ca0fATmYFNALITcpbKJEH59oRQERWdR0F4O0d9us0HB8Btm3bts+F2Z6rAZ+8GsZDgO1kn37fNmaHvjvYN5oUAryc3J+5T0RE+75CLlgj4NJ9IiJaQALj3w/oXqSqcSXzBpMA20AKZgSBxYJcgI+1Rv/w/2ff7vPExOshEK+EDPcKV3wCjMUt5AK82SjpvwJtBDzFf/XV4af4LxegERGPlP8krCNRnQ7Xcf8HLG3wV2GisP9yFBFQ23/pQkAswF7Nf+N4HrAjZOMBAthC4AECgO9PU80ezBTabxfgqwKzhzKL9tsF+FBAuBJ6ziyw67adniOA8jGCzP/dMp6DSOrSkyLgaYdTQxMXQfl+QGnk5wXPSoHqmxUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQA7/AMikZSNr+TFLAAAAAElFTkSuQmCC",
43
      "text/plain": [
44
       "<PIL.Image.Image image mode=L size=256x256>"
45
      ]
46
     },
47
     "execution_count": 3,
48
     "metadata": {},
49
     "output_type": "execute_result"
50
    }
51
   ],
52
   "source": [
53
    "import numpy as np\n",
54
    "from tensorflow.keras.utils import load_img, img_to_array, array_to_img\n",
55
    "import matplotlib.pyplot as plt\n",
56
    "import tensorflow as tf\n",
57
    "import cv2\n",
58
    "\n",
59
    "\n",
60
    "def overlapMask(model_name):\n",
61
    "    # Get Array Image =\n",
62
    "    image_to_predict = img_to_array(load_img('./sample_images/image_to_predict.bmp', color_mode='grayscale', target_size=(256, 256))).astype('float32')/255.0\n",
63
    "    gt_image = np.squeeze(img_to_array(load_img('./sample_images/ground_truth.bmp', color_mode='grayscale', target_size=(256, 256))).astype('float32'))/255.0\n",
64
    "    # Reshape to model.predict\n",
65
    "    image_arr_reshape = image_to_predict[np.newaxis, ...]\n",
66
    "    # Load Model\n",
67
    "    model = tf.keras.models.load_model('./models/{}/{}.h5'.format(model_name, model_name), compile=False)\n",
68
    "    # Get Segmentation (Predicted Images)\n",
69
    "    mask_arr = model.predict(image_arr_reshape, verbose=0)\n",
70
    "    # To Binary\n",
71
    "    gt_image = (gt_image > 0.5).astype('float32')\n",
72
    "    mask_arr = (mask_arr > 0.5).astype('float32')\n",
73
    "    # Reduce The Dimension\n",
74
    "    mask_arr = np.squeeze(mask_arr)\n",
75
    "    # Overlap\n",
76
    "    gt_image[gt_image != mask_arr] = 0.5\n",
77
    "    return array_to_img(np.expand_dims(gt_image, axis=2))\n",
78
    "\n",
79
    "overlapMask('UNet')\n"
80
   ]
81
  },
82
  {
83
   "cell_type": "code",
84
   "execution_count": 5,
85
   "metadata": {},
86
   "outputs": [
87
    {
88
     "data": {
89
      "application/vnd.plotly.v1+json": {
90
       "config": {
91
        "plotlyServerURL": "https://plot.ly"
92
       },
93
       "data": [
94
        {
95
         "customdata": [
96
          [
97
           11.837,
98
           10050241
99
          ],
100
          [
101
           6.563,
102
           8202053
103
          ],
104
          [
105
           7.73,
106
           7851969
107
          ],
108
          [
109
           11.973,
110
           9162753
111
          ]
112
         ],
113
         "hovertemplate": "Model=%{x}<br>IoU=%{y}<br>Time=%{customdata[0]}<br>Param=%{marker.color}<extra></extra>",
114
         "legendgroup": "",
115
         "marker": {
116
          "color": [
117
           10050241,
118
           8202053,
119
           7851969,
120
           9162753
121
          ],
122
          "coloraxis": "coloraxis",
123
          "size": [
124
           11.837,
125
           6.563,
126
           7.73,
127
           11.973
128
          ],
129
          "sizemode": "area",
130
          "sizeref": 0.0299325,
131
          "symbol": "circle"
132
         },
133
         "mode": "markers",
134
         "name": "",
135
         "orientation": "v",
136
         "showlegend": false,
137
         "type": "scatter",
138
         "x": [
139
          "R2UNet",
140
          "AttUNet",
141
          "UNet",
142
          "UNet++"
143
         ],
144
         "xaxis": "x",
145
         "y": [
146
          0.915,
147
          0.928,
148
          0.936,
149
          0.936
150
         ],
151
         "yaxis": "y"
152
        }
153
       ],
154
       "layout": {
155
        "coloraxis": {
156
         "colorbar": {
157
          "title": {
158
           "text": "Param"
159
          }
160
         },
161
         "colorscale": [
162
          [
163
           0,
164
           "#0d0887"
165
          ],
166
          [
167
           0.1111111111111111,
168
           "#46039f"
169
          ],
170
          [
171
           0.2222222222222222,
172
           "#7201a8"
173
          ],
174
          [
175
           0.3333333333333333,
176
           "#9c179e"
177
          ],
178
          [
179
           0.4444444444444444,
180
           "#bd3786"
181
          ],
182
          [
183
           0.5555555555555556,
184
           "#d8576b"
185
          ],
186
          [
187
           0.6666666666666666,
188
           "#ed7953"
189
          ],
190
          [
191
           0.7777777777777778,
192
           "#fb9f3a"
193
          ],
194
          [
195
           0.8888888888888888,
196
           "#fdca26"
197
          ],
198
          [
199
           1,
200
           "#f0f921"
201
          ]
202
         ]
203
        },
204
        "legend": {
205
         "itemsizing": "constant",
206
         "tracegroupgap": 0
207
        },
208
        "template": {
209
         "data": {
210
          "bar": [
211
           {
212
            "error_x": {
213
             "color": "#2a3f5f"
214
            },
215
            "error_y": {
216
             "color": "#2a3f5f"
217
            },
218
            "marker": {
219
             "line": {
220
              "color": "#E5ECF6",
221
              "width": 0.5
222
             },
223
             "pattern": {
224
              "fillmode": "overlay",
225
              "size": 10,
226
              "solidity": 0.2
227
             }
228
            },
229
            "type": "bar"
230
           }
231
          ],
232
          "barpolar": [
233
           {
234
            "marker": {
235
             "line": {
236
              "color": "#E5ECF6",
237
              "width": 0.5
238
             },
239
             "pattern": {
240
              "fillmode": "overlay",
241
              "size": 10,
242
              "solidity": 0.2
243
             }
244
            },
245
            "type": "barpolar"
246
           }
247
          ],
248
          "carpet": [
249
           {
250
            "aaxis": {
251
             "endlinecolor": "#2a3f5f",
252
             "gridcolor": "white",
253
             "linecolor": "white",
254
             "minorgridcolor": "white",
255
             "startlinecolor": "#2a3f5f"
256
            },
257
            "baxis": {
258
             "endlinecolor": "#2a3f5f",
259
             "gridcolor": "white",
260
             "linecolor": "white",
261
             "minorgridcolor": "white",
262
             "startlinecolor": "#2a3f5f"
263
            },
264
            "type": "carpet"
265
           }
266
          ],
267
          "choropleth": [
268
           {
269
            "colorbar": {
270
             "outlinewidth": 0,
271
             "ticks": ""
272
            },
273
            "type": "choropleth"
274
           }
275
          ],
276
          "contour": [
277
           {
278
            "colorbar": {
279
             "outlinewidth": 0,
280
             "ticks": ""
281
            },
282
            "colorscale": [
283
             [
284
              0,
285
              "#0d0887"
286
             ],
287
             [
288
              0.1111111111111111,
289
              "#46039f"
290
             ],
291
             [
292
              0.2222222222222222,
293
              "#7201a8"
294
             ],
295
             [
296
              0.3333333333333333,
297
              "#9c179e"
298
             ],
299
             [
300
              0.4444444444444444,
301
              "#bd3786"
302
             ],
303
             [
304
              0.5555555555555556,
305
              "#d8576b"
306
             ],
307
             [
308
              0.6666666666666666,
309
              "#ed7953"
310
             ],
311
             [
312
              0.7777777777777778,
313
              "#fb9f3a"
314
             ],
315
             [
316
              0.8888888888888888,
317
              "#fdca26"
318
             ],
319
             [
320
              1,
321
              "#f0f921"
322
             ]
323
            ],
324
            "type": "contour"
325
           }
326
          ],
327
          "contourcarpet": [
328
           {
329
            "colorbar": {
330
             "outlinewidth": 0,
331
             "ticks": ""
332
            },
333
            "type": "contourcarpet"
334
           }
335
          ],
336
          "heatmap": [
337
           {
338
            "colorbar": {
339
             "outlinewidth": 0,
340
             "ticks": ""
341
            },
342
            "colorscale": [
343
             [
344
              0,
345
              "#0d0887"
346
             ],
347
             [
348
              0.1111111111111111,
349
              "#46039f"
350
             ],
351
             [
352
              0.2222222222222222,
353
              "#7201a8"
354
             ],
355
             [
356
              0.3333333333333333,
357
              "#9c179e"
358
             ],
359
             [
360
              0.4444444444444444,
361
              "#bd3786"
362
             ],
363
             [
364
              0.5555555555555556,
365
              "#d8576b"
366
             ],
367
             [
368
              0.6666666666666666,
369
              "#ed7953"
370
             ],
371
             [
372
              0.7777777777777778,
373
              "#fb9f3a"
374
             ],
375
             [
376
              0.8888888888888888,
377
              "#fdca26"
378
             ],
379
             [
380
              1,
381
              "#f0f921"
382
             ]
383
            ],
384
            "type": "heatmap"
385
           }
386
          ],
387
          "heatmapgl": [
388
           {
389
            "colorbar": {
390
             "outlinewidth": 0,
391
             "ticks": ""
392
            },
393
            "colorscale": [
394
             [
395
              0,
396
              "#0d0887"
397
             ],
398
             [
399
              0.1111111111111111,
400
              "#46039f"
401
             ],
402
             [
403
              0.2222222222222222,
404
              "#7201a8"
405
             ],
406
             [
407
              0.3333333333333333,
408
              "#9c179e"
409
             ],
410
             [
411
              0.4444444444444444,
412
              "#bd3786"
413
             ],
414
             [
415
              0.5555555555555556,
416
              "#d8576b"
417
             ],
418
             [
419
              0.6666666666666666,
420
              "#ed7953"
421
             ],
422
             [
423
              0.7777777777777778,
424
              "#fb9f3a"
425
             ],
426
             [
427
              0.8888888888888888,
428
              "#fdca26"
429
             ],
430
             [
431
              1,
432
              "#f0f921"
433
             ]
434
            ],
435
            "type": "heatmapgl"
436
           }
437
          ],
438
          "histogram": [
439
           {
440
            "marker": {
441
             "pattern": {
442
              "fillmode": "overlay",
443
              "size": 10,
444
              "solidity": 0.2
445
             }
446
            },
447
            "type": "histogram"
448
           }
449
          ],
450
          "histogram2d": [
451
           {
452
            "colorbar": {
453
             "outlinewidth": 0,
454
             "ticks": ""
455
            },
456
            "colorscale": [
457
             [
458
              0,
459
              "#0d0887"
460
             ],
461
             [
462
              0.1111111111111111,
463
              "#46039f"
464
             ],
465
             [
466
              0.2222222222222222,
467
              "#7201a8"
468
             ],
469
             [
470
              0.3333333333333333,
471
              "#9c179e"
472
             ],
473
             [
474
              0.4444444444444444,
475
              "#bd3786"
476
             ],
477
             [
478
              0.5555555555555556,
479
              "#d8576b"
480
             ],
481
             [
482
              0.6666666666666666,
483
              "#ed7953"
484
             ],
485
             [
486
              0.7777777777777778,
487
              "#fb9f3a"
488
             ],
489
             [
490
              0.8888888888888888,
491
              "#fdca26"
492
             ],
493
             [
494
              1,
495
              "#f0f921"
496
             ]
497
            ],
498
            "type": "histogram2d"
499
           }
500
          ],
501
          "histogram2dcontour": [
502
           {
503
            "colorbar": {
504
             "outlinewidth": 0,
505
             "ticks": ""
506
            },
507
            "colorscale": [
508
             [
509
              0,
510
              "#0d0887"
511
             ],
512
             [
513
              0.1111111111111111,
514
              "#46039f"
515
             ],
516
             [
517
              0.2222222222222222,
518
              "#7201a8"
519
             ],
520
             [
521
              0.3333333333333333,
522
              "#9c179e"
523
             ],
524
             [
525
              0.4444444444444444,
526
              "#bd3786"
527
             ],
528
             [
529
              0.5555555555555556,
530
              "#d8576b"
531
             ],
532
             [
533
              0.6666666666666666,
534
              "#ed7953"
535
             ],
536
             [
537
              0.7777777777777778,
538
              "#fb9f3a"
539
             ],
540
             [
541
              0.8888888888888888,
542
              "#fdca26"
543
             ],
544
             [
545
              1,
546
              "#f0f921"
547
             ]
548
            ],
549
            "type": "histogram2dcontour"
550
           }
551
          ],
552
          "mesh3d": [
553
           {
554
            "colorbar": {
555
             "outlinewidth": 0,
556
             "ticks": ""
557
            },
558
            "type": "mesh3d"
559
           }
560
          ],
561
          "parcoords": [
562
           {
563
            "line": {
564
             "colorbar": {
565
              "outlinewidth": 0,
566
              "ticks": ""
567
             }
568
            },
569
            "type": "parcoords"
570
           }
571
          ],
572
          "pie": [
573
           {
574
            "automargin": true,
575
            "type": "pie"
576
           }
577
          ],
578
          "scatter": [
579
           {
580
            "fillpattern": {
581
             "fillmode": "overlay",
582
             "size": 10,
583
             "solidity": 0.2
584
            },
585
            "type": "scatter"
586
           }
587
          ],
588
          "scatter3d": [
589
           {
590
            "line": {
591
             "colorbar": {
592
              "outlinewidth": 0,
593
              "ticks": ""
594
             }
595
            },
596
            "marker": {
597
             "colorbar": {
598
              "outlinewidth": 0,
599
              "ticks": ""
600
             }
601
            },
602
            "type": "scatter3d"
603
           }
604
          ],
605
          "scattercarpet": [
606
           {
607
            "marker": {
608
             "colorbar": {
609
              "outlinewidth": 0,
610
              "ticks": ""
611
             }
612
            },
613
            "type": "scattercarpet"
614
           }
615
          ],
616
          "scattergeo": [
617
           {
618
            "marker": {
619
             "colorbar": {
620
              "outlinewidth": 0,
621
              "ticks": ""
622
             }
623
            },
624
            "type": "scattergeo"
625
           }
626
          ],
627
          "scattergl": [
628
           {
629
            "marker": {
630
             "colorbar": {
631
              "outlinewidth": 0,
632
              "ticks": ""
633
             }
634
            },
635
            "type": "scattergl"
636
           }
637
          ],
638
          "scattermapbox": [
639
           {
640
            "marker": {
641
             "colorbar": {
642
              "outlinewidth": 0,
643
              "ticks": ""
644
             }
645
            },
646
            "type": "scattermapbox"
647
           }
648
          ],
649
          "scatterpolar": [
650
           {
651
            "marker": {
652
             "colorbar": {
653
              "outlinewidth": 0,
654
              "ticks": ""
655
             }
656
            },
657
            "type": "scatterpolar"
658
           }
659
          ],
660
          "scatterpolargl": [
661
           {
662
            "marker": {
663
             "colorbar": {
664
              "outlinewidth": 0,
665
              "ticks": ""
666
             }
667
            },
668
            "type": "scatterpolargl"
669
           }
670
          ],
671
          "scatterternary": [
672
           {
673
            "marker": {
674
             "colorbar": {
675
              "outlinewidth": 0,
676
              "ticks": ""
677
             }
678
            },
679
            "type": "scatterternary"
680
           }
681
          ],
682
          "surface": [
683
           {
684
            "colorbar": {
685
             "outlinewidth": 0,
686
             "ticks": ""
687
            },
688
            "colorscale": [
689
             [
690
              0,
691
              "#0d0887"
692
             ],
693
             [
694
              0.1111111111111111,
695
              "#46039f"
696
             ],
697
             [
698
              0.2222222222222222,
699
              "#7201a8"
700
             ],
701
             [
702
              0.3333333333333333,
703
              "#9c179e"
704
             ],
705
             [
706
              0.4444444444444444,
707
              "#bd3786"
708
             ],
709
             [
710
              0.5555555555555556,
711
              "#d8576b"
712
             ],
713
             [
714
              0.6666666666666666,
715
              "#ed7953"
716
             ],
717
             [
718
              0.7777777777777778,
719
              "#fb9f3a"
720
             ],
721
             [
722
              0.8888888888888888,
723
              "#fdca26"
724
             ],
725
             [
726
              1,
727
              "#f0f921"
728
             ]
729
            ],
730
            "type": "surface"
731
           }
732
          ],
733
          "table": [
734
           {
735
            "cells": {
736
             "fill": {
737
              "color": "#EBF0F8"
738
             },
739
             "line": {
740
              "color": "white"
741
             }
742
            },
743
            "header": {
744
             "fill": {
745
              "color": "#C8D4E3"
746
             },
747
             "line": {
748
              "color": "white"
749
             }
750
            },
751
            "type": "table"
752
           }
753
          ]
754
         },
755
         "layout": {
756
          "annotationdefaults": {
757
           "arrowcolor": "#2a3f5f",
758
           "arrowhead": 0,
759
           "arrowwidth": 1
760
          },
761
          "autotypenumbers": "strict",
762
          "coloraxis": {
763
           "colorbar": {
764
            "outlinewidth": 0,
765
            "ticks": ""
766
           }
767
          },
768
          "colorscale": {
769
           "diverging": [
770
            [
771
             0,
772
             "#8e0152"
773
            ],
774
            [
775
             0.1,
776
             "#c51b7d"
777
            ],
778
            [
779
             0.2,
780
             "#de77ae"
781
            ],
782
            [
783
             0.3,
784
             "#f1b6da"
785
            ],
786
            [
787
             0.4,
788
             "#fde0ef"
789
            ],
790
            [
791
             0.5,
792
             "#f7f7f7"
793
            ],
794
            [
795
             0.6,
796
             "#e6f5d0"
797
            ],
798
            [
799
             0.7,
800
             "#b8e186"
801
            ],
802
            [
803
             0.8,
804
             "#7fbc41"
805
            ],
806
            [
807
             0.9,
808
             "#4d9221"
809
            ],
810
            [
811
             1,
812
             "#276419"
813
            ]
814
           ],
815
           "sequential": [
816
            [
817
             0,
818
             "#0d0887"
819
            ],
820
            [
821
             0.1111111111111111,
822
             "#46039f"
823
            ],
824
            [
825
             0.2222222222222222,
826
             "#7201a8"
827
            ],
828
            [
829
             0.3333333333333333,
830
             "#9c179e"
831
            ],
832
            [
833
             0.4444444444444444,
834
             "#bd3786"
835
            ],
836
            [
837
             0.5555555555555556,
838
             "#d8576b"
839
            ],
840
            [
841
             0.6666666666666666,
842
             "#ed7953"
843
            ],
844
            [
845
             0.7777777777777778,
846
             "#fb9f3a"
847
            ],
848
            [
849
             0.8888888888888888,
850
             "#fdca26"
851
            ],
852
            [
853
             1,
854
             "#f0f921"
855
            ]
856
           ],
857
           "sequentialminus": [
858
            [
859
             0,
860
             "#0d0887"
861
            ],
862
            [
863
             0.1111111111111111,
864
             "#46039f"
865
            ],
866
            [
867
             0.2222222222222222,
868
             "#7201a8"
869
            ],
870
            [
871
             0.3333333333333333,
872
             "#9c179e"
873
            ],
874
            [
875
             0.4444444444444444,
876
             "#bd3786"
877
            ],
878
            [
879
             0.5555555555555556,
880
             "#d8576b"
881
            ],
882
            [
883
             0.6666666666666666,
884
             "#ed7953"
885
            ],
886
            [
887
             0.7777777777777778,
888
             "#fb9f3a"
889
            ],
890
            [
891
             0.8888888888888888,
892
             "#fdca26"
893
            ],
894
            [
895
             1,
896
             "#f0f921"
897
            ]
898
           ]
899
          },
900
          "colorway": [
901
           "#636efa",
902
           "#EF553B",
903
           "#00cc96",
904
           "#ab63fa",
905
           "#FFA15A",
906
           "#19d3f3",
907
           "#FF6692",
908
           "#B6E880",
909
           "#FF97FF",
910
           "#FECB52"
911
          ],
912
          "font": {
913
           "color": "#2a3f5f"
914
          },
915
          "geo": {
916
           "bgcolor": "white",
917
           "lakecolor": "white",
918
           "landcolor": "#E5ECF6",
919
           "showlakes": true,
920
           "showland": true,
921
           "subunitcolor": "white"
922
          },
923
          "hoverlabel": {
924
           "align": "left"
925
          },
926
          "hovermode": "closest",
927
          "mapbox": {
928
           "style": "light"
929
          },
930
          "paper_bgcolor": "white",
931
          "plot_bgcolor": "#E5ECF6",
932
          "polar": {
933
           "angularaxis": {
934
            "gridcolor": "white",
935
            "linecolor": "white",
936
            "ticks": ""
937
           },
938
           "bgcolor": "#E5ECF6",
939
           "radialaxis": {
940
            "gridcolor": "white",
941
            "linecolor": "white",
942
            "ticks": ""
943
           }
944
          },
945
          "scene": {
946
           "xaxis": {
947
            "backgroundcolor": "#E5ECF6",
948
            "gridcolor": "white",
949
            "gridwidth": 2,
950
            "linecolor": "white",
951
            "showbackground": true,
952
            "ticks": "",
953
            "zerolinecolor": "white"
954
           },
955
           "yaxis": {
956
            "backgroundcolor": "#E5ECF6",
957
            "gridcolor": "white",
958
            "gridwidth": 2,
959
            "linecolor": "white",
960
            "showbackground": true,
961
            "ticks": "",
962
            "zerolinecolor": "white"
963
           },
964
           "zaxis": {
965
            "backgroundcolor": "#E5ECF6",
966
            "gridcolor": "white",
967
            "gridwidth": 2,
968
            "linecolor": "white",
969
            "showbackground": true,
970
            "ticks": "",
971
            "zerolinecolor": "white"
972
           }
973
          },
974
          "shapedefaults": {
975
           "line": {
976
            "color": "#2a3f5f"
977
           }
978
          },
979
          "ternary": {
980
           "aaxis": {
981
            "gridcolor": "white",
982
            "linecolor": "white",
983
            "ticks": ""
984
           },
985
           "baxis": {
986
            "gridcolor": "white",
987
            "linecolor": "white",
988
            "ticks": ""
989
           },
990
           "bgcolor": "#E5ECF6",
991
           "caxis": {
992
            "gridcolor": "white",
993
            "linecolor": "white",
994
            "ticks": ""
995
           }
996
          },
997
          "title": {
998
           "x": 0.05
999
          },
1000
          "xaxis": {
1001
           "automargin": true,
1002
           "gridcolor": "white",
1003
           "linecolor": "white",
1004
           "ticks": "",
1005
           "title": {
1006
            "standoff": 15
1007
           },
1008
           "zerolinecolor": "white",
1009
           "zerolinewidth": 2
1010
          },
1011
          "yaxis": {
1012
           "automargin": true,
1013
           "gridcolor": "white",
1014
           "linecolor": "white",
1015
           "ticks": "",
1016
           "title": {
1017
            "standoff": 15
1018
           },
1019
           "zerolinecolor": "white",
1020
           "zerolinewidth": 2
1021
          }
1022
         }
1023
        },
1024
        "title": {
1025
         "text": "Model Evaluation"
1026
        },
1027
        "xaxis": {
1028
         "anchor": "y",
1029
         "domain": [
1030
          0,
1031
          1
1032
         ],
1033
         "title": {
1034
          "text": "Model"
1035
         }
1036
        },
1037
        "yaxis": {
1038
         "anchor": "x",
1039
         "domain": [
1040
          0,
1041
          1
1042
         ],
1043
         "title": {
1044
          "text": "IoU"
1045
         }
1046
        }
1047
       }
1048
      }
1049
     },
1050
     "metadata": {},
1051
     "output_type": "display_data"
1052
    }
1053
   ],
1054
   "source": [
1055
    "import plotly.express as px\n",
1056
    "import pandas as pd\n",
1057
    "\n",
1058
    "# Data\n",
1059
    "data = {\n",
1060
    "    'No': [1, 2, 3, 4],\n",
1061
    "    'Model': ['UNet', 'AttUNet', 'UNet++', 'R2UNet'],\n",
1062
    "    'IoU': [0.936, 0.928, 0.936, 0.915],\n",
1063
    "    'Time': [7.73, 6.563, 11.973, 11.837],\n",
1064
    "    'Param': [7851969, 8202053, 9162753, 10050241]\n",
1065
    "}\n",
1066
    "\n",
1067
    "df = pd.DataFrame(data)\n",
1068
    "\n",
1069
    "# Plotting\n",
1070
    "df_sorted = df.sort_values(by='IoU')\n",
1071
    "fig = px.scatter(df_sorted, x='Model', y='IoU', size='Time', color='Param',\n",
1072
    "                 hover_data=['Time', 'Param'], title='Model Evaluation')\n",
1073
    "\n",
1074
    "# Customize the plot\n",
1075
    "fig.update_layout(\n",
1076
    "    xaxis=dict(title='Model'),\n",
1077
    "    yaxis=dict(title='IoU'),\n",
1078
    "    coloraxis=dict(colorbar=dict(title='Param')),\n",
1079
    ")\n",
1080
    "\n",
1081
    "# Show the plot\n",
1082
    "fig.show()\n"
1083
   ]
1084
  },
1085
  {
1086
   "cell_type": "code",
1087
   "execution_count": 9,
1088
   "metadata": {},
1089
   "outputs": [
1090
    {
1091
     "data": {
1092
      "application/vnd.plotly.v1+json": {
1093
       "config": {
1094
        "plotlyServerURL": "https://plot.ly"
1095
       },
1096
       "data": [
1097
        {
1098
         "customdata": [
1099
          [
1100
           7.73,
1101
           7851969
1102
          ],
1103
          [
1104
           6.563,
1105
           8202053
1106
          ],
1107
          [
1108
           11.973,
1109
           9162753
1110
          ],
1111
          [
1112
           11.837,
1113
           10050241
1114
          ]
1115
         ],
1116
         "hovertemplate": "Model=%{x}<br>IoU=%{y}<br>Time=%{customdata[0]}<br>Param=%{marker.color}<extra></extra>",
1117
         "legendgroup": "",
1118
         "marker": {
1119
          "color": [
1120
           7851969,
1121
           8202053,
1122
           9162753,
1123
           10050241
1124
          ],
1125
          "coloraxis": "coloraxis",
1126
          "size": [
1127
           7.73,
1128
           6.563,
1129
           11.973,
1130
           11.837
1131
          ],
1132
          "sizemode": "area",
1133
          "sizeref": 0.0299325,
1134
          "symbol": "circle"
1135
         },
1136
         "mode": "markers",
1137
         "name": "",
1138
         "orientation": "v",
1139
         "showlegend": false,
1140
         "type": "scatter",
1141
         "x": [
1142
          "UNet",
1143
          "AttUNet",
1144
          "UNet++",
1145
          "R2UNet"
1146
         ],
1147
         "xaxis": "x",
1148
         "y": [
1149
          0.936,
1150
          0.928,
1151
          0.936,
1152
          0.915
1153
         ],
1154
         "yaxis": "y"
1155
        },
1156
        {
1157
         "hovertemplate": "Model=%{x}<br>IoU=%{y}<extra></extra>",
1158
         "legendgroup": "",
1159
         "line": {
1160
          "color": "#636efa",
1161
          "dash": "solid"
1162
         },
1163
         "marker": {
1164
          "symbol": "circle"
1165
         },
1166
         "mode": "lines",
1167
         "name": "",
1168
         "orientation": "v",
1169
         "showlegend": false,
1170
         "type": "scatter",
1171
         "x": [
1172
          "UNet",
1173
          "AttUNet",
1174
          "UNet++",
1175
          "R2UNet"
1176
         ],
1177
         "xaxis": "x",
1178
         "y": [
1179
          0.936,
1180
          0.928,
1181
          0.936,
1182
          0.915
1183
         ],
1184
         "yaxis": "y"
1185
        }
1186
       ],
1187
       "layout": {
1188
        "coloraxis": {
1189
         "colorbar": {
1190
          "title": {
1191
           "text": "Param"
1192
          }
1193
         },
1194
         "colorscale": [
1195
          [
1196
           0,
1197
           "#0d0887"
1198
          ],
1199
          [
1200
           0.1111111111111111,
1201
           "#46039f"
1202
          ],
1203
          [
1204
           0.2222222222222222,
1205
           "#7201a8"
1206
          ],
1207
          [
1208
           0.3333333333333333,
1209
           "#9c179e"
1210
          ],
1211
          [
1212
           0.4444444444444444,
1213
           "#bd3786"
1214
          ],
1215
          [
1216
           0.5555555555555556,
1217
           "#d8576b"
1218
          ],
1219
          [
1220
           0.6666666666666666,
1221
           "#ed7953"
1222
          ],
1223
          [
1224
           0.7777777777777778,
1225
           "#fb9f3a"
1226
          ],
1227
          [
1228
           0.8888888888888888,
1229
           "#fdca26"
1230
          ],
1231
          [
1232
           1,
1233
           "#f0f921"
1234
          ]
1235
         ]
1236
        },
1237
        "legend": {
1238
         "itemsizing": "constant",
1239
         "tracegroupgap": 0
1240
        },
1241
        "template": {
1242
         "data": {
1243
          "bar": [
1244
           {
1245
            "error_x": {
1246
             "color": "#2a3f5f"
1247
            },
1248
            "error_y": {
1249
             "color": "#2a3f5f"
1250
            },
1251
            "marker": {
1252
             "line": {
1253
              "color": "#E5ECF6",
1254
              "width": 0.5
1255
             },
1256
             "pattern": {
1257
              "fillmode": "overlay",
1258
              "size": 10,
1259
              "solidity": 0.2
1260
             }
1261
            },
1262
            "type": "bar"
1263
           }
1264
          ],
1265
          "barpolar": [
1266
           {
1267
            "marker": {
1268
             "line": {
1269
              "color": "#E5ECF6",
1270
              "width": 0.5
1271
             },
1272
             "pattern": {
1273
              "fillmode": "overlay",
1274
              "size": 10,
1275
              "solidity": 0.2
1276
             }
1277
            },
1278
            "type": "barpolar"
1279
           }
1280
          ],
1281
          "carpet": [
1282
           {
1283
            "aaxis": {
1284
             "endlinecolor": "#2a3f5f",
1285
             "gridcolor": "white",
1286
             "linecolor": "white",
1287
             "minorgridcolor": "white",
1288
             "startlinecolor": "#2a3f5f"
1289
            },
1290
            "baxis": {
1291
             "endlinecolor": "#2a3f5f",
1292
             "gridcolor": "white",
1293
             "linecolor": "white",
1294
             "minorgridcolor": "white",
1295
             "startlinecolor": "#2a3f5f"
1296
            },
1297
            "type": "carpet"
1298
           }
1299
          ],
1300
          "choropleth": [
1301
           {
1302
            "colorbar": {
1303
             "outlinewidth": 0,
1304
             "ticks": ""
1305
            },
1306
            "type": "choropleth"
1307
           }
1308
          ],
1309
          "contour": [
1310
           {
1311
            "colorbar": {
1312
             "outlinewidth": 0,
1313
             "ticks": ""
1314
            },
1315
            "colorscale": [
1316
             [
1317
              0,
1318
              "#0d0887"
1319
             ],
1320
             [
1321
              0.1111111111111111,
1322
              "#46039f"
1323
             ],
1324
             [
1325
              0.2222222222222222,
1326
              "#7201a8"
1327
             ],
1328
             [
1329
              0.3333333333333333,
1330
              "#9c179e"
1331
             ],
1332
             [
1333
              0.4444444444444444,
1334
              "#bd3786"
1335
             ],
1336
             [
1337
              0.5555555555555556,
1338
              "#d8576b"
1339
             ],
1340
             [
1341
              0.6666666666666666,
1342
              "#ed7953"
1343
             ],
1344
             [
1345
              0.7777777777777778,
1346
              "#fb9f3a"
1347
             ],
1348
             [
1349
              0.8888888888888888,
1350
              "#fdca26"
1351
             ],
1352
             [
1353
              1,
1354
              "#f0f921"
1355
             ]
1356
            ],
1357
            "type": "contour"
1358
           }
1359
          ],
1360
          "contourcarpet": [
1361
           {
1362
            "colorbar": {
1363
             "outlinewidth": 0,
1364
             "ticks": ""
1365
            },
1366
            "type": "contourcarpet"
1367
           }
1368
          ],
1369
          "heatmap": [
1370
           {
1371
            "colorbar": {
1372
             "outlinewidth": 0,
1373
             "ticks": ""
1374
            },
1375
            "colorscale": [
1376
             [
1377
              0,
1378
              "#0d0887"
1379
             ],
1380
             [
1381
              0.1111111111111111,
1382
              "#46039f"
1383
             ],
1384
             [
1385
              0.2222222222222222,
1386
              "#7201a8"
1387
             ],
1388
             [
1389
              0.3333333333333333,
1390
              "#9c179e"
1391
             ],
1392
             [
1393
              0.4444444444444444,
1394
              "#bd3786"
1395
             ],
1396
             [
1397
              0.5555555555555556,
1398
              "#d8576b"
1399
             ],
1400
             [
1401
              0.6666666666666666,
1402
              "#ed7953"
1403
             ],
1404
             [
1405
              0.7777777777777778,
1406
              "#fb9f3a"
1407
             ],
1408
             [
1409
              0.8888888888888888,
1410
              "#fdca26"
1411
             ],
1412
             [
1413
              1,
1414
              "#f0f921"
1415
             ]
1416
            ],
1417
            "type": "heatmap"
1418
           }
1419
          ],
1420
          "heatmapgl": [
1421
           {
1422
            "colorbar": {
1423
             "outlinewidth": 0,
1424
             "ticks": ""
1425
            },
1426
            "colorscale": [
1427
             [
1428
              0,
1429
              "#0d0887"
1430
             ],
1431
             [
1432
              0.1111111111111111,
1433
              "#46039f"
1434
             ],
1435
             [
1436
              0.2222222222222222,
1437
              "#7201a8"
1438
             ],
1439
             [
1440
              0.3333333333333333,
1441
              "#9c179e"
1442
             ],
1443
             [
1444
              0.4444444444444444,
1445
              "#bd3786"
1446
             ],
1447
             [
1448
              0.5555555555555556,
1449
              "#d8576b"
1450
             ],
1451
             [
1452
              0.6666666666666666,
1453
              "#ed7953"
1454
             ],
1455
             [
1456
              0.7777777777777778,
1457
              "#fb9f3a"
1458
             ],
1459
             [
1460
              0.8888888888888888,
1461
              "#fdca26"
1462
             ],
1463
             [
1464
              1,
1465
              "#f0f921"
1466
             ]
1467
            ],
1468
            "type": "heatmapgl"
1469
           }
1470
          ],
1471
          "histogram": [
1472
           {
1473
            "marker": {
1474
             "pattern": {
1475
              "fillmode": "overlay",
1476
              "size": 10,
1477
              "solidity": 0.2
1478
             }
1479
            },
1480
            "type": "histogram"
1481
           }
1482
          ],
1483
          "histogram2d": [
1484
           {
1485
            "colorbar": {
1486
             "outlinewidth": 0,
1487
             "ticks": ""
1488
            },
1489
            "colorscale": [
1490
             [
1491
              0,
1492
              "#0d0887"
1493
             ],
1494
             [
1495
              0.1111111111111111,
1496
              "#46039f"
1497
             ],
1498
             [
1499
              0.2222222222222222,
1500
              "#7201a8"
1501
             ],
1502
             [
1503
              0.3333333333333333,
1504
              "#9c179e"
1505
             ],
1506
             [
1507
              0.4444444444444444,
1508
              "#bd3786"
1509
             ],
1510
             [
1511
              0.5555555555555556,
1512
              "#d8576b"
1513
             ],
1514
             [
1515
              0.6666666666666666,
1516
              "#ed7953"
1517
             ],
1518
             [
1519
              0.7777777777777778,
1520
              "#fb9f3a"
1521
             ],
1522
             [
1523
              0.8888888888888888,
1524
              "#fdca26"
1525
             ],
1526
             [
1527
              1,
1528
              "#f0f921"
1529
             ]
1530
            ],
1531
            "type": "histogram2d"
1532
           }
1533
          ],
1534
          "histogram2dcontour": [
1535
           {
1536
            "colorbar": {
1537
             "outlinewidth": 0,
1538
             "ticks": ""
1539
            },
1540
            "colorscale": [
1541
             [
1542
              0,
1543
              "#0d0887"
1544
             ],
1545
             [
1546
              0.1111111111111111,
1547
              "#46039f"
1548
             ],
1549
             [
1550
              0.2222222222222222,
1551
              "#7201a8"
1552
             ],
1553
             [
1554
              0.3333333333333333,
1555
              "#9c179e"
1556
             ],
1557
             [
1558
              0.4444444444444444,
1559
              "#bd3786"
1560
             ],
1561
             [
1562
              0.5555555555555556,
1563
              "#d8576b"
1564
             ],
1565
             [
1566
              0.6666666666666666,
1567
              "#ed7953"
1568
             ],
1569
             [
1570
              0.7777777777777778,
1571
              "#fb9f3a"
1572
             ],
1573
             [
1574
              0.8888888888888888,
1575
              "#fdca26"
1576
             ],
1577
             [
1578
              1,
1579
              "#f0f921"
1580
             ]
1581
            ],
1582
            "type": "histogram2dcontour"
1583
           }
1584
          ],
1585
          "mesh3d": [
1586
           {
1587
            "colorbar": {
1588
             "outlinewidth": 0,
1589
             "ticks": ""
1590
            },
1591
            "type": "mesh3d"
1592
           }
1593
          ],
1594
          "parcoords": [
1595
           {
1596
            "line": {
1597
             "colorbar": {
1598
              "outlinewidth": 0,
1599
              "ticks": ""
1600
             }
1601
            },
1602
            "type": "parcoords"
1603
           }
1604
          ],
1605
          "pie": [
1606
           {
1607
            "automargin": true,
1608
            "type": "pie"
1609
           }
1610
          ],
1611
          "scatter": [
1612
           {
1613
            "fillpattern": {
1614
             "fillmode": "overlay",
1615
             "size": 10,
1616
             "solidity": 0.2
1617
            },
1618
            "type": "scatter"
1619
           }
1620
          ],
1621
          "scatter3d": [
1622
           {
1623
            "line": {
1624
             "colorbar": {
1625
              "outlinewidth": 0,
1626
              "ticks": ""
1627
             }
1628
            },
1629
            "marker": {
1630
             "colorbar": {
1631
              "outlinewidth": 0,
1632
              "ticks": ""
1633
             }
1634
            },
1635
            "type": "scatter3d"
1636
           }
1637
          ],
1638
          "scattercarpet": [
1639
           {
1640
            "marker": {
1641
             "colorbar": {
1642
              "outlinewidth": 0,
1643
              "ticks": ""
1644
             }
1645
            },
1646
            "type": "scattercarpet"
1647
           }
1648
          ],
1649
          "scattergeo": [
1650
           {
1651
            "marker": {
1652
             "colorbar": {
1653
              "outlinewidth": 0,
1654
              "ticks": ""
1655
             }
1656
            },
1657
            "type": "scattergeo"
1658
           }
1659
          ],
1660
          "scattergl": [
1661
           {
1662
            "marker": {
1663
             "colorbar": {
1664
              "outlinewidth": 0,
1665
              "ticks": ""
1666
             }
1667
            },
1668
            "type": "scattergl"
1669
           }
1670
          ],
1671
          "scattermapbox": [
1672
           {
1673
            "marker": {
1674
             "colorbar": {
1675
              "outlinewidth": 0,
1676
              "ticks": ""
1677
             }
1678
            },
1679
            "type": "scattermapbox"
1680
           }
1681
          ],
1682
          "scatterpolar": [
1683
           {
1684
            "marker": {
1685
             "colorbar": {
1686
              "outlinewidth": 0,
1687
              "ticks": ""
1688
             }
1689
            },
1690
            "type": "scatterpolar"
1691
           }
1692
          ],
1693
          "scatterpolargl": [
1694
           {
1695
            "marker": {
1696
             "colorbar": {
1697
              "outlinewidth": 0,
1698
              "ticks": ""
1699
             }
1700
            },
1701
            "type": "scatterpolargl"
1702
           }
1703
          ],
1704
          "scatterternary": [
1705
           {
1706
            "marker": {
1707
             "colorbar": {
1708
              "outlinewidth": 0,
1709
              "ticks": ""
1710
             }
1711
            },
1712
            "type": "scatterternary"
1713
           }
1714
          ],
1715
          "surface": [
1716
           {
1717
            "colorbar": {
1718
             "outlinewidth": 0,
1719
             "ticks": ""
1720
            },
1721
            "colorscale": [
1722
             [
1723
              0,
1724
              "#0d0887"
1725
             ],
1726
             [
1727
              0.1111111111111111,
1728
              "#46039f"
1729
             ],
1730
             [
1731
              0.2222222222222222,
1732
              "#7201a8"
1733
             ],
1734
             [
1735
              0.3333333333333333,
1736
              "#9c179e"
1737
             ],
1738
             [
1739
              0.4444444444444444,
1740
              "#bd3786"
1741
             ],
1742
             [
1743
              0.5555555555555556,
1744
              "#d8576b"
1745
             ],
1746
             [
1747
              0.6666666666666666,
1748
              "#ed7953"
1749
             ],
1750
             [
1751
              0.7777777777777778,
1752
              "#fb9f3a"
1753
             ],
1754
             [
1755
              0.8888888888888888,
1756
              "#fdca26"
1757
             ],
1758
             [
1759
              1,
1760
              "#f0f921"
1761
             ]
1762
            ],
1763
            "type": "surface"
1764
           }
1765
          ],
1766
          "table": [
1767
           {
1768
            "cells": {
1769
             "fill": {
1770
              "color": "#EBF0F8"
1771
             },
1772
             "line": {
1773
              "color": "white"
1774
             }
1775
            },
1776
            "header": {
1777
             "fill": {
1778
              "color": "#C8D4E3"
1779
             },
1780
             "line": {
1781
              "color": "white"
1782
             }
1783
            },
1784
            "type": "table"
1785
           }
1786
          ]
1787
         },
1788
         "layout": {
1789
          "annotationdefaults": {
1790
           "arrowcolor": "#2a3f5f",
1791
           "arrowhead": 0,
1792
           "arrowwidth": 1
1793
          },
1794
          "autotypenumbers": "strict",
1795
          "coloraxis": {
1796
           "colorbar": {
1797
            "outlinewidth": 0,
1798
            "ticks": ""
1799
           }
1800
          },
1801
          "colorscale": {
1802
           "diverging": [
1803
            [
1804
             0,
1805
             "#8e0152"
1806
            ],
1807
            [
1808
             0.1,
1809
             "#c51b7d"
1810
            ],
1811
            [
1812
             0.2,
1813
             "#de77ae"
1814
            ],
1815
            [
1816
             0.3,
1817
             "#f1b6da"
1818
            ],
1819
            [
1820
             0.4,
1821
             "#fde0ef"
1822
            ],
1823
            [
1824
             0.5,
1825
             "#f7f7f7"
1826
            ],
1827
            [
1828
             0.6,
1829
             "#e6f5d0"
1830
            ],
1831
            [
1832
             0.7,
1833
             "#b8e186"
1834
            ],
1835
            [
1836
             0.8,
1837
             "#7fbc41"
1838
            ],
1839
            [
1840
             0.9,
1841
             "#4d9221"
1842
            ],
1843
            [
1844
             1,
1845
             "#276419"
1846
            ]
1847
           ],
1848
           "sequential": [
1849
            [
1850
             0,
1851
             "#0d0887"
1852
            ],
1853
            [
1854
             0.1111111111111111,
1855
             "#46039f"
1856
            ],
1857
            [
1858
             0.2222222222222222,
1859
             "#7201a8"
1860
            ],
1861
            [
1862
             0.3333333333333333,
1863
             "#9c179e"
1864
            ],
1865
            [
1866
             0.4444444444444444,
1867
             "#bd3786"
1868
            ],
1869
            [
1870
             0.5555555555555556,
1871
             "#d8576b"
1872
            ],
1873
            [
1874
             0.6666666666666666,
1875
             "#ed7953"
1876
            ],
1877
            [
1878
             0.7777777777777778,
1879
             "#fb9f3a"
1880
            ],
1881
            [
1882
             0.8888888888888888,
1883
             "#fdca26"
1884
            ],
1885
            [
1886
             1,
1887
             "#f0f921"
1888
            ]
1889
           ],
1890
           "sequentialminus": [
1891
            [
1892
             0,
1893
             "#0d0887"
1894
            ],
1895
            [
1896
             0.1111111111111111,
1897
             "#46039f"
1898
            ],
1899
            [
1900
             0.2222222222222222,
1901
             "#7201a8"
1902
            ],
1903
            [
1904
             0.3333333333333333,
1905
             "#9c179e"
1906
            ],
1907
            [
1908
             0.4444444444444444,
1909
             "#bd3786"
1910
            ],
1911
            [
1912
             0.5555555555555556,
1913
             "#d8576b"
1914
            ],
1915
            [
1916
             0.6666666666666666,
1917
             "#ed7953"
1918
            ],
1919
            [
1920
             0.7777777777777778,
1921
             "#fb9f3a"
1922
            ],
1923
            [
1924
             0.8888888888888888,
1925
             "#fdca26"
1926
            ],
1927
            [
1928
             1,
1929
             "#f0f921"
1930
            ]
1931
           ]
1932
          },
1933
          "colorway": [
1934
           "#636efa",
1935
           "#EF553B",
1936
           "#00cc96",
1937
           "#ab63fa",
1938
           "#FFA15A",
1939
           "#19d3f3",
1940
           "#FF6692",
1941
           "#B6E880",
1942
           "#FF97FF",
1943
           "#FECB52"
1944
          ],
1945
          "font": {
1946
           "color": "#2a3f5f"
1947
          },
1948
          "geo": {
1949
           "bgcolor": "white",
1950
           "lakecolor": "white",
1951
           "landcolor": "#E5ECF6",
1952
           "showlakes": true,
1953
           "showland": true,
1954
           "subunitcolor": "white"
1955
          },
1956
          "hoverlabel": {
1957
           "align": "left"
1958
          },
1959
          "hovermode": "closest",
1960
          "mapbox": {
1961
           "style": "light"
1962
          },
1963
          "paper_bgcolor": "white",
1964
          "plot_bgcolor": "#E5ECF6",
1965
          "polar": {
1966
           "angularaxis": {
1967
            "gridcolor": "white",
1968
            "linecolor": "white",
1969
            "ticks": ""
1970
           },
1971
           "bgcolor": "#E5ECF6",
1972
           "radialaxis": {
1973
            "gridcolor": "white",
1974
            "linecolor": "white",
1975
            "ticks": ""
1976
           }
1977
          },
1978
          "scene": {
1979
           "xaxis": {
1980
            "backgroundcolor": "#E5ECF6",
1981
            "gridcolor": "white",
1982
            "gridwidth": 2,
1983
            "linecolor": "white",
1984
            "showbackground": true,
1985
            "ticks": "",
1986
            "zerolinecolor": "white"
1987
           },
1988
           "yaxis": {
1989
            "backgroundcolor": "#E5ECF6",
1990
            "gridcolor": "white",
1991
            "gridwidth": 2,
1992
            "linecolor": "white",
1993
            "showbackground": true,
1994
            "ticks": "",
1995
            "zerolinecolor": "white"
1996
           },
1997
           "zaxis": {
1998
            "backgroundcolor": "#E5ECF6",
1999
            "gridcolor": "white",
2000
            "gridwidth": 2,
2001
            "linecolor": "white",
2002
            "showbackground": true,
2003
            "ticks": "",
2004
            "zerolinecolor": "white"
2005
           }
2006
          },
2007
          "shapedefaults": {
2008
           "line": {
2009
            "color": "#2a3f5f"
2010
           }
2011
          },
2012
          "ternary": {
2013
           "aaxis": {
2014
            "gridcolor": "white",
2015
            "linecolor": "white",
2016
            "ticks": ""
2017
           },
2018
           "baxis": {
2019
            "gridcolor": "white",
2020
            "linecolor": "white",
2021
            "ticks": ""
2022
           },
2023
           "bgcolor": "#E5ECF6",
2024
           "caxis": {
2025
            "gridcolor": "white",
2026
            "linecolor": "white",
2027
            "ticks": ""
2028
           }
2029
          },
2030
          "title": {
2031
           "x": 0.05
2032
          },
2033
          "xaxis": {
2034
           "automargin": true,
2035
           "gridcolor": "white",
2036
           "linecolor": "white",
2037
           "ticks": "",
2038
           "title": {
2039
            "standoff": 15
2040
           },
2041
           "zerolinecolor": "white",
2042
           "zerolinewidth": 2
2043
          },
2044
          "yaxis": {
2045
           "automargin": true,
2046
           "gridcolor": "white",
2047
           "linecolor": "white",
2048
           "ticks": "",
2049
           "title": {
2050
            "standoff": 15
2051
           },
2052
           "zerolinecolor": "white",
2053
           "zerolinewidth": 2
2054
          }
2055
         }
2056
        },
2057
        "title": {
2058
         "text": "Model Evaluation"
2059
        },
2060
        "xaxis": {
2061
         "anchor": "y",
2062
         "domain": [
2063
          0,
2064
          1
2065
         ],
2066
         "title": {
2067
          "text": "Model"
2068
         }
2069
        },
2070
        "yaxis": {
2071
         "anchor": "x",
2072
         "domain": [
2073
          0,
2074
          1
2075
         ],
2076
         "title": {
2077
          "text": "IoU"
2078
         }
2079
        }
2080
       }
2081
      }
2082
     },
2083
     "metadata": {},
2084
     "output_type": "display_data"
2085
    }
2086
   ],
2087
   "source": [
2088
    "import plotly.express as px\n",
2089
    "import pandas as pd\n",
2090
    "\n",
2091
    "# Data\n",
2092
    "data = {\n",
2093
    "    'No': [1, 2, 3, 4],\n",
2094
    "    'Model': ['UNet', 'AttUNet', 'UNet++', 'R2UNet'],\n",
2095
    "    'IoU': [0.936, 0.928, 0.936, 0.915],\n",
2096
    "    'Time': [7.73, 6.563, 11.973, 11.837],\n",
2097
    "    'Param': [7851969, 8202053, 9162753, 10050241]\n",
2098
    "}\n",
2099
    "\n",
2100
    "df = pd.DataFrame(data)\n",
2101
    "\n",
2102
    "\n",
2103
    "\n"
2104
   ]
2105
  }
2106
 ],
2107
 "metadata": {
2108
  "kernelspec": {
2109
   "display_name": "kuliah",
2110
   "language": "python",
2111
   "name": "python3"
2112
  },
2113
  "language_info": {
2114
   "codemirror_mode": {
2115
    "name": "ipython",
2116
    "version": 3
2117
   },
2118
   "file_extension": ".py",
2119
   "mimetype": "text/x-python",
2120
   "name": "python",
2121
   "nbconvert_exporter": "python",
2122
   "pygments_lexer": "ipython3",
2123
   "version": "3.10.6"
2124
  },
2125
  "orig_nbformat": 4
2126
 },
2127
 "nbformat": 4,
2128
 "nbformat_minor": 2
2129
}