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() Click Run or press shift + ENTER to run code