Getting Started with FHEON

OpenFHE

FHEON is built on OpenFHE. To set up FHEON, first install OpenFHE following the instructions on the OpenFHE website.

Prerequisites

Before installing FHEON, ensure your system has the following:

FHEON Installation

  1. Clone the FHEON repository:

    git clone https://github.com/stamcenter/fheon.git
    cd FHEON
    mkdir HEkeys
    mkdir images **Put all the datasets in this folder**
    
  2. Create a build directory:

    mkdir build && cd build
    
  3. Configure and build:

    cmake -DCMAKE_BUILD_TYPE=Release ..
    make -j$(nproc)
    
  4. Run examples inference built e.g:

    ./lenet5
    

Basic Neural Network Examples

LeNet-5 FHE Implementation

This example demonstrates the LeNet-5 inference workflow using FHEON. It shows how to configure the FHE context, encode MNIST image data, and run convolution, average pooling, ReLU, and fully connected layers in the encrypted domain.

Full source: LeNet5.cpp

ResNet-20 FHE Implementation

This example demonstrates ResNet-20 inference using FHEON. It shows how to set up FHE context, model weights, residual blocks, and classification layer.

Full source: ResNet20Basic.cpp

For more details and examples, visit the dedicated Examples section in this documentation, where we show different models. We also provide a step by step guide for their full implementation details.

FHEON on GitHub