1 Star 0 Fork 0

Greatpan/shadernn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

ShaderNN logo

What is ShaderNN?

ShaderNN is a lightweight deep learning inference framework optimized for Convolutional Neural Networks. It provides high-performance inference for deep learning applications in image and graphics process on mobile devices. ShaderNN workflow

Why use ShaderNN?

  • Targeted for real time graphic and image post-processing
    • Directly operate the texture data of graphics graphics and image applications, save big I/O time which is critical for real time application on mobile platforms;
    • Native OpenGL ES based, easily integrate with the graphics rendering pipeline to maximize the use of computing resources, suits for rendering, image/video and game AI applications;
  • High Performance
    • Makes full use of the parallel computing advantages of GPU Shader to implement core operators;
    • Pre-building the static computation graph for inference first and then running it, compared to the dynamic graph, the graph structure can be optimized before running, such as constant folding, operator fusion, etc., which can obtain faster forward operation speed;
    • When the model is running, the running backend will be selected statically or dynamically according to the platform resources, and the running parameters of the kernel will be dynamically adjusted to achieve the best energy consumption utilization at runtime
    • Optimizes for Convolutional Neural Networks to improve real-time performance;
    • Supports heterogeneous device hybrid computing, and currently supports CPU and GPU;
    • Provides a demo app pipeline optimized for throughput over latency, minimized data transfer and optimized for video processing
  • Lightweight & Portability & Extensibility
    • OpenGL-based does not require reliance on other third-party technology libraries and optimized for mobile platforms, making it easy to port, deploy and upgrade;
    • Simple input/output interface, compatible with GPU processing;
  • Versatility
    • Supports popular framework formats such as TensorFlow/PyTorch/ONNX;
    • Supports popular Convolutional Neural Networks (CNN), such image classification, object detection, image segmentation, image enhancement;
    • Supports user-defined operators, convenient to implement new operators and models;

Typical Application Scenerios:

  • ShaderNN is good at graphics and image processing pipelines, and here listed some typical scenerios, such as ray tracing denoise, deep learning super sampling, high dynamic range, super resolution and style transfer etc.
    ShaderNN Usecases

Architecture:

ShaderNN architecture

Getting Started:

Model Conversion:

  • Support conversion from TensorFlow , PyTorch and ONNX based models. Please refer to ModelConversion.md for details.

Model Zoo/Examples:

  • Provide image classification, object detection, image segmentation and image enchancement models for reference. Please refer to ModelZoo.md for details.

Operators:

  • Implement basic CNN operators by using fragment shader, computer shader or CPU. For a complete list of operators being supported, please refer to Operators.md for details.

Benchmark:

  • Benchmark models based in Model Zoo against TFLite framework. Please refer to Benchmark.md for details.

Style Transfer Demo:

  • Style Transfer example running on Android demo app using ShaderNN framework is shown below. The pretrained models are inferenced to showcase styles like Candy, Mosaic, Rain Princess and Udnie.

    Alt-text

Branching Policy:

  • For dev branches for your own use, please prefix it with "your_name/". For example, "bruce.lee/training_session_1"

License:

  • Apache License 2.0

Acknowledgement:

ShaderNN makes use of the following third party libraries:

ShaderNN makes use of models trained and converted from Tensorflow, PyTorch and ONNX, and uses Netron visualizer:

Copyright (C) 2020 - 2022 OPPO. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

oppo 图形推理引擎 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/greatpanc/shadernn.git
git@gitee.com:greatpanc/shadernn.git
greatpanc
shadernn
shadernn
dev_opensource_release

搜索帮助