Git Product home page Git Product logo

edgeai_llie-jetson-nano's Introduction

EdgeAI Jetson Nano LLIE

Introduction

This is a project for Low-light image enhancement with edge AI computations using Jetson Nano.
LLIE approach: CPGA-Net
Python == 3.6

Installation

ONNX

Follow this link Jetson Zoo

  1. onnxruntime
# Download pip wheel from location above for your version of JetPack  
wget https://nvidia.box.com/shared/static/pmsqsiaw4pg9qrbeckcbymho6c01jj4z.whl -O onnxruntime_gpu-1.11.0-cp36-cp36-linux_aarch64.whl

pip3 install onnxruntime_gpu-1.11.0-cp36-cp36-linux_aarch64.whl

TensorRT

TensorRT Installation Guide
TensorRT Intro Notebooks

For installing TensorRT in a conda environment, you can refer to this forum post

  1. pycuda
  2. tensorrt

Usage

Pytorch to ONNX

PyTorch tutorial on exporting a simple model to ONNX
Exporting a Model from PyTorch to ONNX and Running it using ONNX Runtime

dummy_input = torch.randn(1, 3, 256, 256)
torch.onnx.export(network, dummy_input, MODEL_NAME+'.onnx' )

ONNX

python3 demo_onnx.py

You can try different execution ways, see onnx doc

TRT

trtexec --onnx=OV_enhance_color-llie-ResCBAM_g.onnx --saveEngine=CPGANet_engine.trt --explicitBatch --workspace=128
python3 demo_trt.py

Runtime Performance

Image Resolution: 256x256

Pytorch ONNX (CUDA) ONNX (TRT) TensorRT
139.343681 ms 110.399661 ms 83.792326 ms 72.907643 ms

Efficient Version (DGF)

Pytorch ONNX (CUDA) ONNX (TRT) TensorRT
39.909654 ms 37.896626 ms 32.811749 ms ? ms

Results

Here are some example images enhanced using the LLIE approach:

Pytorch

Image Pytorch

ONNX

Image ONNX

ONNX (TRT)

Image ONNX(TRT)

TensorRT

Image TRT

Image From LIME

Issues

TensorRT doesn't perform normally with unknown issue,

Reference

  1. PyTorch Official Documentation
  2. ONNX Official Documentation
  3. TensorRT Official Documentation
  4. Jetson Nano Developer Kit
  5. EdgeAI LLIE NCS2 GitHub Repository
  6. CPGA-Net-Pytorch GitHub Repository

edgeai_llie-jetson-nano's People

Contributors

shyandram avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.