Coder Social home page Coder Social logo

body_loop's Introduction

comma body loop driver

Can drive the body in the comma office in loops.

It uses a YOLOv8 foundation model to preprocess the images, then a policy model to determine left, right, or straight. The policy model is currently trained with hand labelled data (included), but can be extended with RL.

Preprocessing, training, and inference (both on PC and device) are all done with tinygrad.

Dataset

We collected a dataset of carrying the body through the loop.

"left" means it's too far left and should go right "right" means it's too far right and should go left "straight" means you are good to go straight "reverse" means you are against a wall and should reverse

Training the model

# First, process the data:
./preprocess.py

# Then, train the model (tinynet.safetensors):
./train.py

Running

You can either run on PC remotely controlling a body, or on a comma 3X.

./control.py

Dependencies

A few standard Python deps. opencv-python is only needed on device.

pip install av tqdm opencv-python

You need a recent version of tinygrad for everything. openpilot for the controls stuff, and cv2 on device for color transform and resizing (TODO: replace with tinygrad!)

body_loop's People

Contributors

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