Classify a give descriptor based on the labels of its k-nearest neighbors for a given DescriptorSet.

A descriptor must be provided in the array of blobs.


  • set: Name of the set.
  • k_neighbors: Specifies the number of nearest neighbors that will be used to assign a label to the given descriptor


This command will “classify” a descriptor, i.e. assign a “label” to it, based on its k_neighbors nearest neighbors, and using the specified _label when the descriptors were inserted. Check AddDescriptor for more details on how a “label” is assigned to a descriptor.


Classify a given descriptor using the labels of its 10 nearest neighbors:

[ {
        "ClassifyDescriptor": {
            "set": "party_faces",
            "k_closest": 10

# A blob must be passed together with the JSON Query.
# The blobs is an array of 32-bit floating point values.