I have a single image that looks like this:
And I need to generate an image dataset that keeps the basic characteristics of this image but adds some noise, such as we see a line at 1:30 time in the image.
Mainly, there’s the pink part of the image (vertical lines), blue part (central bluesh hue) and yellow/green part at the edges. I’m looking to "learn" the image in a way that I could control these 3 things and randomly generate:
- bluesh central hue’s small colors changes and size
- vertical pink lines thickness and color
- Yellow/Green edges and their size (I could expand them at the expense of blue in the middle or vice virsa
- CONSTRAINT: The yellowish circle (which is image of a semi-conductor wafer) cannot change in size or shape. It can move on top of the black square though. structures inside it can change as well, as mentioned in above 3 points.
This might be an easy question for people with experience in computer vision but I, unfortunately, don’t have a lot of experience in this domain. So, I’d love to get any ideas on making progress in this direction. Thanks.
2
Answers
Changing the shape of your inner structures while safely keeping all possible characteristics seems non-trivial to me. There are however a number of simple transformation you could do to create an augmented dataset such as:
Rotation: Normally you would also do some rotations, but this will obviously change the orientation of your lines which you want to preserve, so this does not apply in your caseOther than that you might also want to add some noise to your image, or transformed versions of it as listed above, such as Gaussian noise or salt and pepper noise.
You could also play around with the color values, e.g. by slighly shifting the saturation of different hue values in HSV space.
You can combine any of those methods in different combinations, if you try all possible permutations with different amount/type of noise you will get quite a big dataset.
One approach is using
keras
‘sImageDataGenerator
total_number = 5
ImageDataGenerator
class. For instancepopulated
, then PopulateNow, if you look at your
populated
folder:Code