Automatic Signboard Detection from Natural Scene Image in Context of Bangladesh Google Street View

03/04/2020 ∙ by Md. Sadrul Islam Toaha, et al. ∙ United International University 0

Automatic signboard region detection is the first step of information extraction about establishments from an image, especially when there is a complex background and multiple signboard regions are present in the image. Automatic signboard detection in Bangladesh is a challenging task because of low quality street view image, presence of overlapping objects and presence of signboard like objects which are not actually signboards. In this research, we provide a novel dataset from the perspective of Bangladesh city streets with an aim of signboard detection, namely Bangladesh Street View Signboard Objects (BSVSO) image dataset. We introduce a novel approach to detect signboard accurately by applying smart image processing techniques and statistically determined hyperparameter based deep learning method, Faster R-CNN. Comparison of different variations of this segmentation based learning method have also been performed in this research.



There are no comments yet.


page 2

page 5

page 6

page 8

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Location navigation of web map system makes our daily traveling more comfortable. In most cases, people search map location using nearby establishment details. Nowadays, transportation assisting applications are growing fast such as Google Maps, UBER. However, the establishment annotation process is still manual and inauthentic. The information of street establishments such as shops, hospitals, banks and other commercial landmarks are still manually crowd sourced. Most of the small scale business enterprises like tea stalls, laundries and tailor’s shops are yet to be annotated. Signboards are vital information source for roadside establishments. Therefore, the problem can be solved by automatic annotation of signboard information. The problem can be divided into two parts - detecting signboard from natural scene image and recognizing optical characters in segmented signboard image. In the presence of complex background and multiple signboards, this two step procedure is necessary.

A number of signboard detection and information extraction based research works have been undertaken in recent years. A generic signboard detection system proposed in [7], a classical image processing technique based signboard recognition system proposed in [2], a framework for Urdu-English signboard text detection proposed in [3] and a segmentation technique based signboard legality detector proposed in [1] are among some of these researches.

Although these systems are promising, we find that there is no existing signboard related research work on the perspective of city streets. It is perhaps because of the unavailability of any suitable signboard dataset. We build our novel dataset namely Bangladesh Street View Signboard Objects (BSVSO) leveraging Google Map Street View technology. In BSVSO dataset, images are noisy and signboards are covered with objects such as wires, pillars and trees.

Figure 1: Sample data from BSVSO dataset (left), sample data from OCR based system (right).

Some non-signboard objects are similar to signboard such as banner, billboard and advertising placard. The presence of multiple signboards in single image is another challenge. These challenges are embedded in all images which are collected from open source street view of cities situated in developing countries. In Figure


, the left image is taken from our BSVSO dataset while the right image is a sample image used in related researches. This proves the complexity of our case. Most of the signboard detection systems are based on classical object detection techniques. In these systems, geometrical analysis and manual image feature extraction techniques are applied on pre-processed dataset to detect signboard regions. Recent advancement of segmentation based deep learning approaches out-perform the classical image processing methods in object detection tasks. These are state-of-the-art visual object detection techniques that combine rich feature extraction based convolutional and region proposal layers.

In this research, we tackle the challenges embedded in our dataset using smart image pre-processing techniques and segmentation based learning algorithm with statistically tuned hyperparameters. We compare different variations of our model on our BSVSO dataset and achieve an impressive mAP score over 0.8 on our validation set.

2 Related Work

J. Park et al. (2009) proposed a system for automatic Korean text recognition and translation into English on shop signboard images [4]. Their proposed method was based on classical image processing algorithms for character recognition and MSD method for translation. I. Z. Wu and H. Chang (2015) presented two manual image processing methods for signboard detection and OCR recognition task [8]. Signboard ROI detection and traditional OCR with SIFT algorithm were used to recognize signboard texts. Their model performance result got challenged by different signboard-character orientation and shape. F. Shao et al. (2019) proposed a new method combined of Faster R-CNN and classical image processing algorithms to detect traffic-sign recognition [6]. After processing image features using MSER algorithm and after training on Faster R-CNN, they applied their method on CTSD and GTSDB dataset. Due to Faster R-CNN fixed anchor scale ratio they faced low performance on their proposed method.

