Skip to content

Creating synthetic dataset for object classification with rotated bounding boxes

License

Notifications You must be signed in to change notification settings

cambel/synthetic-dataset-generation

Repository files navigation

synthetic-dataset-generation

Creating synthetic dataset for object classification with rotated bounding boxes

Dependencies

pip install randimage numpy opencv-python matplotlib pyyaml tqdm

Instructions

1. Preprocessing

Prepare target objects:

  1. Collect multiple images of the target objects. Ideally if they are fairly isolated.

c1

  1. Isolate the target object from the background. To remove the background, you could use any tools such as rembg. If the image is JPG/JPEG, make sure to make the background flat white, it will be automatically removed during generation of the dataset.

c2

  1. Crop to the size of the object. This will be used as the bounding box when generating the synthetic dataset.

c3

2. Configuring dataset generator

Set the configuration parameters in the config.yaml. Directory containing the images that will be used as background as well as the target objects images from the prior step and more.

3. Generate dataset

Execute the script

python synthetic_dataset_generator.py

About

Creating synthetic dataset for object classification with rotated bounding boxes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages