Multiply
layer duplicates the image and annotations (multiplying by a given value).
This layer is useful when we are going to balance or unbalance data in training dataset.
- Multiply number - Set the value to multiply by. For example, if you set the value to 2, then the image and annotations will be duplicated twice.
For example, we have project with two datasets:
- "cats dataset" with 200 images of cats
- "dogs dataset" with 600 images of dogs.
We are going to prepare training dataset for cat-dog classifier and we want to have equal number of images of cats and dogs.
In this case we will use 2 Images Project
nodes for each dataset and 1 Multiply
node for "cats dataset" with value 3. After that we will join two datasets into resulting project using New project
node.
As a result we will have will have 600 images of cats and 600 images of dogs.
Original project | Project with multiplied images |
JSON view
{ "action": "multiply", "src": ["$images_project_7"], "dst": "$multiply_9", "settings": { "multiply": 3 } }