D. Lim et al.(2017) proposed a classical image processing method after experimenting on several image processing techniques to recognize signboards [2]. They applied morphological operations and then transformed images into Hough line formation to segment the signboard area. Then they constructed the detected ROIs on warped image. They claimed that their proposed system can detect the signboard area. However, their generation method worked only on single ROI signboard object image data.

H. Shen and X. Tang (2003) developed a generic signboard detection system [7]

. At first they pre-processed their images with noise reduction and edge detection algorithms. Then they applied Gradient Hough transformation and vector geometry analysis, finally detected the signboard by removing redundant rectangle boxes. They showed their success result based on 104 image data-set. Their method got confused in noisy and mostly overlapped signboards condition.

M. A. Panhwar et al. (2019) proposed framework for signboard detection and Urdu-English text detection in natural signboard images [3]

. Their framework was based on manual image processing deep neural network. They applied image segmentation algorithms for signboard and text region detection. Finally they applied detected image parts on neural network architectures for text recognition.

K. Bochkareva and E. Smirnova (2019) has introduced a method based on Faster R-CNN and image rectification technique [1]. Their motivation for building such model was for detecting advertising objects (store-front signboard) on building facades to check their legality. At first they applied image rectification on google street view datasets for better feature extraction. Then they trained the Faster R-CNN model on the dataset. Finally they detected signboards and other advertising objects according to their legal rules.

The method proposed by D. Lim (2017) [2] was only applied when a signboard was present in an image, while it might not work for multiple signboard detection. The method presented by H. Shen (2003) [7] worked better when the boundaries of the generic signboard is straight. In case of pursed signboard in an image, this method would not give successful detection. An approach of detecting signboard proposed by K. Bochkarev (2019) [1] worked only for the regional-level law that must be obeyed for putting signboards on building. In this case, many signboards would not be detected that maintained the law.

3 Our Dataset

We introduce a novel image dataset of signboards, namely BSVSO - Bangladesh Street View Signboard Objects. This dataset contains signboard images of different shapes and colors from 9 cities of Bangladesh - Dhaka, Sylhet, Chittagong, Rajshahi, Khulna, Rangpur, Bogra, Pabna and Barisal. In BSVSO dataset, signboards are written in Bengali, English and English-Bengali combined.

BSVSO dataset details are as follows: 5000 RGB images, 2600 labeled data in Pascal VOC format (total 5687 signboards in these images) and image resolution of 1000*600 pixels. CSV file for the annotations have been generated using labeled xml files. Annotation files contain image id, file path, bounding box (xmin, xmax, ymin, ymax, width) and object class fields. An auto labeling tool named labelImg has been used for getting the value of signboard position (bounding box) based on Pascal VOC image annotation format.

We have provided BSVSO image data, labelled XML files, annotation files and CSV files of signboard object details (aspect_ratio, area) and important python scripts. Google Map Street View technology has covered most of the regions in Bangladesh which has helped us in building our dataset. Every files related to our dataset can be found here.

4 Proposed Method

4.1 Classical Processing

Our classical approach for signboard detection is based on contours and bounding rectangle algorithm. At first non local means denoising (NLMD) is applied on RGB image thus converting it into gray-scale image. Then gaussian filter and NLMD are applied on gray-scale image to enhance signboard pixels. The next step is to detect signboard ROI using canny edge detection (CED) and apply unwanted edge suppression (UES) for signboard edge enhancement. Binarization and finding contours algorithm are applied which connect object points for segmentation. Finally bounding rectangle algorithm is applied to detect signboard. Figure

2 shows contour based Bounding Rectangle output. This particular approach has not shown good performance in practice.

Figure 2: Classical object segmentation processes.

4.2 Segmentation based Algorithm

