up42 / image-similarity-measures

:chart_with_upwards_trend: Implementation of eight evaluation metrics to access the similarity between two images. The eight metrics are as follows: RMSE, PSNR, SSIM, ISSM, FSIM, SRE, SAM, and UIQ.
MIT License
540 stars 68 forks source link

ModuleNotFoundError: No module named 'image_similarity_measures' #65

Open grapemaidaa opened 3 months ago

grapemaidaa commented 3 months ago

When I run the code, it fails. 'image_similarity_measures' is a folder name,what should I do?

seedlit commented 3 months ago

Hi @grapemaidaa thanks for raising the issue. Can you share minimalist code to reproduce the issue?

grapemaidaa commented 3 months ago

Hi @seedlit Thanks for your reply. I have solved this problem but there is another problem.Can this code only calculate the metric between two pictures? I want to calculate SSIM & PSNR of pictures in two folders.Then what should I do? Besides, what does the format of "metrics" look like when running in the command line?

python evaluate.py --org_img_path "/media/grapemaid/本地磁盘/grapemaidaaaaa/SSMI&PSNR/real/1.png" --pred_img_path "/media/grapemaid/本地磁盘/grapemaidaaaaa/SSMI&PSNR/generated/1.png" --metrics ["ssim","psnr"]
usage: evaluate.py [-h] --org_img_path FILE --pred_img_path FILE [--metric METRIC]
evaluate.py: error: unrecognized arguments: --metrics [ssim,psnr]

If I do not add "--metrics ["ssim","psnr"]" in the command line, It works. And it calculates the "psnr" between the two pictures.