Skip to content

Latest commit

 

History

History
48 lines (26 loc) · 1.28 KB

README.md

File metadata and controls

48 lines (26 loc) · 1.28 KB

image-retrieval

Deep Learning for content-based image retrieval with TensorFlow and Keras

tensorflow version

usage: python retrieval.py -h

img_trans :

skimage and keras are required in this file. The following transformations are included:

  • adjust brightness
  • shit, rotate, flip, zoom
  • dilation, erosion
  • add oblique line
  • add salt noise

lenet5_model :

LeNet-5 is a classical CNN model proposed by Yann LeCun.

See Gradient-based learning applied to document recognition for more details.

ReLu is used as the activate function for convlayer and fclayer. Drop-out layer is added before softmax in this implementation.

lenet_train :

Train lenet-5 on MNIST.

retrieval :

Extract features of query image and all retrieval images from fully-connected layer.

Perform feature similarity computation for retrieval task. Cosine similarity is adopted in this implementation.

retrieval_ :

Example of using images stored on disk as tf inputs.

keras version

utils : Image preprocessing.

funcs : Image retrieval function.

lenet5 : Implementation of Lenet-5 with keras.