import pandas as pd
import matplotlib.pyplot as plt
# Dataset performance data
data = {
"Dataset": ["IDRiD", "Kaggle APTOS", "MESSIDOR", "EyePACS", "DIARETDB1", "e-ophtha"],
"Image Resolution": ["4288 x 2848", "1024 x 1024", "2240 x 1488", "640 x 480", "1500 x 1152", "1440 x 960"],
"Model Used": ["FR-UNET", "FR-UNET", "DeepLabV3+", "U-Net", "ResUNet", "Attention U-Net"],
"Accuracy (%)": [96.5, 95.8, 94.2, 93.1, 92.0, 91.5],
"Sensitivity (%)": [95.3, 94.6, 92.7, 91.5, 89.6, 90.1],
"Specificity (%)": [97.1, 96.3, 95.0, 94.2, 93.3, 92.8],
"F1-Score": [0.94, 0.93, 0.91, 0.90, 0.88, 0.87],
"IoU (%)": [89.2, 87.8, 86.5, 85.3, 82.7, 81.9]
}
# Create a DataFrame
df = pd.DataFrame(data)
# Display the table
print(df)
# Plot the comparison as a bar chart for Accuracy, IoU
fig, ax = plt.subplots(figsize=(10, 6))
# Plot for Accuracy
df.plot(x="Dataset", y="Accuracy (%)", kind="bar", ax=ax, color="blue", label="Accuracy", position=0)
# Plot for IoU
df.plot(x="Dataset", y="IoU (%)", kind="bar", ax=ax, color="green", label="IoU", position=1)
# Add labels and title
ax.set_ylabel('Percentage (%)')
ax.set_title('Dataset Performance Comparison')
ax.legend(["Accuracy", "IoU"])
# Show plot
plt.xticks(rotation=45, ha="right")
plt.tight_layout()
plt.show()Dataset Image Resolution Model Used Accuracy (%) \ 0 IDRiD 4288 x 2848 FR-UNET 96.5 1 Kaggle APTOS 1024 x 1024 FR-UNET 95.8 2 MESSIDOR 2240 x 1488 DeepLabV3+ 94.2 3 EyePACS 640 x 480 U-Net 93.1 4 DIARETDB1 1500 x 1152 ResUNet 92.0 5 e-ophtha 1440 x 960 Attention U-Net 91.5 Sensitivity (%) Specificity (%) F1-Score IoU (%) 0 95.3 97.1 0.94 89.2 1 94.6 96.3 0.93 87.8 2 92.7 95.0 0.91 86.5 3 91.5 94.2 0.90 85.3 4 89.6 93.3 0.88 82.7 5 90.1 92.8 0.87 81.9
import pandas as pd
import matplotlib.pyplot as plt
# Dataset performance data
data = {
"Dataset": ["IDRiD", "Kaggle APTOS", "MESSIDOR", "EyePACS", "DIARETDB1", "e-ophtha"],
"Image Resolution": ["4288 x 2848", "1024 x 1024", "2240 x 1488", "640 x 480", "1500 x 1152", "1440 x 960"],
"Model Used": ["FR-UNET", "FR-UNET", "DeepLabV3+", "U-Net", "ResUNet", "Attention U-Net"],
"Accuracy (%)": [96.5, 95.8, 94.2, 93.1, 92.0, 91.5],
"Sensitivity (%)": [95.3, 94.6, 92.7, 91.5, 89.6, 90.1],
"Specificity (%)": [97.1, 96.3, 95.0, 94.2, 93.3, 92.8],
"F1-Score": [0.94, 0.93, 0.91, 0.90, 0.88, 0.87],
"IoU (%)": [89.2, 87.8, 86.5, 85.3, 82.7, 81.9]
}
# Create a DataFrame
df = pd.DataFrame(data)
# Display the table
print(df)
# Plot the comparison as a bar chart for Accuracy, IoU
fig, ax = plt.subplots(figsize=(10, 6))
# Plot for Accuracy
df.plot(x="Dataset", y="Accuracy (%)", kind="bar", ax=ax, color="blue", label="Accuracy", position=0)
# Plot for IoU
df.plot(x="Dataset", y="IoU (%)", kind="bar", ax=ax, color="green", label="IoU", position=1)
# Add labels and title
ax.set_ylabel('Percentage (%)')
ax.set_title('Dataset Performance Comparison')
ax.legend(["Accuracy", "IoU"])
# Show plot
plt.xticks(rotation=45, ha="right")
plt.tight_layout()
plt.show()Dataset Image Resolution Model Used Accuracy (%) \ 0 IDRiD 4288 x 2848 FR-UNET 96.5 1 Kaggle APTOS 1024 x 1024 FR-UNET 95.8 2 MESSIDOR 2240 x 1488 DeepLabV3+ 94.2 3 EyePACS 640 x 480 U-Net 93.1 4 DIARETDB1 1500 x 1152 ResUNet 92.0 5 e-ophtha 1440 x 960 Attention U-Net 91.5 Sensitivity (%) Specificity (%) F1-Score IoU (%) 0 95.3 97.1 0.94 89.2 1 94.6 96.3 0.93 87.8 2 92.7 95.0 0.91 86.5 3 91.5 94.2 0.90 85.3 4 89.6 93.3 0.88 82.7 5 90.1 92.8 0.87 81.9