We build our proposed model on BSVSO dataset based on some smart image processing and statistically tuned segmentation based learning algorithm, Faster R-CNN.

4.2.1 Data Pre-Processing

The goal of image processing is to improve the dataset by suppressing distortions and by enhancing important image properties so that the model can learn better from the input features. In our proposed method, each image has been resized to 1000*600 pixels. Reduction of unwanted digital image noise has been accomplished using NLMD method. Model performance can go down due to training with non-normalized image data. Image pixels are in between (0-255) without normalization. We calculate pixel mean values for each variation of dataset and prepare model datasets based on centering pixel mean and pixel value normalization.

4.2.2 Proposed Model

Segmentation based algorithm with region proposal network (RPN) such as Faster R-CNN has shown the state-of-the-art performance on various object detection applications [5]

. Faster R-CNN has three parts with learning ability - convolutional neural network (CNN), region proposal network (RPN) and fully connected classifier layer (R-CNN). The whole network is trained end to end.

  • Base CNN:

    CNN is a local feature extractor used with images which consists of convolutional layers, pooling layers and fully connected layers. Our CNN architectures have been fine-tuned from pre-trained ImageNet weights. Experiments have been conducted with VGG-16, Resnet-50, Inception-V4 and Densenet-121 architecture. The output feature map from base network is used as shared input for RPN layer.

  • RPN:

    RPN is the initial layer for generating detection bounding boxes and prediction probability score. In RPN layer, various number of anchors and different size of anchors are generated from each feature map points. In our method we use three different pixel scales with three different aspect_ratios. As a result, each point from feature map returns nine different proposal regions. RPN layer weights are tuned by minimizing loss of object region proposal and bounding box coordinate prediction. By using one dimensional K-means clustering on our signboard training dataset, we have obtained aspect_ratio of 1:3, 1:5 and 1:9; and pixel scales of 121, 223 and 344 (total nine types of frequently found bounding boxes).

  • Non Maximum Suppression: We have applied non maximum suppression-(NMS) in RPN layer output to prune the overlapping proposal boxes. Through data analysis, we have found out NMS threshold of 0.9 to be effective as there are many overlapping signboards in BSVSO dataset. We have passed on top 300 region proposals to ROI pooling layer for filtering.

  • ROI Pooling: We obtain feature maps of different sizes from RPN layer. We generate fixed size feature maps using ROI pooling so that we can use each proposed region feature map’s flattened vector as input to the fully connected R-CNN layer.

  • R-CNN: For each fixed size feature map of each variable size region, we get bounding box coordinates (regression) and signboard objectness score (classification). Through minimizing regression and classification losses R-CNN weights are tuned. R-CNN filters our proposed regions and returns us the signboard bounding boxes.

Figure 3: Result of signboard detection using classical object segmentation method.

5 Results and Discussion

We have used 5-fold cross validation in order to compare performance. As performance metric, we have mAP (mean average precision) score. We consider a proposed signboard bounding box to be true only if IOU (Intersection Over Union) of that box with a ground truth bounding box is greater than or equal to 0.7.

Our proposed classical object segmentation method has unsatisfactory performance on signboard detection. Figure 3 shows the result. That is why we have designed our algorithm using segmentation based learning algorithm.

At first, we have experimented with different CNN architectures on RGB dataset and the default parameters of Faster R-CNN mentioned in [5]. Fine tuned VGG-16 has shown the best performance as base architecture. Like VGG-16, we expect all sequential CNN models to work well in case of signboard detection or classification related tasks.

Then we have experimented with different set of processed images with input feature variations on selected VGG-16 model. Five different variations of images have been used in this regard such as: RGB, GRAY, P_RGB, P_RGB Sharp, P_RGB Blur & CANNY. Processed RGB image data is resized using OPENCV_INTER_AREA method, GRAY is gray-scale image of RGB obtained using OPENCV_BGR2GRAY method, P_RGB is resized image using PIL_ANTIALIAS method, P_RGB Sharp is sharpened image of P_RGB using OPENCV, P_RGB Blur is smoothed image of P_RGB using NLMD method while CANNY is CED transform data of P_RGB. We have achieved the best result on P_RGB image dataset. In general, P_RGB dataset formation is time consuming. Resizing image using this process retains most of the important features of the original image. So, we choose this image resizing technique.

