How does keras handle subfolders
The answer is it does not consider the sub folders. It assumes all the images available in the sub folders are belong to the same category. In this case all the non ship images are assumed they belong to category B.