HarissaForte
HarissaForte t1_jc6sser wrote
Reply to comment by Tekno-12345 in Using GANs to generate defective data by Tekno-12345
> Any small diversion will be detected as defective.
If this small diversion is smaller than the diversion within your train dataset (+ the noise) then it should not be detected.
Did you try different splits or a CV ?
HarissaForte t1_jc6qhid wrote
Reply to comment by Tekno-12345 in Using GANs to generate defective data by Tekno-12345
Well first it really is a use case for anomaly detection, but I see there's a discussion on it in another comment.
I still don't know if you have (classification) labels, bbox, or masks for the images with defect… if you do not have any bbox or mask, I suggest you try creating mask annotations, as this will increase the "power" of each sample (instead of 1 label per image you get HxW labels for each pixel location).
It should be fast as:
- You say you do not have many images with defect.
- It seems the mask for defect-less bottles can be generated with a simple thresholding.
- Looking at your example you can create a bubble annotation in one click with a proper annotation tool (I can't tell for the other defect)
Then you ca try a simple supervised training. You could have a nice surprise since your picture are taken in a controlled, standardized environment (it's not like you'd have pictures of bottles on a beach or in the jungle).
If not then you will be able to use the segmentation data to create patches of defects that you can use on your defect-free bottle to create new data. It will be much easier than messing around with GANs and might give you good results.
HarissaForte t1_jc6gder wrote
Reply to comment by Tekno-12345 in Using GANs to generate defective data by Tekno-12345
I don't get it… what do you have so far?
How many of
- image alone,
- image + labels,
- image + bbox,
- image + mask ?
HarissaForte t1_jc66t3m wrote
Reply to Using GANs to generate defective data by Tekno-12345
> a model to detect defects
… as in object detection?
HarissaForte t1_jc9s369 wrote
Reply to comment by Tekno-12345 in Using GANs to generate defective data by Tekno-12345
For example you use a bubble mask to "cut" out a bubble patch from an image. Cutting can be a mix of rectangular selection + transparency where the mask equals zero.
Then you do some random change (flip, aspect ratio…) to this patch.
Then you take a defect free image, and you randomly choose a location where to paste this defect using the bottle mask. You can paste by simply over-writing on the image, or you can do a linear interpolation between the patch image and the defect-free image so it's smoother.
I assume you have very similar images, since they're from a standardized inspection process. Also the bubbles are a very simple pattern. So this could work quite well.