objectInsertionDatastore
Create synthetic labeled datastore for training an instance segmentation or object detection network
Since R2025a
Description
The objectInsertionDatastore
object blends datastores of labeled
images containing foreground objects with destination images containing the background. Using
this object, you can create a synthetic labeled datastore for training an instance
segmentation or object detection network.
To insert an object into a single background image at a randomized or specified location,
use the insertObjectInImage
function.
Note
This functionality requires Deep Learning Toolbox™ and the Automated Visual Inspection Library for Computer Vision Toolbox™. You can install the Automated Visual Inspection Library for Computer Vision Toolbox from Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.
Creation
Syntax
Description
creates an augmented datastore dsNew
= objectInsertionDatastore(dsDestination
,dsObject
,numNewImages
)dsNew
by inserting objects from the
source datastore dsObject
into the destination datastore containing
image data, dsDestination
. The objects from the source images are
inserted at randomized locations on the destination images. You must specify the number of
images synthetic images to create, numNewImages
.
sets writeable properties using one or more name-value arguments, in addition to the input
argument from the previous syntax. For example, dsNew
= objectInsertionDatastore(___,PropertyName=Value
)NumObjectsToInsert=2
specifies the number of objects to insert as 2.
Input Arguments
Properties
References
[1] He, Kaiming, Jian Sun, and Xiaoou Tang. “Guided Image Filtering.” IEEE Transactions on Pattern Analysis and Machine Intelligence 35, no. 6 (June 2013): 1397–1409. doi:10.1109/TPAMI.2012.213.
[2] Pérez, Patrick, Michel Gangnet, and Andrew Blake. “Poisson Image Editing.” In ACM SIGGRAPH 2003 Papers, 313–18. San Diego California: ACM, 2003. doi:10.1145/1201775.882269.
Version History
Introduced in R2025a
See Also
insertObjectInImage
| ImageDatastore
| imblend
| affinetform2d
| insertObjectMask
| imguidedfilter