Creating synthetic images for object detection
For some projects, you may have so little data that the only thing you can do is use this data in the test set. In some rare cases, it is possible to create a synthetic dataset to create a robust enough model and test it against the small, real test set.
This is what we will do in this recipe: we have a small test set of pictures of QR codes, and we want to build an object detection model for the detection of QR codes. All we have as a train set is a set of generated QR codes and downloaded images collected on open image websites such as unsplash.com.
Getting started
Download and unzip the dataset from https://www.kaggle.com/datasets/vincentv/qr-detection-yolo with the following command line:
kaggle datasets download -d vincentv/qr-detection-yolo --unzip
This dataset is made up of the following folder architecture:
QR-detection-yolo ├── train │ ├── images...