Implementation of the background replacement technique for the COCO Instance Segmentation problem. This works by giving an input directory where background images are stored, creating a background_replacement technique and passing the input directory in the parameters dictionary. The technique will:
Load and resize a random background image to fit the image to augment
Create a mask of all objects instances
Replace all pixels that do not correspond to instances with the corresponding pixel (same position) from the background image.
Implementation of the background replacement technique for the COCO Instance Segmentation problem. This works by giving an input directory where background images are stored, creating a background_replacement technique and passing the input directory in the parameters dictionary. The technique will: