USCDataScience / cmu-fg-bg-similarity

CMU Foreground/Background Similarity Server from DARPA MEMEX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

USCDataScience: MEMEX: CMU's Foreground and Background Image Similarity Service

This is a Docker and build of an image similarity service compatible with Image Space that provides two functionalities as originally developed by Rohit Girdrar from Carnegie Mellon University (CMU) in these two repos:

ScalableLSH contains CMU's re-implementation of ITQ and LSH. The two algorithms are implemented according to the following papers respectively:

Additionally the segmentation code is based on the work of Xiaolong Wang and the following paper:

Quick Instructions

Build the Docker

  1. docker build -t uscdatascience/cmu-fg-bg-similarity -f Dockerfile .

Run the Docker

  1. docker run -it uscdatascience/cmu-fg-bg-similarity /bin/sh

In a separate window, Outside of the Docker

  1. once built, run it, get a container ID, CID
  2. Copy images to /images on the docker (e.g., from your local), docker cp /some/path/to/imgs/local CID:/images
  3. docker exec -it cmu-img-sim sh

Inside of the Docker

  1. /install/cmu-fg-bg-similarity/entrypoint_cmu-imgsim.sh

Testing a file's similarity with the rest of the corpus

  1. cd /install/cmu-fg-bg-similarity/scripts && ./file_similarity.sh MyPic.png

Which should output something like:

  [
   [
       "http://localhost:8000/MyPic.png",
       1.0
   ],
   [
       "http://localhost:8000/MyPic2.png",
       0.422732
   ],
   [
       "http://localhost:8000/MyPic.jpg",
       0.349333
   ],
 ]

Which is a list of image URLs along with the similarity to the provided image, MyPic.png.

Testing a file's foreground similarity with the rest of the corpus

    1. cd /install/cmu-fg-bg-similarity/scripts && ./file_similarity-fg.sh MyPic.png

You will see similar JSON output akin to the above.

Log file Directory

Log files are written to /install/cmu-fg-bg-similarity/logs.

Questions, comments?

Send them to Chris A. Mattmann.

Contributors

  • Chris A. Mattmann, USC & JPL
  • Tom Barber, JPL
  • Rohit Girdrar, CMU
  • Xiaofan Wang, CMU
  • Karanjeet Singh, USC & JPL

License

Apache License, version 2

About

CMU Foreground/Background Similarity Server from DARPA MEMEX

License:Apache License 2.0


Languages

Language:C++ 80.0%Language:Fortran 11.3%Language:Python 2.7%Language:CMake 2.0%Language:C 2.0%Language:Cuda 1.0%Language:Shell 0.4%Language:Makefile 0.3%Language:CSS 0.1%Language:MATLAB 0.1%Language:JavaScript 0.1%Language:Dockerfile 0.1%Language:HTML 0.0%