Inspiration
Robotics systems often struggle to predict the physical effects of certain actions. A standard physics simulator cannot be easily adapted to correct for differences in environment. We wanted to build a model that can constantly adapt to a real-time flow of data and consistently fine-tune its physics simulation.
What it does
Agatha (named after the character from Minority Report) is the first physics engine that can accurately make predictions based solely on video training data.
Imagine a neural network, with zero prior knowledge, that can learn the laws of the universe from scratch just by watching it move.
With only 6 hours of training, our model was able to simulate rigidbody physics to a precision of 4.4mm when tested against PyBullet, a standard physics engine.
The backend process, PhysTensor, is a Graph Neural Network (GNN) which can accurately predict physical states of objects within a space. While a standard physics engine will eventually become bottlenecked by chaotic systems, PhysTensor can simulate anything observable, given enough time and data.
Agatha builds upon this by using an advanced CV algorithm to scan and classify a wide variety of materials, translating this data to PhysTensor. It can also watch the PhysTensor simulation and classify collisions. We also loaded it with demo scenes to showcase the full capabilities of our v1-micro model.
How we built it
We used Base44 to program an interactive frontend that effectively demonstrates the capabilities of our project, and the backend neural network was trained on a cloud instance (7x Quadro RTX 6000 GPUs) along with a backup Nvidia Brev instance (1x H100). Exa API was used to pull videos from the internet, showing a wide variety of physical processes which the model was able to extrapolate rules from.
Challenges we faced
The limited amount of model training time, coupled with the abstract nature of this project, made it hard to debug. The model required a lot of revisions to maintain accurate predictions while also training fast enough to debug and demonstrate before the end of the hackathon.
Accomplishments
The first iteration, PhysTensor v0, was able to predict object positions accurately in a complex collision simulation after only 30 minutes of training on a cloud instance. The second iteration, v1-micro, was trained for 6 hours and was able to reduce the error to an average of 4.4mm
The neural network is light enough that inference can be performed in real-time on a standard 4-core CPU, meaning that our physics engine can run on any modern smartphone.
What we learned
Building the GPU-based physics simulation involved a lot of preliminary research on the types of neural networks that best fit our use case. This project taught us a lot about the use cases and implementations of GNNs.
What's next for Agatha
We hope to train this program more over the coming weeks, possibly migrating it to a locally hosted training server. Our agent continuously scans the internet for videos to use as training data, meaning that PhysTensor could theoretically train on any publicly available video.
We also hope to experiment with parameter scaling, gauging the efficiency vs. accuracy tradeoffs for multiple iterations of model.
Built With
- base44
- exa
- graph-networks
- html
- javascript
- mlp
- python
- pytorch