trainer: protocol for images