Skip to content

Latest commit

 

History

History

imagespace

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ImageSpace Server

ImageSpace is a plugin for Girder.

There are three processes involved for this app: a MongoDB server, an image similarity server, and a Girder web server containing the imagespace plugin.

Note: Please upgrade to latest snapshot of Girder to resolve ImageSpace deployment issues.

  • Comprehensive Deploy
    • Follow below steps
  • Easy Deploy, skips local indexing of documents

Pre-requisites and Install

Image similarity server

The image similarity server requires a set of images to load and process into the index. The server will look at the file located in the IMAGE_SPACE_LISTS environment variable. An example lists file is here:

image_space/flann_index/lists.txt

which will contain one file path per line. Each of these files are themselves text files containing a list of image file paths to process. The default checked-in lists.txt points to a single image list file, listing.txt, which can be edited to point to a small set of local files as desired to test the service.

Once lists.txt is set up properly, start the server with:

pip install tangelo
pip install opencv numpy   # or use conda
cd image_space/flann_index
tangelo --port 9220

Girder with imagespace plugin

  1. First ensure you have the proper Girder_prerequisites,
  • To build on MacOS you will need Xcode if you don't have it already. https://developer.apple.com/xcode/
  • Check if xcode-select -p is pointing to Xcode app Developer directory else point xcode-select to the Xcode app Developer directory using the following command: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
  • Use latest version of node 6.x
  1. Then install Girder from a Git checkout. As of now ImageSpace hasn't been upgraded to work with Girder 2.x, so you'll have to use the latest tag from 1.x: https://github.com/girder/girder/tree/v1.7.0

    Note: After any changes to the ImageSpace code, it is necessary to rebuild it by running grunt from the top level Girder directory.

  2. Install the ImageSpace plugin using girder-install. Note that you need the extra imagespace to link to the correct subdirectory of your checkout.

girder-install plugin -s /path/to/image_space/imagespace
  1. Then set the following environment variables & source them, whenever they change
export IMAGE_SPACE_SOLR=http:https://your_solr_server_rest_endpoint_OR_local_SolrCoreURLInstance
export IMAGE_SPACE_SOLR_PREFIX=/server/path/to/image/dir
export IMAGE_SPACE_PREFIX=http:https://path_to_image_repository_local_or_cloud
  1. Finally start the Girder server with
python -m girder

The default Girder app should be visible at http:https://localhost:8080.

Register for a new account, which will be the admin account. Go to the admin console and enter the plugin configuration. Find the ImageSpace plugin and enable it. Girder should prompt you to restart the server (or restart manually). Once restarted, again visit http:https://localhost:8080. The application should be replaced with ImageSpace, with the full Girder app located at http:https://localhost:8080/girder.

Additional Plugins

ImageSpace comes with additional plugins that may be enabled using the Girder administration panel. Each of these can be installed following an identical scheme as above (using girder-install). For example, to install the SMQTK similarity search plugin, run the following then enable the plugin in Girder's plugin settings.

girder-install plugin -s /path/to/image_space/imagespace_smqtk

Individual plugins may require certain environment variables be set, for example the ImageSpace FLANN plugin requires IMAGE_SPACE_FLANN_INDEX be set to the URL of the flann_index. These plugins will warn you when starting Girder if they don't have the required environment variables to function properly.

License

Apache License v2