Tabletop scenes and instructions#
A one-dimensional tabletop and a tiny instruction language for the one-motor VLA.
Classes
One episode: an image strip, an instruction, and the ground truth behind them. |
Functions
Draw a scene with 2-3 objects, an instruction, and the intended target. |
|
The person's answer to "which one?": a word that singles out the intended target. |
- class Scene(image, text, cells, colors, valid, target, words)[source]#
Bases:
objectOne episode: an image strip, an instruction, and the ground truth behind them.
- Variables:
image (
(n_cells,3) array) – Noisy one-hot colour strip; each object occupies one cell.text (
(len(WORDS),) array) – Multi-hot bag of instruction words.colors (cells,) – Cell index and colour index of every object.
valid (
listofint) – Cells the instruction is true of. More than one means the instruction is ambiguous.target (
int) – The cell the person actually means (drawn uniformly fromvalid).
- Parameters:
- sample_scene(rng, n_cells=16, pixel_noise=0.1, kinds=('color', 'leftmost', 'rightmost', 'block'))[source]#
Draw a scene with 2-3 objects, an instruction, and the intended target.
Scenes in which a middle object could not be named afterwards (same colour as another object, neither extreme) are redrawn, so a clarifying answer always exists.