X-ray microscopy is a non-destructive technique used to create high-resolution 3D images of insect structures through the use of x-rays. This study evaluates the efficiency of soft x-ray imaging in detecting infestations in wheat kernels by various insect species, achieving over 96% accuracy in identifying different stages of pests. The findings suggest that soft x-ray methods can effectively identify pest infestations in grain samples more accurately than traditional visual inspection techniques.