0

I can see that augmentations were applied but i can't see the resulted size of the training set. How can I check it? It's important because when calculating epochs, the dataset size after augmentation should be considered.

When I train a model using DefaultTrainer, there are few augmentations that are apllied by default. I get the following log prints:

[d2.data.datasets.coco]: Loaded 9034 images in COCO format from Datasets/full_train_coco.json
[d2.data.build]: Removed 6216 images with no usable annotations. 2818 images left.
[d2.data.dataset_mapper]: [DatasetMapper] Augmentations used in training: [ResizeShortestEdge(short_edge_length=(640, 672, 704, 736, 768, 800), max_size=1333, sample_style='choice'), RandomFlip()]
[d2.data.build]: Using training sampler TrainingSampler
[d2.data.common]: Serializing 2818 elements to byte tensors and concatenating them all ...
YonHar
  • 11
  • 1

1 Answers1

0

The number of images is not being increased when augmentations are applied but stays the same, in your case 2818 images (source).

Depending on the augmentation settings, the model might never "see" an original image, only augmented ones. If you want to increase the size of training data, you'll need to write a custom function that augments data and saves both images and annotations in the format (COCO, LVIS...) you need. This notebook might help, in the Augmentation Visualization part, you can access both augmented images and bounding boxes and save them from there. Or use a library like Albumentations.

Kami
  • 164
  • 11