NoviScl / Design2Code

MIT License
426 stars 31 forks source link

Potential Bug in Metric v3 #13

Closed NoviScl closed 7 months ago

NoviScl commented 7 months ago

Example 11625.png in gpt4v_visual_revision_prompting, error below:

Traceback (most recent call last):
 File “eval.py”, line 46, in <module>
  matched, final_score, multi_score = visual_eval_v3(os.path.join(predictions_dir, filename.replace(“.html”, “.png”)), os.path.join(reference_dir, filename.replace(“.html”, “.png”)))
 File “/Users/clsi/Desktop/Pix2Code/Pix2Code/metrics/visual_score.py”, line 963, in visual_eval_v3
  blocks1 = get_blocks_ocr_free(gpt_img)
 File “/Users/clsi/Desktop/Pix2Code/Pix2Code/metrics/ocr_free_utils.py”, line 229, in get_blocks_ocr_free
  different_pixels = find_different_pixels(p_png, p_png_1)
 File “/Users/clsi/Desktop/Pix2Code/Pix2Code/metrics/ocr_free_utils.py”, line 74, in find_different_pixels
  raise ValueError(“Images are not the same size”)
ValueError: Images are not the same size

@StevenyzZhang

StevenyzZhang commented 7 months ago

This might be a multi processing issue, will fix it later.