1. A method, comprising: selecting bounding boxes that each represent a region of an input image, each of the bounding boxes comprising one or more image segments of the input image; applying a bounding box as a query on an images database to determine database image regions that match the region of the input image represented by the bounding box; receiving a query result of the database image regions that match the region of the input image; and generating a category histogram for the region of the input image based on category labels of each of the database image regions that match the region of the input image.