{"id":13702637,"url":"https://github.com/ai-techsystems/deepC","last_synced_at":"2025-05-05T04:31:16.828Z","repository":{"id":47647792,"uuid":"193276319","full_name":"ai-techsystems/deepC","owner":"ai-techsystems","description":"vendor independent TinyML deep learning library, compiler and inference framework microcomputers and micro-controllers","archived":false,"fork":false,"pushed_at":"2022-10-29T15:12:26.000Z","size":12904,"stargazers_count":586,"open_issues_count":27,"forks_count":88,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-14T09:16:39.678Z","etag":null,"topics":["arduino","arduino-nano-33-ble-sense","arm64","deep-learning","edge-devices","esp32","esp8266","inference-framework","machine-learning","microcontrollers","nxp-cortex","odroid","onnx","raspberry-pi","raspberrypi","sparkfun-products","stm32","stm32f4","tinyml"],"latest_commit_sha":null,"homepage":"https://cainvas.ai-tech.systems/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ai-techsystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"srohit0","patreon":null,"open_collective":"rohit-sharma","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://ai-techsystems.com/dnn-compiler/"}},"created_at":"2019-06-22T20:23:12.000Z","updated_at":"2025-04-13T20:30:50.000Z","dependencies_parsed_at":"2022-08-12T13:50:15.908Z","dependency_job_id":null,"html_url":"https://github.com/ai-techsystems/deepC","commit_stats":null,"previous_names":["ai-techsystems/dnncompiler"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-techsystems%2FdeepC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-techsystems%2FdeepC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-techsystems%2FdeepC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-techsystems%2FdeepC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ai-techsystems","download_url":"https://codeload.github.com/ai-techsystems/deepC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249048742,"owners_count":21204306,"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":["arduino","arduino-nano-33-ble-sense","arm64","deep-learning","edge-devices","esp32","esp8266","inference-framework","machine-learning","microcontrollers","nxp-cortex","odroid","onnx","raspberry-pi","raspberrypi","sparkfun-products","stm32","stm32f4","tinyml"],"created_at":"2024-08-02T21:00:39.803Z","updated_at":"2025-05-05T04:31:16.779Z","avatar_url":"https://github.com/ai-techsystems.png","language":"C++","funding_links":["https://github.com/sponsors/srohit0","https://opencollective.com/rohit-sharma","https://ai-techsystems.com/dnn-compiler/","https://opencollective.com/dnnc","https://opencollective.com/dnnc/contribute"],"categories":["General Resources"],"sub_categories":["Project:"],"readme":"# deepC\n\n\n[![Build Status](https://api.travis-ci.org/ai-techsystems/deepC.svg?branch=master)](https://travis-ci.org/github/ai-techsystems/deepC)\n[![PyPI version](https://badge.fury.io/py/deepC.svg)](https://badge.fury.io/py/deepC)\n[![Downloads](https://pepy.tech/badge/deepc)](https://pepy.tech/project/deepc)\n[![Apache2.0 License](https://img.shields.io/github/license/ai-techsystems/dnnCompiler)](LICENSE)\n[![Contributors](https://opencollective.com/dnnc/all/badge.svg?label=financial+contributors)](https://opencollective.com/dnnc)\n[![Chat](https://img.shields.io/badge/chat-Gitter-green.svg)](https://gitter.im/ai-techsystems/community)\n\nThe deepC is a **vendor independent deep learning library, compiler and inference framework** designed for small form-factor devices including **μControllers, IoT and Edge devices**\n\n## 🏃‍♂️ Using deepC\n\nHere are few of many ways.\n\n1. Try deepC with [Colab Noteboook](https://colab.research.google.com/drive/1EKgQcMCHr-0OsG9qJ4wXv7J4JFlPY7CK)\n1. Install it on Ubuntu, raspbian (or any other debian derivatives) using ```pip install deepC```\n1. Compile onnx model- [read this article](test/compiler/mnist/README.md) or [watch this video](https://youtu.be/BpFs83MU3HM)\n1. Use deepC with a [Docker File](Dockerfile)\n\nSee more examples in [tutorial](tutorials/README.md) dir.\n\n## 📛 what is deepC?\n\ndeepC library, compiler and inference framework is designed to **enable and perform** deep learning neural networks by focussing on features of small form-factor devices like micro-controllers, eFPGAs, cpus and other embedded devices like [raspberry-pi](https://www.raspberrypi.org/), [odroid](https://www.hardkernel.com/), [arduino](https://www.arduino.cc/), [SparkFun Edge](https://www.sparkfun.com/products/15170), [risc-V](https://www.amazon.com/Seeed-Studio-Sipeed-Maixduino-RISC-V/dp/B07SW9ZWQQ), mobile phones, x86 and arm laptops among others.\n\n![edge Devices](misc/edgeDevices.png \"supported edge devices\")\n\ndeepC also offers ahead of time compiler producing optimized executable based on [LLVM compiler tool chain](https://llvm.org/) specialized for deep neural networks with [ONNX](https://onnx.ai/) as front end.\n\n## 📝 Design\n\nMain components of **deepC** have been designed to represent and optimize the common deep learning networks in high level graph IR and to transform the computation graph to minimize memory utilization, optimize data layout and fuse computation patterns for different hardware backends.\n\n\u003cimg width=\"600\" alt=\"Architecture\" src=\"https://github.com/ai-techsystems/deepC/blob/master/misc/dnnCompilerArch.jpg\"\u003e\n\nRead more at [high level design document](docs/highLevelDesign.md)\n\n## 💧 PreRequisites\n\n* [ONNX 1.5](https://github.com/onnx/onnx/tree/rel-1.5.0#installation)\n* [LLVM 8.0](http://releases.llvm.org/8.0.0/docs/GettingStarted.html#getting-started-quickly-a-summary)\n* [Python 3.6](https://www.python.org/downloads/release/python-360/)\n* [SWIG 3.0](https://sourceforge.net/projects/swig/files/swig/swig-3.0.12/)\n\n## 💻 Development\n\nBuild and start modifying deepC locally from source code with following steps\n\n### ⭕ Ubuntu 18.04\n\nFollow the steps to install pre-requisites\n```bash\nsudo apt-get update\nsudo apt-get install build-essential python3.6-dev python3-pip swig doxygen clang-format clang clang-8 llvm-8 llvm-8-dev protobuf-compiler libprotoc-dev\nsudo pip3 install numpy==1.15.0 onnx==1.5.0\n```\n\nOnce you are done, build deepC\n```bash\ngit clone https://github.com/ai-techsystems/deepC.git\ncd deepC\nmake\n```\n### ⭕ Mac OS / Windows 10\n\nMake sure you have the below pre-requisites\n#### Mac OS:\n- [Python for Mac](https://www.python.org/downloads/mac-osx/)\n- [Docker for Mac](https://docs.docker.com/v17.09/docker-for-mac/install/#download-docker-for-mac)\n\n#### Windows 10:\n- [Python for Windows](https://www.python.org/downloads/windows/)\n- [Docker for Windows](https://docs.docker.com/v17.09/docker-for-windows/install/#download-docker-for-windows)\n\nOnce you are done, build deepC inside docker container\n```bash\ngit clone https://github.com/ai-techsystems/deepC.git\ncd deepC\npython buildDocker.py\n```\n\n#### 📜 Output\n```bash\nfind include src swig -name \\*.h -print0 -o -name \\*.cpp -print0 | xargs -0 -P8 -n1 clang-format -i\nmake -C src\nmake[1]: Entering directory 'deepC/src'\nmake -C core\nmake[2]: Entering directory 'deepC/src/core'\ncompiling broadcast.cpp\n/usr/bin/g++ -O3 -Wall -std=c++14 -fPIC -march=native -msse2 \\\n    -isystem ./packages/eigen-eigen-323c052e1731 -I./include \\\n    -c broadcast.cpp -o obj/broadcast.o\ncompiling tensor.cpp\n...\n...\n/usr/bin/g++ -shared  ./obj/dnnc_swig.o ./obj/dnnc_pyutils.o ./obj/dnnc_api.o -o lib/libdnnc.so\nln -s -f lib/libdnnc.so _dnnc.so\n/usr/bin/python3 ../test/swig/basic.py\n```\n\n##    Current Support\n\n| Supported Architectures \t|  Status  |\n|-------------------------\t|----------|\n| Arm                     \t|    ✔️   |\n| Armv7                   \t|    ✔️   |\n| Arm64                   \t|    ✔️   |\n| AMD64                   \t|    ✔️   |\n| ppc64le                 \t|    ✔️   |\n\n| Supported OS \t| Distributions  \t|   Status  |\n|--------------\t|----------------\t|-----------|\n| Linux        \t| Ubuntu 18.04   \t|    ✔️    |\n| Linux        \t| CentOS 6   \t\t|    ✔️    |\n| Linux        \t| Arch Linux     \t|    ✔️    |\n| Linux        \t| Manjaro        \t|    ✔️    |\n| Windows      \t| 1803 and above \t|    ✔️    |\n| Mac OS       \t| Sierra and above\t|    ✔️    |\n\n## ➕ Contribute\n\ndnn Compiler adopts apache committer model, we aim to create an open source project that is maintained and owned by the community. Checkout the Contributor Guide.\n\n## 🙏 Acknowledgement\nWe acknowledge the efforts predecessor projects like [LLVM](https://llvm.org/), [ONNX](https://onnx.ai/) etc. to make this project a reality.\n\n---\n\n## 🕵️‍♂️ Why compiler❔\ndeepC is targeted towards devices with small formfactor like microcontrollers, which are part of all sorts of household devices: think appliances, cars, and toys. In fact, there are around 30 billion microcontroller-powered devices produced each year. They're cheap, require very little energy, and are very reliable.\n\nBy bringing deep learning models to tiny microcontrollers, we can boost the intelligence of billions of devices that we use in our lives, without relying on expensive hardware or reliable internet connections. Imagine smart appliances that can adapt to your daily routine, intelligent industrial sensors that understand the difference between problems and normal operation, and magical toys that can help kids learn in fun and delightful ways.\n\n\u003ca href=\"https://opencollective.com/dnnc\"\u003e\u003cimg src=\"https://opencollective.com/dnnc/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/dnnc/contribute)]\n\n---\n\n## Built on/with deepC\n\n### Products\n1. **[No code TinyML platform](http://cainvas.ai-tech.systems/)**, built with deepC technology.\n2. **[No code TinyML Book](http://thetinymlbook.com/)**, with a chapter on deepC.\n\n### Papers\n- Paper: [Deep Neural Network Operators](docs/pubs/DNNC-operators-paper.pdf), appeared in [Proceedings of AITS Summit, 2019](https://www.amazon.com/Proceedings-AITS-Summit-2019-www-ai-techsystems-com-ebook/dp/B083ZJWFGT)\n- Letter: [Gesture Recognition with deepC](docs/pubs/IJCRT%20-%20Gesture%20Recognition%20with%20deepC.pdf), appeared in [INTERNATIONAL JOURNAL OF CREATIVE RESEARCH THOUGHTS](https://ijcrt.org/papers/IJCRT2111106.pdf)\n- Poster: [Deep Neural Network Compiler and Inference Framework for microcontrollers and microcomputers](docs/pubs/AITS%20poster.pdf), appeared in [IRISS 2020\n14th Inter-Research-Institute Student Seminar in Computer Science](https://events.iitgn.ac.in/2020/IRISS/)\n\n### Paper Citations\n- Title: [Artificial Intelligence in the IoT Era: A Review of Edge AI Hardware and Software](https://ieeexplore.ieee.org/abstract/document/9770931/) \n  - [Download pdf](https://fruct.org/publications/fruct31/files/Sip.pdf)\n- Title: [Tiny transformers for environmental sound classification at the edge](https://arxiv.org/abs/2103.12157) \n  - [Download pdf](https://arxiv.org/pdf/2103.12157)\n- Title: [Efficient Edge Analytics: Addressing Cyber-Physical MASINT with Machine Learning on Audio at the Edge](https://repository.lib.fit.edu/handle/11141/3223)\n  - [Download pdf](https://repository.lib.fit.edu/bitstream/handle/11141/3223/ELLIOTT-DISSERTATION-2020.pdf?sequence=1\u0026isAllowed=y)\n\n### Book Chapter\n1. deepC Chapter in book [Introduction to TinyML](http://thetinymlbook.com/), available on [Amazon](https://www.amazon.com/dp/B0B662D7ZW/) and other retailers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-techsystems%2FdeepC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai-techsystems%2FdeepC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-techsystems%2FdeepC/lists"}