Skip to content

Commit

Permalink
[docs] Minor readme/image updates
Browse files Browse the repository at this point in the history
  • Loading branch information
raylin1000 committed May 1, 2018
1 parent 8e25f76 commit 034086b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ There are two common types of interpolation used when images are scaled: [biline

A potential use for resizing an image homomorphically would be for multiple predictions on an image. Since most neural nets take a fixed width, height, and channels for images, a resizing or cropping an image on the end user side would require the end user to encrypt the image multiple times for each resizing. Unfortunately, homomorphic encryption is incredibly costly for the end user. An alternative would to be send the original image, encrypted homomorphically, to the server, and let the server take care of resizing in the case that the image be used in multiple predictive algorithms.

![Resize FHE workflow](docs/resizeworkflow.png)

Some examples of the images generated with different parameters.
Some examples of the images generated with different parameters:

![bicubicboaz](docs/bicubicboaz.png)

![Resize FHE workflow](docs/resizeworkflow.png)


### Homomorphic JPEG-2 Encoding
Image compression cuts the frames of the video into blocks, which is then compressed using frequency analysis. To compress video homomorphically, we implement the [discrete cosine transform](https://en.wikipedia.org/wiki/Discrete_cosine_transform)
Expand Down Expand Up @@ -47,7 +46,9 @@ herefore, we use the following method of approximating the run length encoding.
Consider an example with a fixed output length of 16 as in the case for video encodings.
```
[(20, 8), (30, 3), (15, 5)]
```
gets decoded to
```
[ 20, 20, 20, 20, 20, 20, 20, 20, 30, 30, 30, 15, 15, 15, 15, 15 ]
```
Since the output array is a fixed length, we can image that is it a continuous function $f$ with domain from $0$ to $16$, and split the function apart into $f_1, f_2, f_3$ corresponding to each pair, which is depicted as follows.
Expand Down
Binary file modified docs/bicubicboaz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/decodeboaz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/jpegboaz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 034086b

Please sign in to comment.