  Terahertz waves offer numerous advantages for the nondestructive detection of
hidden objects/defects in materials, as they can penetrate through most
optically-opaque materials. However, existing terahertz inspection systems are
restricted in their throughput and accuracy (especially for detecting small
features) due to their limited speed and resolution. Furthermore, machine
vision-based continuous sensing systems that use large-pixel-count imaging are
generally bottlenecked due to their digital storage, data transmission and
image processing requirements. Here, we report a diffractive processor that
rapidly detects hidden defects/objects within a target sample using a
single-pixel spectroscopic terahertz detector, without scanning the sample or
forming/processing its image. This terahertz processor consists of passive
diffractive layers that are optimized using deep learning to modify the
spectrum of the terahertz radiation according to the absence/presence of hidden
structures or defects. After its fabrication, the resulting diffractive
processor all-optically probes the structural information of the sample volume
and outputs a spectrum that directly indicates the presence or absence of
hidden structures, not visible from outside. As a proof-of-concept, we trained
a diffractive terahertz processor to sense hidden defects (including
subwavelength features) inside test samples, and evaluated its performance by
analyzing the detection sensitivity as a function of the size and position of
the unknown defects. We validated its feasibility using a single-pixel
terahertz time-domain spectroscopy setup and 3D-printed diffractive layers,
successfully detecting hidden defects using pulsed terahertz illumination. This
technique will be valuable for various applications, e.g., security screening,
biomedical sensing, quality control, anti-counterfeiting measures and cultural
heritage protection.
