// readme

Content-Based Image Retrieval in Homomorphic Encryption Domain

Joseph FACELINA
HugoLudmann

Prerequisites

In order to use the program, you need to install the following python libraries :

  • gmpy2
  • pillow
  • tqdm

Pillow and tqdm can be installed with pip but for gmpy2 it’s a bit more complicated since the version available on the packet manager has an issue with random_state.

To install gmpy2, clone the github repo (make sure to checkout the 2.0.9 branch) and follow the installation instruction. You’ll need GMP beforehand.

Usage

To use the program you need to feed it reference pixels and an image.

It comes with a help :

$ ./plot_histogram.py -h    
usage: SecHPlot [-h] -r REF_POINTS -i IMAGE [-j] [--unsecure]

Plot secured histogram of an image.

optional arguments:
  -h, --help            show this help message and exit
  -r REF_POINTS, --ref_points REF_POINTS
                        Filepath for the points of reference (json format).
  -i IMAGE, --image IMAGE
                        Filepath of the image to compute (json or png).
  -j, --json            Need this options if using a json for the image.
  --unsecure            To compute data…