Imagine2touch models
The trained weights behind the result tables of github.com/ayadabdalla/imagine2touch, the code of
A. Ayad, A. Röfer, N. Heppert and A. Valada, "Imagine2touch: Predictive Tactile Sensing for Robotic Manipulation using Efficient Low-Dimensional Signals", ViTac workshop, ICRA 2024. arXiv:2405.01192
The files
| Model | Files | Reads | Gives |
|---|---|---|---|
| Touch model | I2T_encoder_decoder_seed_0.ptto I2T_encoder_decoder_seed_4.pt(20 MB each) |
a 48 × 48 depth image of the surface the sensor is about to touch | the reading the sensor would give there |
| Shape classifier | shape_classifier_seed0.ptto shape_classifier_seed4.pt |
the reading of one press | which of five stamps was pressed: T, circle, angle, triangle, cross |
A reading is that of a ReSkin touch sensor: 15 values, the three components of the magnetic field at each of its five magnetometers.
How to read a file name: I2T_encoder_decoder is the Imagine2touch touch model, an encoder with two decoders, and
shape_classifier the classifier;
the seeds 0 to 4 are five trainings of the same model that differ only in their random start, which is
what the result tables average over.
The touch model
An encoder with two decoders. The encoder squeezes the image into five numbers, and each decoder reads those five numbers.
- The touch decoder is the one that is used: it gives the predicted signal.
- The image decoder rebuilds the input image and is used in training only. Having to rebuild the image from the same five numbers forces them to describe the surface, not just to fit the signal.
Training minimises the error of the predicted reading plus the error of the rebuilt image, on the touches of two primitives, flower and hexagon.
These weights differ from the paper's in one respect. The paper trained on the depth images the wrist camera took before each touch. These models are trained on depth images rendered from the objects' scans at the place the sensor stopped, the same kind of image the model is shown when it recognises an object in simulation. The network, the objects and the training recipe are the paper's. All layers are fully connected with ReLU between them.
The shape classifier
A small fully connected network, 15 → 500 → 10 → 5, trained on 181 presses of each stamp.
Use
pip install huggingface_hub
hf download abdallahaymanayad772/imagine2touch --include "*.pt" --local-dir results/benchmark/models
Put there, the repository's benchmark loads them and gives its tables exactly. To use one elsewhere:
from imagine2touch.method.models import TouchModel, ShapeClassifier
model = TouchModel.load("results/benchmark/models/I2T_encoder_decoder_seed_0.pt")
signal = model.predict(images) # images (n, 48, 48), signal (n, 15)
Results
The paper's two tables, with this repository's numbers beside the paper's. This repository's are means over the five seeds.
Table I, shape classification: share of test presses named correctly.
| T | circle | angle | triangle | cross | total | |
|---|---|---|---|---|---|---|
| This card's weights | 0.84 | 0.91 | 0.92 | 0.86 | 0.92 | 0.89 |
| Paper | 0.91 | 0.90 | 0.90 | 0.95 | 0.94 | 0.92 |
Table II, object recognition: a trial is one round of ten touches of one object. The models are trained on two primitives, flower and hexagon; every object below is unseen.
Unseen primitives: parallelogram, square and star.
| Method | Robot | Trials | Touches that vote for the touched object |
Trials that name it after ten touches |
|---|---|---|---|---|
| Imagine2touch, this card's weights |
simulated | 300 | 54% | 72% |
| Proprioception | simulated | 300 | 50% | 59% |
| Imagine2touch | real, in the paper | 3 | 50% | 100% |
| Proprioception | real, in the paper | 3 | 23% | 0% |
Unseen tools: a box cutter.
| Method | Robot | Trials | Touches that vote for the touched object |
Trials that name it after ten touches |
|---|---|---|---|---|
| Imagine2touch, this card's weights |
simulated | 100 | 76% | 87% |
| Proprioception | simulated | 100 | 79% | 78% |
| Imagine2touch | real, in the paper | 1 | 60% | 100% |
| Proprioception | real, in the paper | 1 | 100% | 100% |
The simulated robot replays the recorded touches, twenty trials per object with each of the five models. The paper's Table II gives 70% and 80% for its tools: the means of the cutter's trial and one on a hanger, which is not touched here.
Limits
On objects it was not trained on, the touch model's prediction error is above that of always predicting the mean signal: it does not give the exact values of a touch. It still recognises objects above chance, and the primitives better than proprioception does, because recognition only needs the prediction for the touched object to fit better than those for the others. So what a prediction carries is not the exact values of a touch but coarser information about it, for example where on the sensor the contact lies or the relative magnitudes at its taxels; we have not verified experimentally what that information is.
Citation
@inproceedings{ayad2024imagine2touch,
title = {Imagine2touch: Predictive Tactile Sensing for Robotic Manipulation using Efficient Low-Dimensional Signals},
author = {Ayad, Abdallah and R{\"o}fer, Adrian and Heppert, Nick and Valada, Abhinav},
booktitle = {ViTac Workshop, IEEE International Conference on Robotics and Automation (ICRA)},
year = {2024}
}
Licence: CC BY-NC 4.0. Free to use for research and other non-commercial purposes.
