This repository contains python scripts to train a slip detection Temporal Convolution Network (TCN) using the data collected from the Takktile sensor kit. Details about this work can be found in this paper: Under Pressure: Learning to Detect Slip with Barometric Tactile Sensors.
Table of Content
The training scripts are all written in Python2, in order to ensure compatibility with ROS Kinetic. The authors use Keras
for building and training the TCN models.
-
Install TensorFlow 2.1.0 (CPU or GPU) by following the instructions here.
Keras
is now packaged as part of TensorFlow framework. This is last TensorFlow version that supports Python2. -
Email the author to request access to the Takktile training dataset.
- Clone this repository
-
cd <path to learning-slip-perception>
-
git submodule init && git submodule update
The main script takes a yaml configuration file as input, which provides values for all the data, network, and training parameters. The base config files are present in the configs directory.
- Modify the base config files to create a training experiment. Modify the
data_home
parameter and replace it with the path to your Takktile data folder. You can use theepochs
parameter to controls the number of epochs. -
replace the name with that of the config file you edited.
python2.7 main.py ./configs/<file name>.yaml
- A new folder will be created with in the models directory.
- Locate the model you would like to continue training. (A copy of the config file is saved with each model in the models directory)
- Modify the
epochs
parameter to indicate the number of additional epochs you would like to train. -
replace the name with that of the config file you edited. No new directory will be created.
python2.7 main.py ./logs/models/<model_name>/config.yaml
- You can use the bash script,
./train.sh
, to automate training experiments.
The tensorboard scalars are saves in the scalars directory.
tensorboard --logdir ./logs/scalars/<scaler_dir>
TODO