AFA-Net: Adaptive Feature Attention Network in Image Deblurring and Super-Resolution for Improving License Plate Recognition
Although a number of license plate recognition (LPR) systems have become significantly advanced, they are still far from producing ideal images. They are still fiddled with low-resolution (LR) and motion blur, which are two of the most common problems in images extracted from automobile driving environment. In order to address this issue, we present a novel LPR method that processes LR and motion blurred images from dash cams. We propose a unique framework, AFA-Net (Adaptive Feature Attention Network), which synthesizes the characteristics of Super Resolution (SR) and deblurring sub-networks at the pixel and feature levels. The proposed AFA-Net, organized by image pre-restoration, feature composition and image reconstruction modules, can generate a clear restoration image for robust LPR performance with the images obtained from dash cams in an unconstrained environment. Furthermore, we explore the novel problem, Joint-IRLPRNet (Joint-Image Restoration and License Plate Recognition Network), that simultaneously address image restoration (i.e. SR and deblurring) and LPR in an end-to end trainable manner. Moreover, we introduce a dataset called LBLP (LR and blurred license plate (LP)). The dataset is composed of 2,779 LR and motion blurred cropped LP images, extracted from unconstrained dash cams. The experimental results on LBLP dataset indicate that AFA-Net achieves 15.28% improvement in recognition accuracy, 6.47% in sequence similarity, and 3.89% in character similarity, compared to the traditional LPR model with image restoration model. Moreover, Joint-IRLPRNet can be more effective results than AFA-Net.
Prerequisites for AFA-Net.
AIR Research Framework is supported on Ubuntu 16.04 LTS or above.
It is recommended that use Python 3.7 or greater, which can be installed either through the Anaconda package manager or the Python website.
Recommended that use Pytorch 1.5.0 or above version. Important: EDVR or some models that have dependency on Deformable Convolution Networks feature only works in Pytorch 1.5.0a0+8f84ded.
At the first, pull docker container image. docker pull nvcr.io/nvidia/pytorch:20.03-py3
git clone https://github.com/DoGunKIM93/AFA-Net.git
pip install fast_slic munch IQA_pytorch pillow
LBLP Dataset download : google drive link (https://drive.google.com/file/d/1e95003bFPG30soCQan_opC6l3wHaIaU2/view?usp=drive_link)
datasetPath: 'dataset directory path' (in Param.yaml)
LBLP Pre-trained download : google drive link for original model (https://drive.google.com/drive/folders/1HlkP7DWPqeFg_cAHxWJAc7eN0xY7__yY?usp=drive_link)
pretrainedPath: 'Pre-trained directory path' (in Param.yaml)
At AFA-Net folder, type following command:
python main.py
At AFA-Net folder, type following command:
python main.py -it