Image category learning based on feature words and shape models