Train your machine learning model for collision detection with an accelerometer sensor data and TensorFlow.
The current model is kinda overfitted due to lack of diverse datasets.
So it would be better for you to provide your own collected data from sensor.
The data should reflect the real conditions where your sensor is used.
For example, data sets from mobile robots, robotic manipulators or flying vehicles may differ.
The point of this training script is to generate relevant model.
Prepare your environment:
pip install -r requirements.txt
All you have to do is execute this bash script:
./makemodel.sh
This script guides you step by step through the training process.
The data is designed to mimic the possible orientation of a multi-rotor vehicle during flight, changes in flight direction and collision with an obstacle. Example of test data generated looks as below.
The data provided is preprocessed (normalised), so it is not necessary to provide it in a specific unit format.
For current neural network settings you need to provide 500 samples for each dataset.
It is determined for one second model execution time (in future usage) and 2 ms sampled dataset.
Data should be provided in csv file (with "," delimiter). One row equals one dataset. One column equals one sample.
For output data (y_train, y_test) just int value every line, where collision equals 1, otherwise it is 0.
In evaluation process, script shows you 5 worst learning cases for this dataset with their errors and indexes.
The script helps to host the model in a Docker container.
A sample request to this service is written in the file request.py.
Response from a service:
{'predictions': [[0.999998629]]}
where the actual value was 1.0.
Collision detection AI is released under the CC BY-NC-ND 4.0 license.
Sebastian Brzustowicz <Se.Brzustowicz@gmail.com>