I have a answer in this post which is based on neural network,but I have to say that reault is too bad and have no practicability.I think the reason is that selection of network layers.So I give some try after that
image = ImageResize[Import["https://i.stack.imgur.com/zP5xF.jpg"],
Scaled[2/3]]
You can get it by
(Uncompress@*FromCharacterCode@*Flatten@*(ImageData[#1, "Byte"] &)@*
Import)["http://ooo.0o0.ooo/2016/12/19/58576a2262e4a.png"]
Based on 20, Tanh, 2
net = NetChain[{20, Tanh, 2,
SoftmaxLayer["Output" -> NetDecoder[{"Class", {True, False}}]]},
"Input" -> 3];
ringQ = NetTrain[net, trainData, MaxTrainingRounds -> 20];
Image[Map[If[ringQ[#], #, N@{1, 1, 1}] &, ImageData[image], {2}]]
Based on 20, Ramp, 2
net = NetChain[{20, Ramp, 2,
SoftmaxLayer["Output" -> NetDecoder[{"Class", {True, False}}]]},
"Input" -> 3];
ringQ = NetTrain[net, trainData, MaxTrainingRounds -> 20];
Image[Map[If[ringQ[#], #, N@{1, 1, 1}] &, ImageData[image], {2}]]
Based on 20, LogisticSigmoid, 2
net = NetChain[{20, LogisticSigmoid, 2,
SoftmaxLayer["Output" -> NetDecoder[{"Class", {True, False}}]]},
"Input" -> 3];
ringQ = NetTrain[net, trainData, MaxTrainingRounds -> 20];
Image[Map[If[ringQ[#], #, N@{1, 1, 1}] &, ImageData[image], {2}]]
Based on 20, LogisticSigmoid,Tanh, 2
net = NetChain[{20, LogisticSigmoid, Tanh, 2,
SoftmaxLayer["Output" -> NetDecoder[{"Class", {True, False}}]]},
"Input" -> 3];
ringQ = NetTrain[net, trainData, MaxTrainingRounds -> 20];
Image[Map[If[ringQ[#], #, N@{1, 1, 1}] &, ImageData[image], {2}]]
But I just give some blind tests,any criterion or method can guide us to selecting those layers to improve the result?