VenRaaS / TITAN

Typing-free Image and Tag Augmented Navigation
2 stars 0 forks source link

TOC

TITAN

Typing-free Image and Tag Augmented Navigation

Setup the environment

Miniconda

We use Miniconda to handle the compatibility between the python packages and make the virtual pyhton env.

Install packages

conda install django==1.11.10
conda install -c conda-forge djangorestframework
conda install keras
conda install numpy
conda install opencv
conda install scikit-image
conda install elasticsearch==5.4
conda install elasticsearch-dsl==5.3

Install keras-gpu

Services

Start services

There are 2 services need to start:

# Image search
sudo su -l titan 
cd TITAN/image_search/fileupload/
nohup python manage.py runserver 0.0.0.0:8000 &

# tag navigation
sudo su -l elk
cd elk/elasticsearch/
./bin/elasticsearch -d

URLs to access the services

Demo site

http://venraas.github.io/demo/recomd_mobile_20190408_package/recomd_tags_cam.html

image search simple demo

http://${ServerIP}:8000/cupid/upload/

elasticsearch (chrome app - Elasticsearch Head)

http://${ServerIP}:9200

Generate Online Dense Vector Model

In this step, we generate the images dense vectors, flat_imgfea.py, and concatenate them, compact_feature_dir.py, into multiple compact bulks with numpy format.

We will apply this dense vector model to calculate the similarity with the input image and seek the nearest topK for result.

flat_imgfea.py

Generates the model dense vectors for all input images.
Ex. python flat_imgfea.py n04204238-shopping_basket vgg16_dense

usage: flat_imgfea.py [-h] dirImgs dirFeaVcts

positional arguments:
  dirImgs     the directory of the source images
  dirFeaVcts  the directory for the output feature vectors of the given images

optional arguments:
  -h, --help  show this help message and exit

compact_feature_dir.py

Concatenates a bunch of the image feature vectors into a compact bulk vector.
Ex. python compact_feature_dir.py vgg16_dense

usage: compact_feature_dir.py [-h] dir

positional arguments:
  dir         the root dir of all image features

optional arguments:
  -h, --help  show this help message and exit