Skip to content

necst/NERONE

Repository files navigation

NERONE : the Fast Way to Efficiently Execute Your Deep Learning Algorithm at the Edge

Setup

  • Open a command prompt and execute:

    git clone https://github.com/Xilinx/Vitis-AI.git
    cd Vitis-AI
    git checkout 1.4.1
  • Follow the Vitis-AI installation process here

    • Once the installation is completed open a terminal in the Vitis-AI directory and execute:
    git clone https://github.com/necst/NERONE
    ./docker_run.sh xilinx/vitis-ai-cpu:1.4.1.978
  • Put your calibration dataset into the working directory. You should have something like this:

NERONE   # your WRK_DIR
.
├── build
  ├── calibration_dataset
├── arch.json
├── deploy.sh
└── ...

Quantization and compilation

  • In the command prompt execute:
      Vitis-AI /workspace > conda activate vitis-ai-tensorflow2
      (vitis-ai-tensorflow2) Vitis-AI /workspace > cd NERONE
      (vitis-ai-tensorflow2) chmod +x deploy.sh
      (vitis-ai-tensorflow2) ./deploy.sh ZCU104 build/float_model/f_model.h5 32 build/calibration_dataset 500
  • Change the arguments to suit your needs in the last command: e.g., board, model, batch size, dataset, number of images

Deployment on the evaluation edge board

Set up the evaluation board as stated here.

Copy the deployment_directory directory to your board with scp -r deployment_directory/ root@192.168.1.227:~/. assuming that the target board IP address is 192.168.1.227 - adjust this as appropriate for your system.

You could also directly copy the folder to the board SD card

On the board open NeroneRidingPynq-Classification.ipynb or NeroneRidingPynq-Segmentation.ipynb for classification and segmentation, respectively, and execute it. Your quantized and compile model is now executing on the FPGA!

Adjustment Options

Please keep in mind that both in the quantize.py file and in the .ipynb files images are loaded and preprocessed based on our tests. You might want to change that. In all files you can proceed exactly as you did for training and inference on GPU/CPU without worrying about being working on an FPGA.

Our models

In the folder results you can find float, quantized and compiled models (for the ZCU104) obtained and described in the associated publication.

Refer also to the following repository for a detailed description of one of the test cases.

Associated Publication

If you find this repository useful, please use the following citation:

@ARTICLE{10185039,
  author={Berzoini, Raffaele and D'Arnese, Eleonora and Conficconi, Davide and Santambrogio, Marco D.},
  journal={IEEE Journal of Biomedical and Health Informatics}, 
  title={NERONE: The Fast Way to Efficiently Execute Your Deep Learning Algorithm At the Edge}, 
  year={2023},
  pages={1-9},
  doi={10.1109/JBHI.2023.3296142}}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages