Downloading Barcode Images from Google for SDK Test

When evaluating an image processing and recognition SDK, image dataset is vital for benchmarking the performance. Google is absolutely the best place for finding and downloading required images.  An automation tool would be handy for getting amounts of image files rapidly. In this article, I will share how to use Python to download barcode images from Google, as well as how to test Dynamsoft Barcode Reader SDK with the image set.

Barcode Images from Google

Install Google Images Download (a Python open-source project) via pip:

pip install google_images_download

Here is the primary API usage of downloading barcode images from Google:

from google_images_download import google_images_download  

response = google_images_download.googleimagesdownload()  

arguments = { } 
paths =

By default, image files will be saved to **./downloads/.**

What we need to do next is to specify the arguments. My configuration is as follows:

keyword = "barcode on box"
arguments = {"keywords": keyword, "limit": 10, "format": "jpg", "usage_rights": "labeled-for-reuse", "time_range": '{"time_min": "01/01/2010", "time_max": "01/01/2019"}'}  


I only used one keyword ‘barcode on box’. If you have more than one keyword, use comma to separate them, like ‘barcode on box, QR code, dynamsoft’.


Denote I want to download ten images.


Set ‘jpg’ as the specific image type. If you omit the argument,  the downloader will crawl any available images, including jpeg,  gif, and png.


This argument is crucial for copyrights. To avoid copyright violation, I used labeled-for-reuse. For detail information about image usage rights, please refer to


Comply with the format “time_range”: ‘{“time_min”: “MM/DD/YYYY”, “time_max”: “ MM/DD/YYYY “}’.

Barcode SDK Testing with Barcode Images

Install Python barcode extension built with Dynamsoft Barcode Reader.

Get a free trial license of Dynamsoft Barcode Reader and set the DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ== in


Decoding barcode images one by one:

    images = paths[0][keyword]

    for filename in images: