Machine Learning for RC Cars

Overview

Suiron

Machine Learning for RC Cars

Prediction visualization (green = actual, blue = prediction)

Click the video below to see it in action!

IMAGE ALT TEXT

Dependencies

Python 2.7 was chosen as it was supported by all the libraries used at the time

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-opencv python-dev

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
sudo pip install --upgrade $TF_BINARY_URL

sudo pip install -r requirements.txt

Collecting data

python collect.py

Visualizing collected data

python visualize_collect.py

Training data

python train.py

Visualizing predicted data

python visualize_predict.py

References

Blog Post detailing how the hardware and software communicate - Communicating between RC Car and the On-board Computer - Jabelone

Communication between hardware and software repo - car-controller

Neural Network architecture was based on NVIDIA's Self-driving car paper - End-To-End Learning for Self-Driving Cars

Comments
  • Raw data available?

    Raw data available?

    Nice work!

    Thanks for sharing - great project. Are you willing to share the raw data you collected?

    After reading about the project at

    In reality, 20 minutes is no where near enough data. It works great on this particular track with similar lighting conditions but would likely fail if the conditions changed to much.

    Your project is inspiring, I'd like to build a car myself. Before doing that I'd like to try out try some different training ideas but need raw data. If you ware willing to share your dataset it would be a real time saver. My guess is others would appreciate it as well.

    Thanks,

    question 
    opened by ProgramItUp 3
  • collect.py does not save data

    collect.py does not save data

    Does collect.py work for a Raspberry Pi 3? When I execute python collect.py the code runs without errors but I notice that the CPU is near zero, output_1.csv does not contain any data while running, after pressing "cntrl-c" output_1.csv only contains the header ",image,servo,motor"

    Here is more detail:

    1. clone suiron and car-controller
    2. Upload car-controller.ino to an Arduino nano
    3. Execute python collect.py
    4. "Recording data..." and the webcam light turns on, as normal
    5. Wait for 10seconds to 1 minute
    6. Press cntr-c
    7. No data in output_foo.csv

    Any thoughts?

    opened by ProgramItUp 1
  • Problem in running train.py

    Problem in running train.py

    Hi Kendrick, thanks for sharing your amazing project. I have some problem when I'm running Train.py here is the log :


    data = pd.DataFrame.from_csv(filename) Traceback (most recent call last): File "train.py", line 18, in c_x, c_servo = get_servo_dataset(d) File "/Users/theamircoder/suiron/suiron/utils/datasets.py", line 14, in get_servo_dataset data = pd.DataFrame.from_csv(filename) File "/anaconda3/lib/python3.6/site-packages/pandas/core/frame.py", line 1361, in from_csv infer_datetime_format=infer_datetime_format) File "/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 709, in parser_f return _read(filepath_or_buffer, kwds) File "/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 449, in _read parser = TextFileReader(filepath_or_buffer, **kwds) File "/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 818, in init self._make_engine(self.engine) File "/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 1049, in _make_engine self._engine = CParserWrapper(self.f, **self.options) File "/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py", line 1695, in init self._reader = parsers.TextReader(src, **kwds) File "pandas/_libs/parsers.pyx", line 565, in pandas._libs.parsers.TextReader.cinit pandas.errors.EmptyDataError: No columns to parse from file


    How can I train it ? should I use Joysticks or something ?

    opened by AmirmohammadZarif 0
  • Broken link

    Broken link

    Hi great work here.. It seems the link: http://jabelone.com.au/blog/make-autonomous-car-code-included/ I'm get a "not Found" page.. In either case, I wanted to know the order in which to run the python files in the repository.. Thanks

    opened by renderit 0
  • import cv2 fails with CUDA 8.0

    import cv2 fails with CUDA 8.0

    So, I updated tensorflow to r0.11, which required upgrading to CUDA 8.0 to be able to use the prebuilt Tensorflow binary for Ubuntu/Linux 64-bit, GPU enabled, Python 2.7.

    Tensorflow runs correctly but python ./suiron/train.py import cv2 fails with Traceback (most recent call last): File "./train.py", line 5, in <module> from suiron.utils.datasets import get_servo_dataset File "/data/home/me/my_tensorflow/suiron/suiron/suiron/utils/datasets.py", line 9, in <module> from suiron.utils.img_serializer import deserialize_image File "/data/home/mer/my_tensorflow/suiron/suiron/suiron/utils/img_serializer.py", line 5, in <module> import cv2 ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory

    I spent a lot of time looking for a version of cv built against CUDA 8 but did not find anything.
    Any thoughts on the best way to resolve?

    opened by ProgramItUp 4
  • TypeError: variable_scope() got an unexpected keyword argument 'values'

    TypeError: variable_scope() got an unexpected keyword argument 'values'

    I have followed the installation instructions but am having a problem during training.

    When I run python ./train.py the line network = conv_2d(network, 8, [5, 3], activation='relu') throws the error TypeError: variable_scope() got an unexpected keyword argument 'values'

    Any thoughts what the problem could be? Thanks,

    python ./train.py
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
    I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
    [!] Loading dataset...
    [!] Finished loading dataset...
    Traceback (most recent call last):
      File "./train.py", line 29, in <module>
        servo_model = get_cnn_model(SETTINGS['servo_cnn_name'], SETTINGS['width'], SETTINGS['height'], SETTINGS['depth'])
      File "/data/home/user123/my_tensorflow/suiron/suiron/suiron/core/SuironML.py", line 20, in get_cnn_model
        network = conv_2d(network, 8, [5, 3], activation='relu')
      File "/usr/local/lib/python2.7/dist-packages/tflearn/layers/conv.py", line 72, in conv_2d
        with tf.variable_scope(scope, name, values=[incoming], reuse=reuse) as scope:
      File "/usr/lib/python2.7/contextlib.py", line 84, in helper
        return GeneratorContextManager(func(*args, **kwds))
    TypeError: variable_scope() got an unexpected keyword argument 'values'
    
    opened by ProgramItUp 3
Python Extreme Learning Machine (ELM) is a machine learning technique used for classification/regression tasks.

Python Extreme Learning Machine (ELM) Python Extreme Learning Machine (ELM) is a machine learning technique used for classification/regression tasks.

Augusto Almeida 84 Nov 25, 2022
Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques

Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.

Vowpal Wabbit 8.1k Dec 30, 2022
CD) in machine learning projectsImplementing continuous integration & delivery (CI/CD) in machine learning projects

CML with cloud compute This repository contains a sample project using CML with Terraform (via the cml-runner function) to launch an AWS EC2 instance

Iterative 19 Oct 3, 2022
Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

Microsoft 366 Jan 3, 2023
A data preprocessing package for time series data. Design for machine learning and deep learning.

A data preprocessing package for time series data. Design for machine learning and deep learning.

Allen Chiang 152 Jan 7, 2023
A mindmap summarising Machine Learning concepts, from Data Analysis to Deep Learning.

A mindmap summarising Machine Learning concepts, from Data Analysis to Deep Learning.

Daniel Formoso 5.7k Dec 30, 2022
A comprehensive repository containing 30+ notebooks on learning machine learning!

A comprehensive repository containing 30+ notebooks on learning machine learning!

Jean de Dieu Nyandwi 3.8k Jan 9, 2023
MIT-Machine Learning with Python–From Linear Models to Deep Learning

MIT-Machine Learning with Python–From Linear Models to Deep Learning | One of the 5 courses in MIT MicroMasters in Statistics & Data Science Welcome t

null 2 Aug 23, 2022
Implemented four supervised learning Machine Learning algorithms

Implemented four supervised learning Machine Learning algorithms from an algorithmic family called Classification and Regression Trees (CARTs), details see README_Report.

Teng (Elijah)  Xue 0 Jan 31, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Jan 8, 2023
cuML - RAPIDS Machine Learning Library

cuML - GPU Machine Learning Algorithms cuML is a suite of libraries that implement machine learning algorithms and mathematical primitives functions t

RAPIDS 3.1k Dec 28, 2022
mlpack: a scalable C++ machine learning library --

a fast, flexible machine learning library Home | Documentation | Doxygen | Community | Help | IRC Chat Download: current stable version (3.4.2) mlpack

mlpack 4.2k Jan 1, 2023
A toolkit for making real world machine learning and data analysis applications in C++

dlib C++ library Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real worl

Davis E. King 11.6k Jan 2, 2023
A library of extension and helper modules for Python's data analysis and machine learning libraries.

Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks. Sebastian Raschka 2014-2021 Links Doc

Sebastian Raschka 4.2k Dec 29, 2022
50% faster, 50% less RAM Machine Learning. Numba rewritten Sklearn. SVD, NNMF, PCA, LinearReg, RidgeReg, Randomized, Truncated SVD/PCA, CSR Matrices all 50+% faster

[Due to the time taken @ uni, work + hell breaking loose in my life, since things have calmed down a bit, will continue commiting!!!] [By the way, I'm

Daniel Han-Chen 1.4k Jan 1, 2023
Machine Learning toolbox for Humans

Reproducible Experiment Platform (REP) REP is ipython-based environment for conducting data-driven research in a consistent and reproducible way. Main

Yandex 663 Dec 31, 2022
Uplift modeling and causal inference with machine learning algorithms

Disclaimer This project is stable and being incubated for long-term support. It may contain new experimental code, for which APIs are subject to chang

Uber Open Source 3.7k Jan 7, 2023
A machine learning toolkit dedicated to time-series data

tslearn The machine learning toolkit for time series analysis in Python Section Description Installation Installing the dependencies and tslearn Getti

null 2.3k Jan 5, 2023
Automated Machine Learning with scikit-learn

auto-sklearn auto-sklearn is an automated machine learning toolkit and a drop-in replacement for a scikit-learn estimator. Find the documentation here

AutoML-Freiburg-Hannover 6.7k Jan 7, 2023