https://github.com/hourout/image_search
Image search with tensorflow2.0.0
https://github.com/hourout/image_search
image-search tensorflow
Last synced: 3 months ago
JSON representation
Image search with tensorflow2.0.0
- Host: GitHub
- URL: https://github.com/hourout/image_search
- Owner: Hourout
- Created: 2019-10-21T08:52:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T08:55:45.000Z (about 6 years ago)
- Last Synced: 2025-06-14T09:39:51.683Z (7 months ago)
- Topics: image-search, tensorflow
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# image_search
Image search with tf.2.x
# example
```python
from image_search import ImageSearch
fe = ImageSearch()
fe.reset_feature_folder()
fe.save_feature('C:/Users/JinqingLee/Desktop/image')
fe.load_feature()
scores = fe.search('C:/Users/JinqingLee/Desktop/image/14903831_1200x1000_0.jpg')
import pyecharts as pe
def image_base(img_src, title, subtitle):
image = (pe.components.Image()
.add(src=img_src)
.set_global_opts(title_opts=pe.options.ComponentTitleOpts(title=title, subtitle=subtitle)))
return image
image_list = []
for i in scores:
image_list.append(image_base(i[1], str(i[0].numpy().tolist()), ''))
page = pe.charts.Page(layout=pe.charts.Page.SimplePageLayout).add(*image_list)
page.render()
```