you can see how easy it is to transform complex two-dimensional surf feature descriptor matrices into easy to interpret vbow vectors let' now take new image and think about how we could apply the vbow pipeline first we would need to extract the surf feature descriptors from the image using the following snippet (this is only to depict the localized image subsets used in surf we will actually use the dense features as before see figure - in [ ]new_cat io imread('datasets/new_cat png'newcat_mh mh colors rgb gray(new_catnewcat_surf surf surf(newcat_mhnr_octaves= nr_scales= initial_step_size= threshold= max_points= fig plt figure(figsize ( , )ax fig add_subplot( , ax imshow(surf show_surf(newcat_mhnewcat_surf)figure - localized feature extraction with surf for new image let' now extract the dense surf features and transform them into vbow vector using our previously trained vbow model the following code helps us achieve this see figure - in [ ]new_surf_fds surf dense(newcat_mhspacing= labels km predict(new_surf_fdsnew_vbow np bincount(labelsminlength=kpd dataframe([new_vbow]figure - transforming new image surf descriptors into vbow vector thus you can see the final vbow feature vector for the new image based on surf feature descriptors this is also an example of using an unsupervised machine learning model for feature engineering you can now compare the similarity of this new image with the other two sample images using some similarity metrics