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!
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!