Setting a threshold value for color segmented images to classify them
There is no "right" answer to your question, you are the only who could know what constitutes an acceptable paint-job. My suggestion would be to create a script which processes a big number of images you consider to be "good", append all your pixel counts to a list and then extract some statistics from that list. See what the min, max, mean values of that list are and decide accordingly what your thershold value would be. Then make the same thing for images you consider to be "bad" and see if the threshold value is always biggest than your max "bad" value. Of course the more data you have, the more reliable your result will be.
I am trying to classify images as "good" or "bad". In a given region of interest, if the region of interest painted well then it is a good image else bad. I segmented the painted parts using K means clustering then I counted pixels of painted parts. How can I set a threshold value to classify images as good or bad by using the counted pixel numbers? Or is there a better approach that I can try? I tried training simple CNN but the dataset has a big class imbalance (as I observed) and I don't have labels for images.