Giter Club home page Giter Club logo

ruilvdotcom / brain-cog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from braincog-x/brain-cog

0.0 0.0 0.0 2.08 MB

Brain-inspired Cognitive Intelligence Engine (BrainCog) is a brain-inspired spiking neural network based platform for Brain-inspired Artificial Intelligence and simulating brains at multiple scales. The long term goal of BrainCog is to provide a comprehensive theory and system to decode the mechanisms and principles of human intelligence and its ev

Home Page: http://www.brain-cog.network/

License: Apache License 2.0

Python 100.00%

brain-cog's Introduction

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

./figures/logo.jpg

BrainCog provides essential and fundamental components to model biological and artificial intelligence.

image

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

mt

mt

Brain Simulation

BrainCog currently include two parts for brain simulation:

  • Brain Cognitive Function Simulation
  • Multi-scale Brain Structure Simulation

bmbm10s

bm10s

bh10s

The anatomical and imaging data is used to support our simulation from various aspects.

Resources

Lectures

Tutorial

BrainCog Data Engine

In addition to the static datasets, BrainCog supports the commonly used neuromorphic datasets, such as DVSGesture, DVSCIFAR10, NCALTECH101, ES-ImageNet. Also, the neuromorphic dataset N-Omniglot for few-shot learning is also integrated into BrainCog.

DVSGesture

This dataset contains 11 hand gestures from 29 subjects under 3 illumination conditions recorded using a DVS128.

DVSCIFAR10

This dataset converts 10,000 frame-based images in the CIFAR10 dataset into 10,000 event streams using a dynamic vision sensor.

NCALTECH101

The NCaltech101 dataset is captured by mounting the ATIS sensor on a motorized pan-tilt unit and having the sensor move while it views Caltech101 examples on an LCD monitor. The "Faces" class has been removed from N-Caltech101, leaving 100 object classes plus a background class

ES-ImageNet

The dataset is converted with Omnidirectional Discrete Gradient (ODG) from 1,300,000 frame-based images in the ImageNet dataset into event-stream samples, which has 1000 categories.

N-Omniglot

This dataset contains 1,623 categories of handwritten characters, with only 20 samples per class. The dataset is acquired with the DVS acquisition platform to shoot videos (generated from the original Omniglot dataset) played on the monitor, and use the Robotic Process Automation (RPA) software to collect the data automatically.

You can easily use them in the braincog/datasets folder, taking DVSCIFAR10 as an example

loader_train, loader_eval,_,_ = get_dvsc10_data(batch_size=128,step=10)

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
  • pandas >= 1.4.2
  • xlrd == 1.2.0

Install

Install Online

  1. You can install braincog by running:

    pip install braincog

  2. Also, install from github by running:

    pip install git+https://github.com/braincog-X/Brain-Cog.git

Install locally

  1. 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

  2. Enter the folder of braincog

    cd Brain-Cog

  3. Install braincog locally

    pip install -e .

Example

  1. 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
  1. 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/

BrainCog Assistant

Please add our BrainCog Assitant via wechat and we will invite you to our wechat developer group. image

brain-cog's People

Contributors

sunbaby01 avatar floyedshen avatar xdusponge avatar tianlonglee avatar yizeng-ai avatar annaoliver avatar craree avatar precola avatar sunyinqian avatar zyx-cas avatar tiger0044 avatar qingluyichen avatar lczd avatar lxbeatles avatar ppx-hub avatar lqnankai avatar wyw-cas avatar adamgallas avatar fenghuihhhh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.