{"id":21039011,"url":"https://github.com/image-py/planer","last_synced_at":"2025-05-15T16:32:11.282Z","repository":{"id":57453299,"uuid":"253687651","full_name":"Image-Py/planer","owner":"Image-Py","description":"Powerful Light Artificial NEuRon inference framework for CNN","archived":false,"fork":false,"pushed_at":"2022-03-06T17:10:08.000Z","size":1406,"stargazers_count":61,"open_issues_count":3,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-07T12:36:04.307Z","etag":null,"topics":["cnn","deep-learning","inference-engine"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Image-Py.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-07T04:33:58.000Z","updated_at":"2024-08-13T03:07:42.000Z","dependencies_parsed_at":"2022-08-29T08:41:37.301Z","dependency_job_id":null,"html_url":"https://github.com/Image-Py/planer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Image-Py%2Fplaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Image-Py%2Fplaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Image-Py%2Fplaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Image-Py%2Fplaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Image-Py","download_url":"https://codeload.github.com/Image-Py/planer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225362120,"owners_count":17462371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","deep-learning","inference-engine"],"created_at":"2024-11-19T13:37:14.639Z","updated_at":"2024-11-19T13:37:17.819Z","avatar_url":"https://github.com/Image-Py.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Planer: Powerful Light Artificial NEuRon\n\n![](https://user-images.githubusercontent.com/36396315/79580952-57b7d200-80fc-11ea-9841-2b253f4e6293.png)\n\nA 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.  \n\n## Features\n\nPlaner 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).\n\n* Implemented in pure Numpy-like interface. \n* Extremely streamlined IR based on json\n* Powerful model visualization tools\n* ONNX supported model converting\n* Plenty of inspiring demos\n\n## Various Building Options\nAll 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:\n* PyTorch-like\n```python\nfrom planer import *\n# ========== write a net manually ========== \nclass CustomNet(Net):\n    def __init__(self):\n        self.conv = Conv2d(3, 64, 3, 1)\n        self.relu = ReLU()\n        self.pool = Maxpool(2)\n        self.upsample = UpSample(2)\n        self.concatenate = Concatenate()\n        self.sigmoid = Sigmoid()\n\n    def forward(self, x):\n        x = self.conv(x)\n        x = self.relu(x)\n        y = self.pool(x)\n        y = self.upsample(y)\n        z = self.concatenate([x, y])\n        return self.sigmoid(z)\n```\n* Json-like (based on our IR)\n```python\n# ========== load net from json ========== \nlayer = [('conv', 'conv', (3, 64, 3, 1)),\n        ('relu', 'relu', None),\n        ('pool', 'maxpool', (2,)),\n        ('up', 'upsample', (2,)),\n        ('concat', 'concat', None),\n        ('sigmoid', 'sigmoid', None)]\n\nflow = [('x', ['conv', 'relu'], 'x'),\n        ('x', ['pool', 'up'], 'y'),\n        (['x','y'], ['concat', 'sigmoid'], 'z')]\n\nnet = Net()\nnet.load_json(layer, flow)\n```\n\n## Converted from onnx (pytorch 1.1.0)\n\nIt is easy to convert a net from torch after training (through onnx). Here is a demo with resnet18.\n\n``` python\nfrom torchvision.models import resnet18\nimport torch\nfrom planer import torch2planer\n\nnet = resnet18(pretrained=True)\nx = torch.randn(1, 3, 224, 224, device='cpu')\ntorch2planer(net, 'resnet18', x)\n\n# then you will get a resnet18.json and resnet18.npy in current folder.\n\nfrom planer import read_net\nimport planer\nimport numpy as np\n\n# get the planer array lib\npal = planer.core(np)\nx = pal.random.randn(1, 3, 224, 224).astype('float32')\nnet = read_net('resnet18')\nnet(x) # use the net to predict youre data\n```\n\n## Change backend\n\nPlaner is based on Numpy-like interface. So it is easy to change backend to Cupy or ClPy. \n\n```python\nimport planer, cupy\nplaner.core(cupy) # use cupy as backend\n\nimport planer, clpy\nplaner.core(clpy) # use clpy as backend\n```\n\nWe 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)\n\n## Network visualization\n\nWe provide a powerful visualization tools for the cnn model. Just call ```net.show()``` will work.\n\n![](https://user-images.githubusercontent.com/24822467/78111180-dc350000-742e-11ea-9152-30dad06ee433.png)\n\n\n## Demos\nWe have released some demos, which can be investigated inside ```demo/``` folder.\n\n![](https://user-images.githubusercontent.com/36396315/79580979-60100d00-80fc-11ea-8565-cd55f5db2395.png)\n\n## Milestone\nYolo-v3 is supported now!\n\n![](https://user-images.githubusercontent.com/36396315/79184976-40e95500-7e48-11ea-9679-a70074c658cf.png)\n\n## Planer-pro\n\nPlaner is our open source version framework, We also have a professional edition (several times faster than torch).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimage-py%2Fplaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimage-py%2Fplaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimage-py%2Fplaner/lists"}