1. A method, comprising: performing, by one or more processors of a computing device: receiving a query image that includes a query object, a location of the query object in the query image being unspecified; retrieving a plurality of images from an image database based on respective spatially constrained similarity measures between the query image and the plurality of images from the image database, said retrieving comprising at least: identifying at least some of the plurality of images from the image database, the at least some images sharing 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, said estimating the query object including determining a mask for the query object, the mask having a voted center of the query object and the mask configured to differentiate the query object from a background of the query image; and automatically segmenting the query object from the query image based on the estimated location.