chandrakalagowda commited on
Commit
919ba7f
1 Parent(s): 1cb9346

Upload folder using huggingface_hub

Browse files
2_deep_dive_image_searchmilvus.py ADDED
@@ -0,0 +1,460 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # coding: utf-8
3
+
4
+ # ## Index
5
+ #
6
+ # * [Introduction](#intro)
7
+ # * [Preparation](#preparation)
8
+ # * [Optimization](#optimization)
9
+ # * [Normalization](#normalization)
10
+ # * [Object detection](#object-detection)
11
+ # * [Dimensionality Reduction](#dimensionality-reduction)
12
+ # * [Online Demo](#demo)
13
+ #
14
+ # # Deep Dive into Real-World Image Search Engine with Towhee <a class="anchor" id="intro"></a>
15
+ #
16
+ # In the [previous tutorial](./1_build_image_search_engine.ipynb), we built and prototyped a proof-of-concept image search engine. With test results from the previous tutorial, we find out that more complex model usually generates larger embeddings, hence leads to better search performance but slower speed.
17
+ #
18
+ # Now, let's try some new methods to improve performance and save resource, other than changing model. At the end, we will also learn how to deploy it as a simple online demo. With this tutorial, you are able to build a reverse image search engine more practical in production.
19
+
20
+ # ## Preparation <a class="anchor" id="preparation"></a>
21
+ #
22
+ # Here is a table of search performance with different models from the previous tutorial. We will make some improvement in pipelines and compare model performance in this tutorial. Before getting started, we need to prepare dependencies, example data, and helpful functions, which have detailed explanation in the previous tutorial.
23
+ #
24
+ # | model | dim | mAP@10 | qps |
25
+ # | -- | -- | -- | -- |
26
+ # | vgg16 | 512 | 0.658 | 53 |
27
+ # | resnet50 | 2048 | 0.886 | 35 |
28
+ # | tf_efficientnet_b7 | 2560 | 0.983 | 16 |
29
+ #
30
+ # **Install dependencies**: install python dependencies with proper versions for your environment.
31
+
32
+ # In[1]:
33
+
34
+
35
+ #! python -m pip -q install towhee gradio==3.3 opencv-python
36
+
37
+
38
+ # **Prepare data**: download example data, which is a subset of [ImageNet](https://www.image-net.org/).
39
+
40
+ # In[12]:
41
+
42
+ from zipfile import ZipFile
43
+
44
+ with ZipFile('reverse_image_search.zip', 'r') as zips:
45
+ # printing all the contents of the zip file
46
+ # extracting all the files
47
+ print('Extracting all the files now...')
48
+ zips.extractall()
49
+ print('Done!')
50
+
51
+ # **Start Milvus:** install and start Milvus service.
52
+ #
53
+ # This notebook uses [milvus 2.2.10](https://milvus.io/docs/v2.2.x/install_standalone-docker.md) and [pymilvus 2.2.11](https://milvus.io/docs/release_notes.md#2210).
54
+
55
+ # In[3]:
56
+
57
+
58
+ # ! wget https://github.com/milvus-io/milvus/releases/download/v2.2.10/milvus-standalone-docker-compose.yml -O docker-compose.yml
59
+ # ! docker-compose up -d
60
+ # ! python -m pip install -q pymilvus==2.2.11
61
+
62
+
63
+ # **Helpful functions**: import necessary packages, set parameters, and build helpful functions in advance.
64
+
65
+ # In[13]:
66
+
67
+
68
+ from milvus import default_server
69
+ from pymilvus import connections, utility
70
+ default_server.start()
71
+
72
+
73
+ # In[14]:
74
+
75
+
76
+ import cv2
77
+ import numpy
78
+ import time
79
+ import csv
80
+ from glob import glob
81
+ from pathlib import Path
82
+ from statistics import mean
83
+
84
+ from towhee import pipe, ops, DataCollection
85
+ from towhee.types.image import Image
86
+ from pymilvus import connections, FieldSchema, CollectionSchema, DataType, Collection, utility
87
+
88
+ # Towhee parameters
89
+ MODEL = 'vgg16'
90
+ DEVICE = None # if None, use default device (cuda is enabled if available)
91
+
92
+ # Milvus parameters
93
+ HOST = '127.0.0.1'
94
+ PORT = '19530'
95
+ TOPK = 10
96
+ DIM = 512 # dimension of embedding extracted, change with MODEL
97
+ COLLECTION_NAME = 'deep_dive_image_search_' + MODEL
98
+ INDEX_TYPE = 'IVF_FLAT'
99
+ METRIC_TYPE = 'L2'
100
+
101
+ # patterns of image paths
102
+ INSERT_SRC = './train/*/*.JPEG'
103
+ QUERY_SRC = './test/*/*.JPEG'
104
+
105
+ to_insert = glob(INSERT_SRC)
106
+ to_test = glob(QUERY_SRC)
107
+
108
+ # Create milvus collection (delete first if exists)
109
+ def create_milvus_collection(collection_name, dim):
110
+ if utility.has_collection(collection_name):
111
+ utility.drop_collection(collection_name)
112
+
113
+ fields = [
114
+ FieldSchema(name='path', dtype=DataType.VARCHAR, description='path to image', max_length=500,
115
+ is_primary=True, auto_id=False),
116
+ FieldSchema(name='embedding', dtype=DataType.FLOAT_VECTOR, description='image embedding vectors', dim=dim)
117
+ ]
118
+ schema = CollectionSchema(fields=fields, description='reverse image search')
119
+ collection = Collection(name=collection_name, schema=schema)
120
+
121
+ index_params = {
122
+ 'metric_type': METRIC_TYPE,
123
+ 'index_type': INDEX_TYPE,
124
+ 'params': {"nlist": 2048}
125
+ }
126
+ collection.create_index(field_name='embedding', index_params=index_params)
127
+ return collection
128
+
129
+ # Read images
130
+ decoder = ops.image_decode('rgb').get_op()
131
+ def read_images(img_paths):
132
+ imgs = []
133
+ for p in img_paths:
134
+ img = decoder(p)
135
+ imgs.append(img)
136
+ # imgs.append(Image(cv2.imread(p), 'RGB'))
137
+ return imgs
138
+
139
+ # Get ground truth
140
+ def ground_truth(path):
141
+ train_path = str(Path(path).parent).replace('test', 'train')
142
+ return [str(Path(x).resolve()) for x in glob(train_path + '/*.JPEG')]
143
+
144
+ # Calculate Average Precision
145
+ def get_ap(pred: list, gt: list):
146
+ ct = 0
147
+ score = 0.
148
+ for i, n in enumerate(pred):
149
+ if n in gt:
150
+ ct += 1
151
+ score += (ct / (i + 1))
152
+ if ct == 0:
153
+ ap = 0
154
+ else:
155
+ ap = score / ct
156
+ return ap
157
+
158
+
159
+ # ## Optimization <a class="anchor" id="optimization"></a>
160
+ #
161
+ # In the previous tutorial, we have measured the search performance with **mAP** and compared performance for different models. This tutorial will show how to improve performance by normalization, implement pipeline with object detection, and reduce dimension to save resource.
162
+ #
163
+ # ### Normalization <a class="anchor" id="normalization"></a>
164
+ #
165
+ # A quick optimization is normalizing the embedding features before indexing them in Milvus. Thus, the L2 metric used by Milvus is equivalent to cosine similarity, which measures the similarity using the angle between vectors while ignoring the magnitude of vectors.
166
+
167
+ # In[15]:
168
+
169
+
170
+ # Embedding pipeline
171
+ p_embed = (
172
+ pipe.input('img_path')
173
+ .map('img_path', 'img', ops.image_decode('rgb'))
174
+ .map('img', 'vec', ops.image_embedding.timm(model_name=MODEL, device=DEVICE))
175
+ .map('vec', 'vec', lambda x: x / numpy.linalg.norm(x, axis=0))
176
+ )
177
+
178
+
179
+ # In[16]:
180
+
181
+
182
+ # Display embedding result, no need for implementation
183
+ p_display = p_embed.output('img_path', 'img', 'vec')
184
+
185
+ DataCollection(p_display(to_insert[0])).show()
186
+
187
+
188
+ # Now we have an embedding pipeline extracting normalized vectors for images. Let's build a image search engine based on the embedding pipeline and Milvus collection. We evaluate the engine by inserting candidate data and querying test images. The result table below shows mAP increases for all models. This proves that normalization is able to improve image search.
189
+
190
+ # In[17]:
191
+
192
+
193
+ # Connect to Milvus service
194
+ connections.connect(host=HOST, port=PORT)
195
+
196
+ # Create collection
197
+ collection = create_milvus_collection(COLLECTION_NAME, DIM)
198
+ print(f'A new collection created: {COLLECTION_NAME}')
199
+
200
+ # Insert data
201
+ p_insert = (
202
+ p_embed.map(('img_path', 'vec'), 'mr', ops.ann_insert.milvus_client(
203
+ host=HOST,
204
+ port=PORT,
205
+ collection_name=COLLECTION_NAME
206
+ ))
207
+ .output('mr')
208
+ )
209
+
210
+ for img_path in to_insert:
211
+ p_insert(img_path)
212
+ print('Number of data inserted:', collection.num_entities)
213
+
214
+ # Performance
215
+ collection.load()
216
+ p_search_pre = (
217
+ p_embed.map('vec', ('search_res'), ops.ann_search.milvus_client(
218
+ host=HOST, port=PORT, limit=TOPK,
219
+ collection_name=COLLECTION_NAME))
220
+ .map('search_res', 'pred', lambda x: [str(Path(y[0]).resolve()) for y in x])
221
+ # .output('img_path', 'pred')
222
+ )
223
+ p_eval = (
224
+ p_search_pre.map('img_path', 'gt', ground_truth)
225
+ .map(('pred', 'gt'), 'ap', get_ap)
226
+ .output('ap')
227
+ )
228
+
229
+ res = []
230
+ for img_path in to_test:
231
+ ap = p_eval(img_path).get()[0]
232
+ res.append(ap)
233
+
234
+ mAP = mean(res)
235
+
236
+ print(f'mAP@{TOPK}: {mAP}')
237
+
238
+
239
+ # | model | mAP@10 (no norm) | mAP@10 (norm) |
240
+ # | -- | -- | -- |
241
+ # | vgg16 | 0.658 | 0.738 |
242
+ # | resnet50 | 0.886 | 0.917 |
243
+ # | tf_efficientnet_b7 | 0.983 | 0.988 |
244
+
245
+ # ### Object Detection <a class="anchor" id="object-detection"></a>
246
+ #
247
+ # Another common option in reverse image search is object detection. Sometimes the search engine is distracted by small objects or background in the image. Cropping the original image and querying only the main object help to resolve this issue.
248
+ #
249
+ # Let's take a look at a bad search. With normalized embeddings extracted by `vgg16`, the test image *'./test/rocking_chair/n04099969_23803.JPEG'* gets a list of similar images containing some incorrect results, which has an Average Precision of 0.347.
250
+
251
+ # In[8]:
252
+
253
+
254
+ p_search_img = (
255
+ p_search_pre.map('img_path', 'gt', ground_truth)
256
+ .map(('pred', 'gt'), 'ap', get_ap)
257
+ .map('pred', 'res', read_images)
258
+ .output('img_path', 'img', 'res', 'ap')
259
+ )
260
+ DataCollection(p_search_img('./test/rocking_chair/n04099969_23803.JPEG')).show()
261
+
262
+
263
+ # Now let's preprocess the test image by focusing on the main object in it. Here we use YOLOv5 to get objects in the image. We select the object with the largest area in the original image, and then search across database with the object image.
264
+ #
265
+ # - `get_object`: a function to get the image of the largest object detecte, or the original imageif there is no object
266
+ # - `p_yolo`: a pipeline to crop the largest object in the given image
267
+
268
+ # In[18]:
269
+
270
+
271
+ def get_max_object(img, boxes):
272
+ if len(boxes) == 0:
273
+ return img
274
+ max_area = 0
275
+ for box in boxes:
276
+ x1, y1, x2, y2 = box
277
+ area = (x2-x1)*(y2-y1)
278
+ if area > max_area:
279
+ max_area = area
280
+ max_img = img[y1:y2,x1:x2,:]
281
+ return max_img
282
+
283
+ p_yolo = (
284
+ pipe.input('img_path')
285
+ .map('img_path', 'img', ops.image_decode('rgb'))
286
+ .map('img', ('boxes', 'class', 'score'), ops.object_detection.yolov5())
287
+ .map(('img', 'boxes'), 'object', get_max_object)
288
+ )
289
+
290
+
291
+ # In[21]:
292
+
293
+
294
+ # Display embedding result, no need for implementation
295
+ p_display = (
296
+ p_yolo.output('img', 'object')
297
+ )
298
+ DataCollection(p_display('./test/rocking_chair/n04099969_23803.JPEG')).show()
299
+
300
+
301
+ # With object detection, we search for *'./test/rocking_chair/n04099969_23803.JPEG'* again across the same Milvus collection. The average precision has increased by about 45%. It is a great improvement for this query.
302
+
303
+ # In[22]:
304
+
305
+
306
+ # Search
307
+ p_search_pre_yolo = (
308
+ p_yolo.map('object', 'vec', ops.image_embedding.timm(model_name=MODEL, device=DEVICE))
309
+ .map('vec', 'vec', lambda x: x / numpy.linalg.norm(x, axis=0))
310
+ .map('vec', ('search_res'), ops.ann_search.milvus_client(
311
+ host=HOST, port=PORT, limit=TOPK,
312
+ collection_name=COLLECTION_NAME))
313
+ .map('search_res', 'pred', lambda x: [str(Path(y[0]).resolve()) for y in x])
314
+ # .output('img_path', 'pred')
315
+ )
316
+
317
+ # Evaluate with AP
318
+ p_search_img_yolo = (
319
+ p_search_pre_yolo.map('img_path', 'gt', ground_truth)
320
+ .map(('pred', 'gt'), 'ap', get_ap)
321
+ .map('pred', 'res', read_images)
322
+ .output('img', 'object', 'res', 'ap')
323
+ )
324
+ DataCollection(p_search_img_yolo('./test/rocking_chair/n04099969_23803.JPEG')).show()
325
+
326
+
327
+ # ### Dimensionality Reduction <a class="anchor" id="dimensionality-reduction"></a>
328
+ #
329
+ # For a system in production, it is practical to mimimize the embedding dimension in order to reduce memory consumption. [Random projection](https://en.wikipedia.org/wiki/Random_projection) is a dimensionality reduction method for a set vectors in Euclidean space. This method is fast and requires no training. Let's try it with the model `EfficientNet-B7`, which generates embeddings of a high dimension 2560.
330
+
331
+ # In[23]:
332
+
333
+
334
+ NEW_MODEL = 'tf_efficientnet_b7'
335
+ OLD_DIM = 2560
336
+ NEW_DIM = 512
337
+ NEW_COLLECTION_NAME = NEW_MODEL + '_' + str(NEW_DIM)
338
+
339
+ numpy.random.seed(2023)
340
+ projection_matrix = numpy.random.normal(scale=1.0, size=(OLD_DIM, NEW_DIM))
341
+
342
+ def dim_reduce(vec):
343
+ return numpy.dot(vec, projection_matrix)
344
+
345
+ connections.connect(host=HOST, port=PORT)
346
+ new_collection = create_milvus_collection(NEW_COLLECTION_NAME, NEW_DIM)
347
+ print(f'A new collection created: {NEW_COLLECTION_NAME}')
348
+
349
+
350
+ # Embedding pipeline
351
+ p_embed = (
352
+ pipe.input('img_path')
353
+ .map('img_path', 'img', ops.image_decode('rgb'))
354
+ .map('img', 'vec', ops.image_embedding.timm(model_name=NEW_MODEL, device=DEVICE))
355
+ .map('vec', 'vec', dim_reduce)
356
+ )
357
+
358
+
359
+ # In[24]:
360
+
361
+
362
+ # Display embedding result, no need for implementation
363
+ p_display = p_embed.output('img_path', 'img', 'vec')
364
+
365
+ DataCollection(p_display(to_insert[0])).show()
366
+
367
+
368
+ # We've build a new embedding pipeline converts each image into a vector of reduced dimension. Insert and search pipelines are built on top of the embedding pipeline, like what we did in previous sections. We can apply the same evaluation method to this engine.
369
+ #
370
+ # The dimension of embedding vector is reduced from 2560 to 512, thereby reducing memory usage by 80%. Despite this, it maintains a reasonable performance (97% mAP for reduced vectors vs 98.3% for full vectors).
371
+
372
+ # In[25]:
373
+
374
+
375
+ # Insert pipeline
376
+ p_insert = (
377
+ p_embed.map(('img_path', 'vec'), 'mr', ops.ann_insert.milvus_client(
378
+ host=HOST,
379
+ port=PORT,
380
+ collection_name=NEW_COLLECTION_NAME
381
+ ))
382
+ .output('mr')
383
+ )
384
+
385
+ # Insert data
386
+ for img_path in to_insert:
387
+ p_insert(img_path)
388
+ print('Number of data inserted:', new_collection.num_entities)
389
+
390
+ # Search pipeline
391
+ new_collection.load()
392
+ p_search_pre = (
393
+ p_embed.map('vec', 'search_res', ops.ann_search.milvus_client(
394
+ host=HOST, port=PORT, limit=TOPK,
395
+ collection_name=NEW_COLLECTION_NAME))
396
+ .map('search_res', 'pred', lambda x: [str(Path(y[0]).resolve()) for y in x])
397
+ # .output('img_path', 'pred')
398
+ )
399
+
400
+ # Performance
401
+ p_eval = (
402
+ p_search_pre.map('img_path', 'gt', ground_truth)
403
+ .map(('pred', 'gt'), 'ap', get_ap)
404
+ .output('ap')
405
+ )
406
+
407
+ res = []
408
+ for img_path in to_test:
409
+ ap = p_eval(img_path).get()[0]
410
+ res.append(ap)
411
+
412
+ mAP = mean(res)
413
+
414
+ print(f'mAP@{TOPK}: {mAP}')
415
+
416
+
417
+ # ## Online Demo <a class="anchor" id="demo"></a>
418
+ #
419
+ # This section shows how to use Gradio to build a simple showcase with user interface. With Gradio, we simply need to wrap the data processing pipeline via a f_search function. Please note here we search across a prepared Milvus collection *'deep_dive_image_search_vgg16'*, which stores normalized image embeddings extracted by vgg16.
420
+
421
+ # In[27]:
422
+
423
+
424
+ import gradio
425
+
426
+ DEMO_MODEL = 'vgg16'
427
+ DEMO_COLLECTION = 'deep_dive_image_search_' + DEMO_MODEL
428
+
429
+ def f_search(img):
430
+ p_search = (
431
+ pipe.input('img')
432
+ .map('img', 'vec', ops.image_embedding.timm(model_name=DEMO_MODEL, device=DEVICE))
433
+ .map('vec', 'vec', lambda x: x / numpy.linalg.norm(x, axis=0))
434
+ .map('vec', 'search_res', ops.ann_search.milvus_client(
435
+ host=HOST, port=PORT, limit=TOPK,
436
+ collection_name=DEMO_COLLECTION))
437
+ .map('search_res', 'pred', lambda x: [str(Path(y[0]).resolve()) for y in x])
438
+ .output('pred')
439
+ )
440
+ return p_search(img).get()[0]
441
+
442
+ interface = gradio.Interface(f_search,
443
+ gradio.inputs.Image(type="pil", source='upload'),
444
+ [gradio.outputs.Image(type="filepath", label=None) for _ in range(TOPK)]
445
+ )
446
+
447
+ interface.launch()
448
+
449
+
450
+ # ## Explore Towhee
451
+ #
452
+ # - Built-in pipelines for various tasks
453
+ # - Microservice & onnx acceleration powered by TritonServe
454
+ # - Docker image with everything ready
455
+
456
+ # In[ ]:
457
+
458
+
459
+
460
+
README.md CHANGED
@@ -1,12 +1,6 @@
1
  ---
