This could only be a very rough first-pass on detection. Bathing suits can be very skimpy without being fully nude.
And social context plays a large role, for instance distinguishing between a fat male's nipples and a small-chested female's nipples would be impossible without analyzing a lot more than skin color.