The invention provides a pixel-level spatial resolution multi-energy X-
ray material identification method and
system, which is combined with a graph neural network to realize pixel-level material identification, and comprises the following steps: acquiring multi-energy X-
ray image data of a sample; selecting a pixel region as an analysis unit, and constructing an energy-space diagram, including defining each pixel point of each
energy interval as a node of the energy-space diagram, and establishing a
first class of edges connecting adjacent nodes on the space and a second class of edges connecting nodes of the same pixel point space coordinate but in different energy intervals; and inputting the energy-space graph into a pre-trained graph neural
network model so as to generate feature representation capable of representing material attributes of the pixel region through multiple rounds of
message passing and aggregation, and outputting material categories through a classifier. According to the method, the spatial information and the
energy spectrum information are deeply fused, so that the accuracy, the robustness and the data utilization efficiency of classification of low-atomic-number and near-density materials are remarkably improved, and meanwhile, the dependence on an accurate
physical model is reduced.