We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85ea4b0 commit 1ef827cCopy full SHA for 1ef827c
examples/index.py
@@ -23,6 +23,9 @@ def create_index(name, images):
23
# Add images in batch (List of image paths locally stored)
24
index.addImageBatch(images[1:])
25
26
+ # Build the index
27
+ index.createIndex()
28
+
29
return index
30
31
imsearch/index.py
@@ -41,6 +41,7 @@ def __init__(self, name):
41
self._repository_db = get_repository(self.name, 'mongo')
42
43
def __del__(self):
44
+ self._nmslib_index.createIndex()
45
Index.object_counter -= 1
46
if Index.object_counter == 0 and Index.fe is not None:
47
Index.fe.terminate()
0 commit comments