Giter Club home page Giter Club logo

flask-keras-cnn-image-retrieval's Introduction

Image Retrieval Engine Based on Keras

License

演示

演示地址(不能访问,没钱续VPS了),跑在CPU上,web界面采用的SoTu

环境

In [1]: import keras
Using Theano backend.

keras 2.0.1 及 2.0.5 版本均经过测试可用。推荐Python 2.7,支持Python 3.6.

此外需要numpy, matplotlib, os, h5py, argparse. 推荐使用anaconda安装

使用

  • 步骤一

python index.py -database <path-to-dataset> -index <name-for-output-index>

  • 步骤二

python query_online.py -query <path-to-query-image> -index <path-to-index-flie> -result <path-to-images-for-retrieval>

├── database 图像数据集
├── extract_cnn_vgg16_keras.py 使用预训练vgg16模型提取图像特征
|── index.py 对图像集提取特征,建立索引
├── query_online.py 库内搜索
└── README.md

示例

# 对database文件夹内图片进行特征提取,建立索引文件featureCNN.h5
python index.py -database database -index featureCNN.h5

# 使用database文件夹内001_accordion_image_0001.jpg作为测试图片,在database内以featureCNN.h5进行近似图片查找,并显示最近似的3张图片
python query_online.py -query database/001_accordion_image_0001.jpg -index featureCNN.h5 -result database

更新

  • 针对近期有小伙伴反映的keras版本的问题,已将其进行到最新版本,并且特征提取代码大幅精简。
  • 显示检索得到的图片, 可自由定义查询图片及检索图片集

Goal

  • 重新用flask写web界面,已完成。

论文推荐

awesome-cbir-papers

问题汇总

  • query_online.py line 28报错,将index.py line 62注释,使用line 61.

flask-keras-cnn-image-retrieval's People

Contributors

willard-yuan avatar untamed-atlas avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.