knazeri / edge-connect

EdgeConnect: Structure Guided Image Inpainting using Edge Prediction, ICCV 2019 https://arxiv.org/abs/1901.00212
http://openaccess.thecvf.com/content_ICCVW_2019/html/AIM/Nazeri_EdgeConnect_Structure_Guided_Image_Inpainting_using_Edge_Prediction_ICCVW_2019_paper.html
Other
2.51k stars 532 forks source link

fid score error #146

Closed miaodd98 closed 4 years ago

miaodd98 commented 4 years ago

I'm trying to evaluate fid score on my datasets. However, when I run fid_score.py, these error happens: imgs = np.array([imread(str(fn)).astype(np.float32) for fn in files]) Traceback (most recent call last): File "./scripts/fid_score.py", line 239, in args.dims) File "./scripts/fid_score.py", line 223, in calculate_fid_given_paths m1, s1 = _compute_statistics_of_path(paths[0], model, batch_size, dims, cuda) File "./scripts/fid_score.py", line 196, in _compute_statistics_of_path imgs = np.array([imread(str(fn)).astype(np.float32) for fn in files]) ValueError: could not broadcast input array from shape (256,256,3) into shape (256,256)

It seems there is something wrong when loading the images. I wonder what to do to solve this. Many thanks!

miaodd98 commented 4 years ago

It seems that the problem is related to function imread. I use the cv2 version and solve it.