Open 0x00b1 opened 7 years ago
The ImageSegmentationGenerator should be an easier task.
The dictionary should look similar to the existing ObjectDetectionGenerator dictionary except each box includes a mask
key that has the mask pathname, e.g.
{
"boxes": [
{
"x_minimum": 0,
"y_minimum": 0,
"x_maximum": 0,
"y_maximum": 0,
"description: "foo",
"mask: "mask.png"
}
],
"c": 224,
"channels": 3
"pathname": "image.png",
"r": 224
}
It should yield masks (in addition to an image, bounding boxes, and labels), e.g.
generator = ImageSegementationGenerator()
generator = generator.flow(training)
image, (boxes, labels, masks) = generator.next()
keras-rcnn should include an ImageSegmentationGenerator class like Keras’s ImageDataGenerator.