Best way to create image segmentation dataset to read in with numpy

Viewed 643

I want to segment a bunch of images, and therefore have to train some classifier. For that I have to create groundtruths of my image. So far I did it like this:

  1. Segment the image in gimp with the magnetic scissor
  2. Fill the three different segments of the image with plain green/red/blue
  3. Import the image as an array with numpy
  4. Since at the edges between two different classes there is a transition between the two colors, I use clustering to summarize the pixel in three classes

Is there a better/more direct way to do this? (Note: I dont want to use a pre segmented dataset, I want to create my own one)

0 Answers
Related