Spaces:
Running
Running
File size: 641 Bytes
a745a5e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import matplotlib.pyplot as plt
# Beam sizes tested
beam_sizes = [1, 3, 5, 10]
# Example CIDEr scores from experiments
blip_scores = [0.52, 0.59, 0.61, 0.60]
vit_scores = [0.50, 0.56, 0.60, 0.58]
git_scores = [0.12, 0.16, 0.17, 0.16]
plt.figure(figsize=(8,5))
plt.plot(beam_sizes, blip_scores, marker='o', label="BLIP")
plt.plot(beam_sizes, vit_scores, marker='o', label="ViT-GPT2")
plt.plot(beam_sizes, git_scores, marker='o', label="GIT")
plt.xlabel("Beam Size")
plt.ylabel("CIDEr Score")
plt.title("Effect of Beam Size on Caption Quality")
plt.legend()
plt.grid(True)
plt.savefig("beam_search_experiment.png", dpi=300)
plt.show() |