deblur

所属分类:通讯编程
开发工具:Python
文件大小:59252KB
下载次数:1
上传日期:2022-09-14 23:15:00
上 传 者sh-1993
说明:  2014年IEEE论文“通过L0正则化强度和梯度先验消除文本图像模糊”的Python实现
(Python implementation of 2014 IEEE paper "Deblurring Text Images via L0 Regularized Intensity and Gradient Prior")

文件列表:
LICENSE (1112, 2023-09-06)
assets (0, 2023-09-06)
assets\psnr.png (15884, 2023-09-06)
assets\text_psnr.png (16850, 2023-09-06)
data (0, 2023-09-06)
data\ieee2016 (0, 2023-09-06)
data\ieee2016\low-illumination (0, 2023-09-06)
data\ieee2016\low-illumination\blur_images (0, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_1_blur.png (388947, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_2_blur.png (371070, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_3_blur.png (353786, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_4_blur.png (372966, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_5_blur.png (367053, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_6_blur.png (369525, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_7_blur.png (358105, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img1_8_blur.png (360619, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_1_blur.png (320720, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_2_blur.png (304358, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_3_blur.png (286685, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_4_blur.png (304434, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_5_blur.png (304955, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_6_blur.png (305644, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_7_blur.png (288774, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img2_8_blur.png (291641, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_1_blur.png (339228, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_2_blur.png (320547, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_3_blur.png (304286, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_4_blur.png (323784, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_5_blur.png (324568, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_6_blur.png (328145, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_7_blur.png (310119, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img3_8_blur.png (309677, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img4_1_blur.png (782469, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img4_2_blur.png (744652, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img4_3_blur.png (716678, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img4_4_blur.png (730409, 2023-09-06)
data\ieee2016\low-illumination\blur_images\saturated_img4_5_blur.png (754493, 2023-09-06)
... ...

# deblur This is an unofficial Python implementation of the 2014 IEEE paper "Deblurring Text Images via L0 Regularized Intensity and Gradient Prior" by [J. Pan, Z. Hu, Z. Su, and M. Yang](https://openaccess.thecvf.com/content_cvpr_2014/papers/Pan_Deblurring_Text_Images_2014_CVPR_paper.pdf) We also provide extra functionality to deblur images with a [Kaggle Blur Dataset](https://www.kaggle.com/datasets/kwentar/blur-dataset?resource=download) ## Project info This is implemented as the final project for CS1430 at Brown. Contributing members: Alan Gu, Edward Xing, Luca Fonstad, Paul Zhiyuan Zhou ## Setting up ```bash python3 -m venv env source env/bin/activate pip3 install -r requirements.txt ``` ## Running deblur images ```python python3 -m deblur.motion_deblur [--data ieee] [--save] [--regularizatio n] [--threshold] # use either `ieee` or `kaggle` for the --data option to run different datasets to deblur # use --save to save the deblurring results to disk # use --regularization to change the regularization used for artifact removal # use --threshold only on grayscale images to enhance results ``` run `python3 -m deblur.motion_deblur --help` for more information evaluate the PSNR of deblurring results (this may take quite a while) ```python python3 -m deblur.eval ``` ## Results We achieve comparable PSNR performance as the IEEE paper: ![psnr results](assets/psnr.png) Furthermore, we also propose a image pixel intensity threshold method that achieves better PSNR results for grayscale text images: ![psnr results](assets/text_psnr.png) use the `--threshold` option to run the `motion_deblur.py` to try it out! ## File structure `data/`: the data directory `assets/`: the assets directory holding images for README `resources/`: data storage for artifacts removal functionality `deblur/`: the source code directory, in which we have: `conjugate_gradient.py`: our implementation of the conjugate gradient algorithm as an optimization scheme `eval.py`: the script to evaluate results `get_data.py`: data preprocessing and parsing `motion_deblur.py`: the main magic and algorithms to deblur images `params.py`: storage for hyperparameters `visualize.py`: visualization methods

近期下载者

相关文件


收藏者