All Projects → Image-Py → planer

Image-Py / planer

Licence: BSD-3-Clause license
Powerful Light Artificial NEuRon inference framework for CNN

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to planer

HoloClean-Legacy-deprecated
A Machine Learning System for Data Enrichment.
Stars: ✭ 75 (+44.23%)
Mutual labels:  inference-engine
Openvino
OpenVINO™ Toolkit repository
Stars: ✭ 2,858 (+5396.15%)
Mutual labels:  inference-engine
gaze-estimation-with-laser-sparking
Deep learning based gaze estimation demo with a fun feature :-)
Stars: ✭ 32 (-38.46%)
Mutual labels:  inference-engine
Torsten
library of C++ functions that support applications of Stan in Pharmacometrics
Stars: ✭ 38 (-26.92%)
Mutual labels:  inference-engine
daisykit
Daisykit is an easy AI toolkit for software engineers to integrate pretrained AI models and pipelines into their projects. - with NCNN, OpenCV, Python wrappers
Stars: ✭ 22 (-57.69%)
Mutual labels:  inference-engine
BMW-IntelOpenVINO-Detection-Inference-API
This is a repository for a No-Code object detection inference API using the OpenVINO. It's supported on both Windows and Linux Operating systems.
Stars: ✭ 66 (+26.92%)
Mutual labels:  inference-engine
exper
experimental rule-based programming formalism (under construction)
Stars: ✭ 14 (-73.08%)
Mutual labels:  inference-engine
opencv-python-inference-engine
Wrapper package for OpenCV with Inference Engine python bindings.
Stars: ✭ 32 (-38.46%)
Mutual labels:  inference-engine
IDVerification
"Very simple but works well" Computer Vision based ID verification solution provided by LibraX.
Stars: ✭ 44 (-15.38%)
Mutual labels:  inference-engine
lisp-inference
An Inference Engine based on Propositional Calculus written in Common Lisp
Stars: ✭ 36 (-30.77%)
Mutual labels:  inference-engine
r2inference
RidgeRun Inference Framework
Stars: ✭ 22 (-57.69%)
Mutual labels:  inference-engine
tensorrt-ssd-easy
No description or website provided.
Stars: ✭ 32 (-38.46%)
Mutual labels:  inference-engine
pomagma
An inference engine for extensional untyped λ-calculus
Stars: ✭ 15 (-71.15%)
Mutual labels:  inference-engine

Planer: Powerful Light Artificial NEuRon

A powerful light-weight inference framework for CNN. The aim of planer is to provide efficient and adaptable inference environment for CNN model. Also in order to enlarge the application scope, we support ONNX format, which enables the converting of trained model within various DL frameworks.

Features

Planer is a light-weight CNN framework implemented in pure Numpy-like interface. It can run only with Numpy. Or change different backends. (Cupy accelerated with CUDA, ClPy accelerated with OpenCL).

  • Implemented in pure Numpy-like interface.
  • Extremely streamlined IR based on json
  • Powerful model visualization tools
  • ONNX supported model converting
  • Plenty of inspiring demos

Various Building Options

All the elements (layers, operations, activation fuctions) are abstracted to be layer, and a json formatted flow is applied to build the computation graph. We support 3 ways of building a network:

  • PyTorch-like
from planer import *
# ========== write a net manually ========== 
class CustomNet(Net):
    def __init__(self):
        self.conv = Conv2d(3, 64, 3, 1)
        self.relu = ReLU()
        self.pool = Maxpool(2)
        self.upsample = UpSample(2)
        self.concatenate = Concatenate()
        self.sigmoid = Sigmoid()

    def forward(self, x):
        x = self.conv(x)
        x = self.relu(x)
        y = self.pool(x)
        y = self.upsample(y)
        z = self.concatenate([x, y])
        return self.sigmoid(z)
  • Json-like (based on our IR)
# ========== load net from json ========== 
layer = [('conv', 'conv', (3, 64, 3, 1)),
        ('relu', 'relu', None),
        ('pool', 'maxpool', (2,)),
        ('up', 'upsample', (2,)),
        ('concat', 'concat', None),
        ('sigmoid', 'sigmoid', None)]

flow = [('x', ['conv', 'relu'], 'x'),
        ('x', ['pool', 'up'], 'y'),
        (['x','y'], ['concat', 'sigmoid'], 'z')]

net = Net()
net.load_json(layer, flow)

Converted from onnx (pytorch 1.1.0)

It is easy to convert a net from torch after training (through onnx). Here is a demo with resnet18.

from torchvision.models import resnet18
import torch
from planer import torch2planer

net = resnet18(pretrained=True)
x = torch.randn(1, 3, 224, 224, device='cpu')
torch2planer(net, 'resnet18', x)

# then you will get a resnet18.json and resnet18.npy in current folder.

from planer import read_net
import planer
import numpy as np

# get the planer array lib
pal = planer.core(np)
x = pal.random.randn(1, 3, 224, 224).astype('float32')
net = read_net('resnet18')
net(x) # use the net to predict youre data

Change backend

Planer is based on Numpy-like interface. So it is easy to change backend to Cupy or ClPy.

import planer, cupy
planer.core(cupy) # use cupy as backend

import planer, clpy
planer.core(clpy) # use clpy as backend

We tested on windows, planer with cupy is 80-100 times faster then numpy. has a equal performance with torch. (but on linux torch is faster)

Network visualization

We provide a powerful visualization tools for the cnn model. Just call net.show() will work.

Demos

We have released some demos, which can be investigated inside demo/ folder.

Milestone

Yolo-v3 is supported now!

Planer-pro

Planer is our open source version framework, We also have a professional edition (several times faster than torch).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].