Using Global Bag of Features Models in Random Fields for Joint Categorization and Segmentation of Objects