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:
- Deep Joint Task Learning for Generic Object Extraction. Proc. of Advances in Neural Information Processing Systems (NIPS), 2014
docker build -t uscdatascience/cmu-fg-bg-similarity -f Dockerfile .
docker run -it uscdatascience/cmu-fg-bg-similarity /bin/sh
- once built, run it, get a container ID,
CID
- Copy images to
/images
on the docker (e.g., from your local),docker cp /some/path/to/imgs/local CID:/images
docker exec -it cmu-img-sim sh
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
.
-
cd /install/cmu-fg-bg-similarity/scripts && ./file_similarity-fg.sh MyPic.png
You will see similar JSON output akin to the above.
Log files are written to /install/cmu-fg-bg-similarity/logs
.
Send them to Chris A. Mattmann.
- Chris A. Mattmann, USC & JPL
- Tom Barber, JPL
- Rohit Girdrar, CMU
- Xiaofan Wang, CMU
- Karanjeet Singh, USC & JPL