zhangfaquan / DeepPhysX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DeepPhysX

Interfacing AI with simulation

The DeepPhysX project provides Python packages allowing users to easily interface their numerical simulations with learning algorithms.

DeepPhysX provides a Core package with no dependency on any simulation or AI framework. Then other packages are compatible with this Core and a specific simulation or AI framework:

Features

DeepPhysX is a full Python3 projects with 3 main features:

  • Generate a dataset with synthetic data from numerical simulations;
  • Train an artificial neural network with a synthetic dataset;
  • Use the predictions of a trained network in a numerical simulation.

The full list of features is detailed in the documentation.

Quick install

The project was initially developed using SOFA as the simulation package and PyTorch as the AI framework. Thus, DeepPhysX is mainly designed for these frameworks, but obviously other frameworks can also be used. The packages corresponding to these frameworks will therefore be used for the default installation.

The easiest way to install is using pip, but there are a several way to install and configure a DeepPhysX environment (refer to the documentation for further instructions).

$ pip install DeepPhysX             # Install default package
$ pip install DeepPhysX.Sofa        # Install simulation package
$ pip install DeepPhysX.Torch       # Install AI package

If cloning sources, create a DeepPhysX repository to store every package. Packages must be cloned in a directory with the corresponding name as shown below:

$ mkdir DeepPhysX
$ cd DeepPhysX
$ git clone https://github.com/mimesis-inria/DeepPhysX.git Core             # Clone default package
$ git clone https://github.com/mimesis-inria/DeepPhysX.Sofa.git Sofa        # Clone simulation package
$ git clone https://github.com/mimesis-inria/DeepPhysX.Torch.git Torch      # Clone AI package
$ ls
Core Sofa Torch

Demos

DeepPhysX includes a set of detailed tutorials, examples and demos. Following this installation process to directly try the interactive demos:

$ mkdir DeepPhysX
$ cd DeepPhysX
$ git clone https://github.com/mimesis/deepphysx.git Core   # Make shure to clone this repository in 'DeepPhysX/Core'
$ cd Core
$ python3 config.py                                         # Answer 'yes' to install Torch package to launch examples
$ pip install .
Armadillo
python3 demo.py armadillo
Beam
python3 demo.py beam
Liver
python3 demo.py liver
armadillo beam liver

About


Languages

Language:Python 100.0%