DOI: 10.5281/zenodo.10276322
title: Rulers2023: An Annotated Dataset of Synthetic and Real Images for Ruler Detection Using Deep Learning

description: Annotated datasets of synthetic and real ruler images:1. Synthetic-train2. Real-train3. Real-test
Citation: Matuzevičius D. Rulers2023: An Annotated Dataset of Synthetic and Real Images for Ruler Detection Using Deep Learning. Electronics. 2023; 12(24):4924. https://doi.org/10.3390/electronics12244924
 
description: This research investigates the usefulness and efficacy of synthetic ruler images for the development of a deep learning-based ruler detection algorithm. Synthetic images offer a compelling alternative to real-world images as data sources in the development and advancement of computer vision systems. Research aims to answer whether using a synthetic dataset of ruler images is sufficient for training an effective ruler detector and to what extent such a detector could benefit from including synthetic images as a data source. The article presents the procedural method for generating synthetic ruler images, describes the methodology for evaluating the synthetic dataset using trained convolutional neural network (CNN)-based ruler detectors, and shares the compiled synthetic and real ruler image datasets. It was found that the synthetic dataset yielded superior results in training the ruler detectors compared with the real image dataset. The results support the utility of synthetic datasets as a viable and advantageous approach to training deep learning models, especially when real-world data collection presents significant logistical challenges. The evidence presented here strongly supports the idea that when carefully generated and used, synthetic data can effectively replace real images in the development of CNN-based detection systems.
description: Data description
Repository includes three datasets: "synthetic-train", "real-train" and "real-test". Each image in the datasets has labels indicating key points at the corners of the rulers and/or at the intersections of the rulers with the image boundaries.
Structure of keypoints.txt: first line: number of keypoints; following lines: x and y coordinates of keypoints.
Dataset / No. of SamplesSynthetic-train: 5000Real-train: 1901Real-test: 810
The method for generating a synthetic ruler image involved the utilization of natural images as backgrounds, on which a synthetic ruler is superimposed, followed by the simulation of geometric distortions. Natural background images were sourced from the "COCO 2017" dataset (https://cocodataset.org/#download, https://cocodataset.org/#termsofuse). Images licencensed as Attribution License (http://creativecommons.org/licenses/by/2.0/) were used. Source image attribution is provided in the "synthetic-train" dataset folder.
The real ruler datasets ("real-train" and "real-test") include a wide range of rulers, ensuring diversity in color, material, and gradation markings. The images capture these rulers against a multitude of simple and complex backgrounds, simulating a spectrum of real-world scenarios. The rulers were photographed under diverse lighting conditions to test the algorithm's resilience to illumination variations. Additionally, the rulers and camera were positioned at different orientations and angles to ensure that the algorithm could recognize rulers irrespective of geometric (perspective) distortions and rulers' alignment in an image. To further mimic real-world conditions, there were images with partial rulers—rulers cropped by the camera frame. When collecting images for the training dataset, the ruler was moved after each shot to ensure there was no relationship between the background pattern and the ruler position.