2
- title: Reverse Image Search Space
3
- emoji: 📉
4
- colorFrom: green
5
- colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.37.0
8
- app_file: app.py
9
- pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: reverse_image_search_space
3
+ app_file: 2_deep_dive_image_searchmilvus.py
 
 
4
  sdk: gradio
5
  sdk_version: 3.37.0
 
 
6
  ---
 
 
requirements.txt ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.1.0
2
+ aiohttp==3.8.4
3
+ aiosignal==1.3.1
4
+ altair==5.0.1
5
+ anyio==3.7.1
6
+ appnope==0.1.3
7
+ asttokens==2.2.1
8
+ async-timeout==4.0.2
9
+ attrs==23.1.0
10
+ av==10.0.0
11
+ backcall==0.2.0
12
+ bleach==6.0.0
13
+ certifi==2023.5.7
14
+ charset-normalizer==3.2.0
15
+ click==8.1.6
16
+ comm==0.1.3
17
+ contourpy==1.1.0
18
+ cycler==0.11.0
19
+ debugpy==1.6.7
20
+ decorator==5.1.1
21
+ docutils==0.20.1
22
+ environs==9.5.0
23
+ executing==1.2.0
24
+ fastapi==0.100.0
25
+ ffmpy==0.3.1
26
+ filelock==3.12.2
27
+ fonttools==4.41.0
28
+ frozenlist==1.4.0
29
+ fsspec==2023.6.0
30
+ fvcore==0.1.5.post20221221
31
+ gitdb==4.0.10
32
+ GitPython==3.1.32
33
+ gradio==3.37.0
34
+ gradio_client==0.2.10
35
+ grpcio==1.53.0
36
+ h11==0.14.0
37
+ httpcore==0.17.3
38
+ httpx==0.24.1
39
+ huggingface-hub==0.16.4
40
+ idna==3.4
41
+ importlib-metadata==6.8.0
42
+ iopath==0.1.10
43
+ ipykernel==6.24.0
44
+ ipython==8.14.0
45
+ jaraco.classes==3.3.0
46
+ jedi==0.18.2
47
+ Jinja2==3.1.2
48
+ jsonschema==4.18.4
49
+ jsonschema-specifications==2023.7.1
50
+ jupyter_client==8.3.0
51
+ jupyter_core==5.3.1
52
+ keyring==24.2.0
53
+ kiwisolver==1.4.4
54
+ linkify-it-py==2.0.2
55
+ markdown-it-py==2.2.0
56
+ MarkupSafe==2.1.3
57
+ marshmallow==3.19.0
58
+ matplotlib==3.7.2
59
+ matplotlib-inline==0.1.6
60
+ mdit-py-plugins==0.3.3
61
+ mdurl==0.1.2
62
+ milvus==2.2.11
63
+ more-itertools==9.1.0
64
+ mpmath==1.3.0
65
+ multidict==6.0.4
66
+ nest-asyncio==1.5.6
67
+ networkx==3.1
68
+ numpy==1.25.1
69
+ opencv-python==4.8.0.74
70
+ orjson==3.9.2
71
+ packaging==23.1
72
+ pandas==2.0.3
73
+ parameterized==0.9.0
74
+ parso==0.8.3
75
+ pexpect==4.8.0
76
+ pickleshare==0.7.5
77
+ Pillow==10.0.0
78
+ pkginfo==1.9.6
79
+ platformdirs==3.9.1
80
+ portalocker==2.7.0
81
+ prompt-toolkit==3.0.39
82
+ protobuf==4.23.4
83
+ psutil==5.9.5
84
+ ptyprocess==0.7.0
85
+ pure-eval==0.2.2
86
+ pydantic==1.10.11
87
+ pydub==0.25.1
88
+ Pygments==2.15.1
89
+ pymilvus==2.2.11
90
+ pyparsing==3.0.9
91
+ python-dateutil==2.8.2
92
+ python-dotenv==1.0.0
93
+ python-multipart==0.0.6
94
+ pytorchvideo==0.1.3
95
+ pytz==2023.3
96
+ PyYAML==6.0.1
97
+ pyzmq==25.1.0
98
+ readme-renderer==40.0
99
+ referencing==0.30.0
100
+ requests==2.31.0
101
+ requests-toolbelt==1.0.0
102
+ rfc3986==2.0.0
103
+ rich==13.4.2
104
+ rpds-py==0.9.2
105
+ safetensors==0.3.1
106
+ scipy==1.11.1
107
+ seaborn==0.12.2
108
+ semantic-version==2.10.0
109
+ six==1.16.0
110
+ smmap==5.0.0
111
+ sniffio==1.3.0
112
+ stack-data==0.6.2
113
+ starlette==0.27.0
114
+ sympy==1.12
115
+ tabulate==0.9.0
116
+ tenacity==8.2.2
117
+ termcolor==2.3.0
118
+ timm==0.9.2
119
+ toolz==0.12.0
120
+ torch==2.0.1
121
+ torchvision==0.15.2
122
+ tornado==6.3.2
123
+ towhee==1.1.1
124
+ towhee.models==1.1.1
125
+ tqdm==4.65.0
126
+ traitlets==5.9.0
127
+ twine==4.0.2
128
+ typing_extensions==4.7.1
129
+ tzdata==2023.3
130
+ uc-micro-py==1.0.2
131
+ ujson==5.8.0
132
+ ultralytics==8.0.138
133
+ urllib3==2.0.3
134
+ uvicorn==0.23.1
135
+ wcwidth==0.2.6
136
+ webencodings==0.5.1
137
+ websockets==11.0.3
138
+ yacs==0.1.8
139
+ yarl==1.9.2
140
+ zipp==3.16.2
reverse_image_search.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:736813a3307070aae31c41fee6fad93fd4a86b2dcee012754f2c4b7cdb8b9464
3
+ size 125643445