A two-level model for automatic image annotation