# I am not maintaining this repo anymore. Please refer to [this repo](https://github.com/SayedNadim/Image-Quality-Evaluation-Metrics) for updated version. Thank you.
## Inpainting Evaluation Metrics (On-going)
The goal of this repo is to provide a common evaluation script for image inpainting tasks. It contains some commonly used image quality metrics for inpainting (e.g., L1, L2, SSIM, PSNR and [LPIPS](https://github.com/richzhang/PerceptualSimilarity)).
Pull requests and corrections/suggestions will be cordially appreciated.
### Please Note
- Images are scaled to [0,1]. If you need to change the data range, please make sure to change the data range in SSIM and PSNR.
- Number of generated images and ground truth images have to be exactly same.
- I have resized the images to be (`256,256`). You can change the resolution based on your needs.
- Please make sure that all the images (generated and gt images) are in the corresponding folders. Currently,it can not calculate metrics if there are sub-folders. I will update the code to calculate for sub-folders as well.
- LPIPS is a bit slow. So, if you have lots of images, it might take a lot of time. (For ~1000 images, it took around ~15-20 minutes on my personal setup (1 TitanXP). Other metrics are fast and took around ~20 seconds to compute.)
### Requirements
- PyTorch ( `>= 1.0` )
- Python ( `>=3.5` )
- [PyTorch Image Quality (PIQ)](https://github.com/photosynthesis-team/piq) ( `$ pip install piq` )
### Usage
- Usable Arguments
- `--input_path` - path to your generated images (required).
- `--gt_path` - path to your ground truth images (required).
- `--batch_size` - batch size you want to use (Default to 4).
- `--image_width` - width of the image (both generated image and ground truth images will be resized to this width. Default to 256).
- `--image_height` - width of the image (both generated image and ground truth images will be resized to this width. Default to 256).
- `--threads` - threads to be used for multi-processing (Default to 4).
- Please provide paths of the folders (i.e., folder of generated images and folder of ground truth images).
`python main.py --input_path path/to/generated/images --gt_path path/to/ground/truth/images`
- If you need to save it in a `.txt` file, then simply run
`python main.py --input_path path/to/generated/images --gt_path path/to/ground/truth/images >> results.txt`
### To-do
- [x] L1
- [x] L2
- [x] SSIM
- [x] PSNR
- [x] LPIPS
- [ ] FID
- [ ] IS
### Acknowledgement
Thanks to [PhotoSynthesis Team](https://github.com/photosynthesis-team/piq) for the wonderful implementation of the metrics. Please cite accordingly if you use PIQ for the evaluation.
Cheers!!
没有合适的资源?快使用搜索试试~ 我知道了~
包含一些常用的修复图像质量指标(例如,L1、L2、SSIM、PSNR和LPIPS).zip
共10个文件
xml:5个
py:2个
gitignore:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 199 浏览量
2023-03-21
23:59:32
上传
评论
收藏 7KB ZIP 举报
温馨提示
这个repo的目标是为图像修复任务提供一个通用的评估脚本。它包含一些常用的修复图像质量指标(例如,L1、L2、SSIM、PSNR和LPIPS)。
资源推荐
资源详情
资源评论
收起资源包目录
这个repo的目标是为图像修复任务提供一个通用的评估脚本。它包含一些常用的修复图像质量指标(例如,L1、L2、SSIM、PSNR和LPIPS)。.zip (10个子文件)
Inpainting-Evaluation-Metrics-master
main.py 4KB
.idea
evaluation_metrics.iml 284B
misc.xml 195B
inspectionProfiles
Project_Default.xml 591B
profiles_settings.xml 174B
modules.xml 288B
csv-plugin.xml 1KB
.gitignore 47B
read_datasets.py 3KB
README.md 3KB
共 10 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功