matterport / Mask_RCNN

Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow
Other
24.64k stars 11.7k forks source link

Data augmentation support for training on own dataset #701

Open engrchrishenry opened 6 years ago

engrchrishenry commented 6 years ago

Hello!

I annotated some images for my own dataset. My dataset has a very limited size so I would like to augment my dataset.

Upon searching previously opened issues, I came to know that we can pass an argument for augmentation as shown below:

model.train(dataset_train, dataset_val, learning_rate=config.LEARNING_RATE, epochs=30, layers='heads', augmentation = imgaug.augmenters.OneOf([ imgaug.augmenters.Fliplr(0.5), imgaug.augmenters.Flipud(0.5), imgaug.augmenters.Affine(rotate=(-45, 45)), imgaug.augmenters.Affine(rotate=(-90, 90)), imgaug.augmenters.Affine(scale=(0.5, 1.5))]))

However, I cannot visualize how get we get the polygon points after this augmentation. After augmentation the dataset like this, does the code automatically generate new polygon points for various instances?

Regards, Chris Henry

bilgan commented 6 years ago

Any progress?

patrickcgray commented 6 years ago

You can look at the documentation here: https://imgaug.readthedocs.io/en/latest/source/examples_segmentation_maps.html

I'm pretty sure this is built in so that all the masks are auto adjusted for augmentations.

nayzen commented 5 years ago

Hi @engrchrishenry , Firstly, did you achieve what you wanted ?

Then, when you say "I annotated some images", did you use VIA tool to have segmentations ?

Best regards, Antoine