BrainCog is an open source spiking neural network based brain-inspired cognitive intelligence engine for Brain-inspired Artificial Intelligence and brain simulation. More information on braincog can be found on its homepage http://www.brain-cog.network/
Project description
braincog
BrainCog is an open source spiking neural network based brain-inspired cognitive intelligence engine for Brain-inspired Artificial Intelligence and brain simulation. More information on BrainCog can be found on its homepage http://www.brain-cog.network/
The current version of BrainCog contains at least 18 functional spiking neural network algorithms (including but not limited to perception and learning, decision making, knowledge representation and reasoning, motor control, social cognition, etc.) built based on BrainCog infrastructures, and BrainCog also provide brain simulations to drosophila, rodent, monkey, and human brains at multiple scales based on spiking neural networks at multiple scales. More detail in http://www.brain-cog.network/docs/
BrainCog is a community based effort for spiking neural network based artificial intelligence, and we welcome any forms of contributions, from contributing to the development of core components, to contributing for applications.
If you use BrainCog in your research, the following paper can be cited as the source for BrainCog.
Yi Zeng, Dongcheng Zhao, Feifei Zhao, Guobin Shen, Yiting Dong, Enmeng Lu, Qian Zhang, Yinqian Sun, Qian Liang, Yuxuan Zhao, Zhuoya Zhao, Hongjian Fang, Yuwei Wang, Yang Li, Xin Liu, Chengcheng Du, Qingqun Kong, Zizhe Ruan, Weida Bi. BrainCog: A Spiking Neural Network based Brain-inspired Cognitive Intelligence Engine for Brain-inspired AI and Brain Simulation. arXiv:2207.08533, 2022. https://arxiv.org/abs/2207.08533
BrainCog provides essential and fundamental components to model biological and artificial intelligence.
Resources
Lecture
The current version of the lectures are in Chinese, and the English version will come soon. Stay tuned...
- [BrainCog Talk] Begining BrainCog Lecture 10. Multi-brain Areas Coordinated Brain-inspired Decision-Making Spiking Neural Network Based on Braincog
- [BrainCog Talk] Begining BrainCog Lecture 9. Spikin Neural Networks with Global Feedback Connections Based on BrainCog
- [BrainCog Talk] Begining BrainCog Lecture 8. Converting Artificial Neural Network to Spiking Neural Network through BrainCog
- [BrainCog Talk] Begining BrainCog Lecture 7. Implementing quantum superposition inspired spatio-temporal spike encoding through BrainCog
- [BrainCog Talk] Begining BrainCog Lecture 6. Implementing spiking deep Q network through Braincog
- [BrainCog Talk] Begining BrainCog Lecture 5. Advanced BrainCog System Functions
- [BrainCog Talk] Begining BrainCog Lecture 4. Creating Cognitive SNNs for Brain Areas
- [BrainCog Talk] Begining BrainCog Lecture 3. Creating SNNs Easily and Quickly
- [BrainCog Talk] Begining BrainCog Lecture 2. Computational Modeling of Spiking Neurons
- [BrainCog Talk] Begining BrainCog Lecture 1. Installing and Deploying BrainCog platform
Tutorial
- How to install braincog
- Overall introduction of BrainCog
- Tutorial of Spiking Neuron Modeling
- Building Efficient Spiking Neural Networks with BrainCog
- How to build a cognitive network
Brain-Inspired AI
BrainCog currently provides cognitive functions components that can be classified into five categories:
- Perception and Learning
- Decision Making
- Motor Control
- Knowledge Representation and Reasoning
- Social Cognition
Brain Simulation
BrainCog currently include two parts for brain simulation:
- Brain Cognitive Function Simulation
- Multi-scale Brain Structure Simulation
The anatomical and imaging data is used to support our simulation from various aspects.
Requirements:
- python == 3.8
- CUDA toolkit == 11.
- numpy >= 1.21.2
- scipy >= 1.8.0
- h5py >= 3.6.0
- torch >= 1.10
- torchvision >= 0.12.0
- torchaudio >= 0.11.0
- timm >= 0.5.4
- matplotlib >= 3.5.1
- einops >= 0.4.1
- thop >= 0.0.31
- pyyaml >= 6.0
- loris >= 0.5.3
- pandas >= 1.4.2
- tonic (special)
- pandas >= 1.4.2
- xlrd == 1.2.0
Install
Install Online
-
You can install braincog by running:
pip install braincog
-
Also, install from github by running:
pip install git+https://github.com/braincog-X/Brain-Cog.git
Install locally
-
If you are a developer, it is recommanded to download or clone braincog from github.
git clone https://github.com/braincog-X/Brain-Cog.git
-
Enter the folder of braincog
cd Brain-Cog
-
Install braincog locally
pip install -e .
Install datasets (optional)
If you use datasets in your code, especially neuromorphic datasets, you have to install another package
pip install git+https://github.com/BrainCog-X/tonic_braincog.git
You can download this package and install locally as well.
git clone https://github.com/BrainCog-X/tonic_braincog.git
cd tonic
pip install -e .
Example
- Examples for Image Classification
cd ./examples/Perception_and_Learning/img_cls/bp
python main.py --model cifar_convnet --dataset cifar10 --node-type LIFNode --step 8 --device 0
- Examples for Event Classification
cd ./examples/Perception_and_Learning/img_cls/bp
python main.py --model dvs_convnet --node-type LIFNode --dataset dvsc10 --step 10 --batch-size 128 --act-fun QGateGrad --device 0
Other BrainCog features and tutorials can be found at http://www.brain-cog.network/docs/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file braincog-0.2.7.18-py3-none-any.whl
.
File metadata
- Download URL: braincog-0.2.7.18-py3-none-any.whl
- Upload date:
- Size: 98.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f1f41b5dccfe08ee83fb8a76701ac100fabfce04155cd955b5d1134b263a3ae |
|
MD5 | 1b9e5e06c4338abcd86cc582d8b43c0d |
|
BLAKE2b-256 | a1d145ae014840cd56bd0e453c0aab588d306daf9c94fa5bf93082cc172b9e61 |