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
- Follow below steps but skip setting up 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
- 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
-
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. -
Install the ImageSpace plugin using
girder-install
. Note that you need the extraimagespace
to link to the correct subdirectory of your checkout.
girder-install plugin -s /path/to/image_space/imagespace
- Then set the following environment variables & source them, whenever they change
export IMAGE_SPACE_SOLR=http://your_solr_server_rest_endpoint_OR_local_SolrCoreURLInstance
export IMAGE_SPACE_SOLR_PREFIX=/server/path/to/image/dir
export IMAGE_SPACE_PREFIX=http://path_to_image_repository_local_or_cloud
- Finally start the Girder server with
python -m girder
The default Girder app should be visible at http://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://localhost:8080. The application should be replaced with ImageSpace, with the full Girder app located at http://localhost:8080/girder.
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.
Apache License v2