1. A method, comprising: performing, by one or more computing devices: receiving a query image, wherein the query image includes a query object, wherein a location of the query object in the query image is unspecified; based on respective spatially constrained similarity measures between the query image and a plurality of images from an image database: identifying at least some of the plurality of images from the image database, wherein the at least some images share a common feature with the query image, and estimating the location of the query object in the query image based on the identified at least some images; and automatically segmenting the query object from the query image based on the estimated location.