Finally, we have tuned aspect_ratios and pixel scales with our selected VGG-16 model and using P_RGB training dataset. Statistically obtained aspect_ratios of 1:3, 1:5, 1:9 and pixel scales of 121, 223 and 344 have given us a starting point for this complex set of hyperparameter tuning. Our obtained results have been provided in Table 1. We have finished our experiments with an impressive mAP score of 0.82. Signboard detection result in a sample image has been shown in Figure 4.

ROI Ratio ROI Scale Mean average Precision(mAP) Score
[1:1,1:2,2:1] [64,128,256] 0.57
[1:3,1:5,1:7] [60,80,100] 0.74
[1:3,1:4,1:5] [121,223,344] 0.76
[1:3,1:5,1:9] [60,100,140] 0.82
Table 1: Statistical ROI Feature Composition

We have only one class (signboard) of object to detect and localize. In order to reduce the training time, we have experimented by excluding ROI pooling layer and R-CNN classifier layer from our model. We have trained up to RPN layer by being strict in proposal selection number. Unfortunately, many false positive results appear in such case. So, we include those two layers in our model in spite of having only one class of object. We expect our experiments to facilitate future research on street view annotation by helping researchers in making fast and accurate choices regarding different hyperparameters and techniques.

Figure 4: Result of Signboard Detection.


In this research, we propose a segmentation based learning approach with smart image pre-processing techniques and smart hyperparameter tuning. We have shown comparison among different object detection techniques and displayed the performance behavior of various model related choices. We have also provided a novel dataset BSVSO that has been manually collected and annotated from Google Street View. Future work should aim at extracting information from the detected signboards where cropped signboard image resolution is comparatively low.


We would like to show our gratitude to Md. Ahsan Habib Shuvo {} and Md. Amimul Bashar {}, Computer Science and Engineering, United International University, for their contribution in constructing the BSVSO dataset.


  • [1]

    Bochkarev, K., Smirnov, E.: Detecting advertising on building façades with computer vision. Procedia Computer Science

    156, 338–346 (01 2019).
  • [2]

    Lim, D., Kim, Y., Park, I., Seung, J.H., Chong, K.: Robust detection of roi of signboards in a noisy environment. International Journal of Signal Processing, Image Processing and Pattern Recognition

    10, 73–84 (07 2017).
  • [3] Panhwar, M., Ali, K., Abro, A., Zhongliang, D., Khuhro, S.A., Memon, S.: Signboard detection and text recognition using artificial neural networks. In: 2019 IEEE 9th International Conference on Electronics Information and Emergency Communication (ICEIEC). pp. 16–19 (07 2019).
  • [4] Park, J., Lee, G., Anh, L., Kim, E., Lim, J., Kim, S., Yang, H., Oh, S.: Automatic detection and recognition of shop name in outdoor signboard images. pp. 111 – 116 (01 2009).
  • [5] Ren, S., He, K., Girshick, R., Sun, J.: Faster r-cnn: Towards real-time object detection with region proposal networks. In: Advances in neural information processing systems. pp. 91–99 (2015)
  • [6] Shao, F., Wang, X., Meng, F., Zhu, J., Wang, D., Dai, J.: Improved faster r-cnn traffic sign detection based on a second region of interest and highly possible regions proposal network. Sensors 19,  2288 (05 2019).
  • [7] Shen, H., Tang, X.: Generic sign board detection in images. In: Proceedings of the 5th ACM SIGMM International Workshop on Multimedia Information Retrieval. p. 144–149. MIR ’03, Association for Computing Machinery (2003).
  • [8] Wu, I.Z., Chang, H.C.: Signboard optical character recognition (2015)