class_docstr: MongoDB driver for image-match
  
      
docstr: Additional MongoDB setup
  
  Args:
      collection (collection): a MongoDB collection instance
      args (Optional): Variable length argument list to pass to base constructor
      kwargs (Optional): Arbitrary keyword arguments to pass to base constructor
  
  Examples:
      >>> from image_match.mongodb_driver import SignatureMongo
      >>> from pymongo import MongoClient
      >>> client = MongoClient(connect=False)
      >>> c = client.images.images
      >>> ses = SignatureMongo(c)
      >>> ses.add_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
      >>> ses.search_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
      [
       {'dist': 0.0,
        'id': u'AVM37nMg0osmmAxpPvx6',
        'path': u'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg',
        'score': 0.28797293}
      ]
code: def __init__(self, collection, *args, **kwargs):
      """Additional MongoDB setup
  
      Args:
          collection (collection): a MongoDB collection instance
          args (Optional): Variable length argument list to pass to base constructor
          kwargs (Optional): Arbitrary keyword arguments to pass to base constructor
  
      Examples:
          >>> from image_match.mongodb_driver import SignatureMongo
          >>> from pymongo import MongoClient
          >>> client = MongoClient(connect=False)
          >>> c = client.images.images
          >>> ses = SignatureMongo(c)
          >>> ses.add_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
          >>> ses.search_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
          [
           {'dist': 0.0,
            'id': u'AVM37nMg0osmmAxpPvx6',
            'path': u'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg',
            'score': 0.28797293}
          ]
  
      """
      self.collection = collection
      # Extract index fields, if any exist yet
      if self.collection.count() > 0:
          self.index_names = [
              field
              for field in self.collection.find_one({}).keys()
              if field.find("simple") > -1
          ]
  
      super(SignatureMongo, self).__init__(*args, **kwargs)
  
file_path: image-match/image_match/mongodb_driver.py
imports: from signature_database_base import SignatureDatabaseBase
  from signature_database_base import normalized_distance
  from multiprocessing import cpu_count, Process, Queue
  from multiprocessing.managers import Queue
  import numpy
label_desc: Use image node_id 1 to create a new SignatureMongo object from inherited base classes: SignatureDatabaseBase with example: obj = SignatureMongo(collection)