A nanowire diode with a built-in electron trap senses, denoises, and classifies images without separate processing hardware, mimicking the retina and opening a path to smarter edge computing.