Vertical matrix perovskite X-ray detector for effective multi-energy discrimination

Multi-energy X-ray detection is sought after for a wide range of applications including medical imaging, security checking and industrial flaw inspection. Perovskite X-ray detectors are superior in terms of high sensitivity and low detection limit, which lays a foundation for multi-energy discrimination. However, the extended capability of the perovskite detector for multi-energy X-ray detection is challenging and has never been reported. Herein we report the design of vertical matrix perovskite X-ray detectors for multi-energy detection, based on the attenuation behavior of X-ray within the detector and machine learning algorithm. This platform is independent of the complex X-ray source components that constrain the energy discrimination capability. We show that the incident X-ray spectra could be accurately reconstructed from the conversion matrix and measured photocurrent response. Moreover, the detector could produce a set of images containing the density-graded information under single exposure, and locate the concealed position for all low-, medium- and high-density substances. Our findings suggest a new generation of X-ray detectors with features of multi-energy discrimination, density differentiation, and contrast-enhanced imaging. The vertical matrix perovskite X-ray detectors for multi-energy detection is reported, providing a new generation of X-ray detectors with features of multi-energy discrimination, density differentiation and contrast-enhanced.


Introduction
X-ray detection is widely used in medical imaging, security checking, radioactivity detection, industrial flaw inspection, and so on [1][2][3][4][5] . In this field, a long-term research direction is to develop dual or multi-energy Xray detection for obtaining two or more sets of signals from high and low-energy X-ray [6][7][8] . This detection method is under intensive developments considering its great importance and superior difficulty. Such detectors are advantageous in distinguishing substances with different densities, enhancing imaging contrast between organic and inorganic items, as well as identifying softer matters (rubber, plastics and tissue). Furthermore, dual or multi-energy X-ray discrimination also enables the use of digital subtraction to extract images of different tissues at the same position, such as subtracting the bones to reveal the lungs on the chest [9][10][11] .
Currently, only dual-energy X-ray detection could be barely realized by altering the incident X-ray energy, i.e. exposing the object to X-ray sources twice with altered energy successively 7 . Under high-energy X-ray, the substances with high density, like metals and skeletons, could be detected, while under low-energy X-ray, the substances with both high density and low density (plastics and veins) could be imaged 12 . However, the major drawback is that the low-energy and high-energy images cannot perfectly overlap due to the temporal differences between the exposures, including cardiac and respiratory motion, as well as variation in contrast-agent concentration. Other drawbacks are that the radiation dose is inevitably increased during multiply X-ray exposures, and this method is hard to extend to multi-energy X-ray detection, due to the high requirement of rapid voltage switching of X-ray sources 11 .
To circumvent the above disadvantages, dual-layer detectors have been raised, where the top layer preferentially detects low-energy photons, and the bottom layer detects a filtered and therefore harder spectrum (high-energy photons) 11 . Nevertheless, only two layers still cannot achieve multi-energy X-ray detection, and the energy discrimination capability is rather low. We calculated the energy discrimination capability of the existing dual-layer detector and compared the performance with the quintuple-layer detector (see detailed discussion in Supporting Information, Tables S1 and S2). Additionally, dual-layer detectors always employ scintillators for indirect X-ray detection, which is limited in detection sensitivity and requires a high radiation dose for clear imaging 13 .
Recently lead halide perovskites are emerging as promising semiconductors for direct X-ray detection, with excellent properties of large X-ray stopping power, high sensitivity and low detection limit [14][15][16] . The X-ray detection sensitivity is on the order of 10 3 -10 5 μC Gy air −1 cm −2 13,17 . The detection limit is as low as tens of nGy air s −1 , which is equivalent to hundreds of X-ray photons per second 18 . Such high sensitivity and low detection limit indicate that perovskite X-ray detectors could respond toward low photon fluence, and lay a foundation for multienergy discrimination. By reducing the dose required for a single valid detected signal, perovskite detectors lessen the total dose required for multi-energy detection exponentially. However, as far as we are concerned, perovskite X-ray detectors with the capability of multi-energy X-ray discrimination have never been reported.
Herein we demonstrate, for the first time, the novel design of "vertical matrix" perovskite X-ray detectors for multi-energy detection. Different from the traditional plane detector, the term "vertical matrix" means that the detector array is aligned along the incident direction of X-ray rather than perpendicular to the incident direction. The principle is that X-ray photons with different energy have different attenuation depths within the vertical matrix, and low-energy photons deposit most of the energy in the shallow layers and high-energy photons in deeper layers. Thereby, the vertical matrix which consists of more-than-two-layers detector could restore the X-ray spectrum in detail. Experimentally, we indeed obtain the response conversion matrix of the vertical matrix detector with the aid of a machine learning algorithm. The conversion matrix is the key to the multi-energy discrimination and imaging process. For demonstration, we accurately derived the cut-off energy values for unknown X-ray sources. More importantly, the detector could produce a set of images containing the density-graded information under single exposure, and locate the concealed position for all low-, medium-and high-density substances. Taken together, our work theoretically and experimentally verifies that the novel design of vertical matrix perovskite detectors is promising for nextgeneration X-ray detection with features of multi-energy discrimination, density differentiation, and contrastenhanced imaging.

Results
Fundamentally, X-ray photons are attenuated in the detector following the exponential form, and the transmitted X-ray intensity (T) could be expressed as: where T 0 is the incident X-ray intensity, l is the interaction depth, and α is the linear attenuation coefficient. Basically, α(E) is proportional to Z 4 /E 3 when only considering the photoelectric effect, where Z is the average atomic number and E is the X-ray photon energy 19 . Thereby the low-energy photons within the wide X-ray spectrum exhibit high attenuation coefficient and deposit most of the energy in the shallow layer. In contrast, high-energy photons can penetrate deeper within the detector. Based on the distinguishing characteristics of low-energy and high-energy photons, the applicable energy range of the following analysis is not limited to the photoelectric effect, but also applies to Compton scattering, that is, from keV to MeV. Here we take advantage of this unique property of X-ray. Figure 1 shows the working principle. Along the incident X-ray path, we fabricate pairs of vertically-aligned electrodes on both sides of the crystal. As analyzed above, the response signals from the shallow layers are mainly from the low-energy X-ray photons, while those of the bottom layers are mainly from high-energy photons. For concise description, the layer sequence was labeled according to the electrode location from the left (the direction close to the X-ray source) to the right (the direction far away from the X-ray source), i.e. the uppermost or left layer is the 1st electrode and the nethermost or right layer is the m-th electrode for a total of m pairs of electrodes. One incident X-ray spectrum (S) can produce a series of response signals (R). The spectrum is divided into n segments as S n 1 ¼ ðs 1 ; s 2 ; ; s n Þ T based on the energy. If n is approaching infinity, s i is approximately monochromatic X-ray, i 2 f1; 2; ; ng. If n is a finite value, s i represents a segmented energy range of X-ray. The response matrix (R m×1 ) could be expressed as R m 1 ¼ ðr 1 ; r 2 ; ; r m Þ T , where r k is the response signal for the k-th pair of electrodes, k 2 f1; 2; ; mg. When ignoring the spacing between the neighboring electrodes, r k could be described as follows: where s i represents the intensity of X-ray photons with a given spectrum and α(E i ) is the linear attenuation coefficient of them, l j is the distance from the incident surface of the detector to the end of the j-th electrode, j 2 f1; 2; :::; mg, γ k describes the X-ray conversion efficiency, and ξ kj is the charge collection efficiency within the width of the j-th electrode towards the k-th electrode. The coefficient, ξ kj γ k , is decided by the bias voltage, carrier mobility-lifetime product and other factors of the detector. Thus, it is a fixed value for the certain detector under the given working state. It should be noted that for the charge collection efficiency term, ξ kj is a δ function, if we ignore the charge lateral diffusion, dispersion of the photoelectron cloud, re-absorption of k-edge fluorescence and the curved distribution of electric field lines. The value of ξ kj is 1 at k = j and 0 at k ≠ j. As discussed in Supporting Information, here we found that the crosstalk caused by interpixel charge diffusion, photoelectron cloud dispersion and re-absorption of k-edge fluorescence is negligible. We sample one continuous X-ray spectrum (S) and make it discretized into n points. Then we get a spectral matrix containing spectral distribution information, as S n 1 ¼ ðs 1 ; s 2 ; Á Á Á ; s n Þ T . The relationship between spectral matrix S n×1 and detection response matrix R m×1 is as follows: where C m×n is the conversion matrix, C m n ¼ ðc ki Þ m n , and the element c ki is written as follows, k 2 f1; 2; :::; mg, i 2 f1; 2; :::; ng: Upon using the above detector for X-ray energy discrimination, the response signals are detected as R m 1 ¼ C m n Á S n 1 . Due to the theorem of Matrix Operations, that only a square matrix has an inverse matrix and the invertible matrix must be a square matrix, the conversion matrices C m×n should be square matrices, i.e. n = m. In other words, the number of electrode pairs determines how many sampling points for the continuous X-ray spectrum. On this basis, we rewrite Eq. 3 as: where C m×m −1 is the inverse matrix of the conversion matrix of a certain vertical matrix detector. C m×m −1 is also unique for that detector. That means we can deduce the incident X-ray spectrum (S) in reverse by analyzing the response signals (R) of the detector.
Then we can use this detector for energy discrimination and multi-energy imaging applications. The key is to obtain the inverse matrix of the conversion matrix for the detector. Inspired by machine learning, we construct the data sets by using X-ray sources with known spectral . . Fig. 1 The schematic illustration of the working principle of multi-energy X-ray detection shapes and recording the electrode response signals of the vertical matrix detector. The inverse conversion matrix is the model of the process, and it is important to make the errors as small as possible by optimizing the model. (Here, the model is a variable and non-fixed function, which refers to the result of the machine learning algorithm.) Firstly, we let the model learn the spectral matrix and response matrix of the Training Datasets, in order to find the relationship between their eigenvectors, without needing to know the values of every physical parameter. The maximum value of the percentage difference between the spectral sampling values and the model calculated values is used as the Loss Function (the judgment standard), and the gradient descent method is used as the optimization algorithm. Then, we verify the effectiveness of the model in the Validation Datasets, adjust hyperparameters and get the optimized inverse conversion matrix.
We can change the driving voltages, the target anode and the attenuation sheets of the X-ray sources to vary Training Datasets and Validation Datasets. We demonstrate the concept by depositing five pairs of verticallyaligned electrodes onto one MAPbBr 3 perovskite single crystal (PSC). When the incident spectrum is S 5×5 , the response signal can be obtained on each electrode, and the column vector R 5×5 can be obtained after sampling. We can derive five segments of the incident X-ray spectrum according to the above analysis. The calculation matrix is as follows: where R 5×5 = (R 1 , R 2 , R 3 , R 4 , R 5 ) and S 5×5 = (S 1 , S 2 , S 3 , S 4 , S 5 ).
Here we chose MAPbBr 3 PSC mainly due to its cuboid shape and convenient fabrication process. The surfaces of the crystals were carefully polished to achieve a parallel and smooth surface (Fig. S1). The X-ray attenuation curve of MAPbBr 3 toward the X-ray energy range is shown in Fig. S2 20 . If the electrodes were fabricated with the equal thickness (or depth) and pitch size, there would be large fluctuations for the responses at electrodes with different numbers, since most of the energy would be deposited on the top layers of the detector (Fig. S3a). In order to avoid the large fluctuations and make small signals not to be submerged due to crosstalk, the electrode thickness was adjusted.
The electrode design of the vertical matrix detector involved in this article is developed for a specific energy range. We firstly supposed that the incident spectrum was a square spectrum from 30 to 70 keV, given that the driving voltage was at 70 kVp and the low-energy photons below 30 keV were blocked by the aluminum plate. This energy range is useful for applications like breast tomosynthesis and angiography. Each background color in Fig. 2a symbolizes the process of the intensity attenuation by 20%, until the intensity attenuates from 80% to 99% (purple background, without drawing the part whose thickness is >1 mm). The thickness required for the five-stage attenuation process by 20% of each energy intensity is shown in Fig. 2b. Here, the required attenuation thickness for the energy of 30, 40, 50, 60, and 70 keV is drawn as squares, and the calculated thickness values of other energy can be obtained in the entire spectral range. The lines in Fig. 2b connected by these series of values form the functions, f j (E), where f j are the distances required for the five-stage attenuation of photons with certain energy, and j represents the five stages from 1st to 5th, which is equal to the electrode number as above. Then, the integral average values are calculated as: where E min is the minimum photon energy as 30 keV and E max is the maximum photon energy as 70 keV. The results of each electrode thickness are shown in Table S3, representing that each electrode with such thickness will attenuate identical X-ray intensity under the square spectrum from 30 to 70 keV, i.e. each electrode will extract the similar amplitude of signals.
To fabricate the designed electrode patterns, we used a 1064 nm laser beam to etch the evaporated gold electrode patterns, as shown in Fig. 2c. A self-made glass parallel track was used to record the marking position, in order to ensure that the 1st electrode was close to the edge of the MAPbBr 3 PSC and the patterns on both sides were aligned. The drawing of the laser beam processing is shown in Fig. S4a. The fabrication parameters have been slightly adjusted to avoid the destruction of perovskite by laser. Figure S4b shows the optical photo of the fabricated electrode pattern. In the enlarged view in Fig. 2c, the photo of scanning electron microscope is shown, among which we can clearly see the strip electrodes from top to bottom. The lead-out parts on the side were designed with a large square shape for simplifying the contact with probe systems. The size of laser processing traces is 60 μm, and this is the size between neighboring electrodes. The photos of energy dispersion spectrum in Fig. S4 prove that the gold electrode pattern has been successfully made and strip electrodes are isolated well from each other. More information about the fabricated electrode pattern can be found in Table S3. By the way, we used the fullerene layer to passivate the crystal surface and promote electron extraction 21 . The device has lower dark current and less ion migration compared with that without surface passivation in Fig. S5. The structure and energy band of the PSC device are shown in Fig. 2d, and the detector has a rectification ratio of 25. For X-ray detection, the device was driven in the positive bias for lower dark current.
Then we measured the performance of the MAPbBr 3 PSC device according to the method shown in Fig. S6, in which the lead-out parts are covered by lead sheets to shield a part of the X-ray. Figure 3a shows the current response curve of the 1st electrode, which is exposed to the X-ray spectrum with the driving voltage of 50 kVp. The dark current is 13 nA with negligible baseline drift, and the response current is rapid and stable. The total dose rates are changed with the driving current in the range of 580 μGy air s −1 to 83 μGy air s −1 at equal intervals. Since in our design, the detector arrays are aligned along the incident direction of X-ray, and the conventional area sensitivity is not applicable to this kind of detector. Here we calculated the volume sensitivity of our detector. The volume sensitivity is 0.81 × 10 5 μC Gy air −1 cm −3 , which is close to previous works (2.76 × 10 5 μC Gy air −1 cm −3 for BA 2 MA 2 Pb 3 I 10 , 0.25 × 10 5 μC Gy air −1 cm −3 for MAPbI 3 ) 22-24 . The detection limit is measured as 0.82 μGy air s −1 . Figure 3b shows that the response current of the five pairs of electrodes is proportional to the radiation dose rates for the same incident X-ray spectrum. The whole vertical matrix detector exhibits excellent linear response, of which the linear fitting coefficients R 2 are 0.99911, 0.98981, 0.99295, 0.9925, and 0.99861 for the 1st to 5th electrode, respectively (Table S4). This good linear response to X-ray dose rate is extremely important for the multi-energy discrimination of unknown X-ray spectrum. We tested responses of the device under several different continuous multi-energy X-ray spectra via changing the driving voltage. The driving voltages were set at 35, 40, 50, 60, and 70 kVp, and the driving current of the X-ray tube was fixed at 100 μA. According to the principle of bremsstrahlung, the driving voltages affect the shapes of the spectra, especially the cut-off voltages 25 . The original response data can be found in Table S5. In Fig. 3c, it can be seen that the response current increases upon the driving voltages of the X-ray tube enhance. The five values of response current under each voltage fluctuate slightly, not exactly the same. It may be due to the slight difference between the actual electrode thickness and the designed thickness as Table S3. This makes X-ray photons deposited within the five segments slightly different. But the fluctuation is relatively small and does not affect the multienergy X-ray detection too much. As we know, the signal crosstalk in the detector is an unavoidable problem and adjacent pixel signals will obscure the effective information of small-signal electrodes 26,27 . Only considering the carrier diffusion factor in crosstalk, the diffusion charge satisfies, Q = eN[1 − exp(−VΔy 2 /4V th /l total 2 )], and the statistical mean square value of the carrier lateral diffusion distance is, Δy 2 = 2l total 2 (V th /V) 28 , where V th = k B T/e is the thermal voltage, V is bias voltage, Δy describes the location, l total is the thickness of the detector as described above and N is the number of photogenerated carriers. The bigger Δy and N, the greater the proportion of crosstalk of the signals from the reference electrode to surrounding electrodes. Therefore, the response signal of each electrode should be similar, instead of designing equal thickness electrodes as Fig. S3b, which avoids large crosstalk caused by the fluctuation and improves the X-ray energy discrimination capability. In Fig.  3d, we list the response signals of different electrodes towards different driving voltages of the X-ray tube. We define the proportion of one electrode to the whole spectrum via dividing the response signal of the given electrode by the summed signal of the five electrodes. The proportion of the response current is used to weigh how much energy is deposited within one electrode thickness. It should be noted that for the 1st and 2nd electrodes, the response proportion decreased as the driving voltage increased, which is due to that lower energy X-ray deposits its energy more in the shallow layers.
As mentioned above, the key is to calculate the inverse matrix of the conversion matrix for the detector. Here we use the data in Fig. 3c and get the response matrix of the MAPbBr 3 detector as R 5   As a demonstration, we simply obtain the conversion matrix through matrix operations. The solution of C 5×5 is: The inverse matrix of the conversion matrix is, Then we could use the above-derived matrix to discriminate the unknown X-ray spectra. The Validation Datasets were obtained by setting the driving voltages of the X-ray tube at 45, 55, and 65 kVp and collecting the response matrix R 5×3 at the same time. Then the spectral matrix S 5×3 could be reconstructed by pre-multiplying the response matrix by the inverse matrix of the C 5×5 , as Eq. 6: The elements of the reconstructed spectral matrix, as sampling points, are shown in Fig. 4a. They not only have clear cut-off edges that match the actual driving voltages, but also have small gaps with the simulated X-ray spectral intensities represented by the black line, that is, the Loss Function is 10.41% (45 kVp), 2.77% (55 kVp), and 2.97% (65 kVp) respectively. This good match verifies the effectiveness of the conversion matrix. It could be expected that more pairs of electrodes could provide more information about the continuous multi-energy spectra.
At last, we used the detector for multi-energy X-ray imaging applications. In conventional dual-energy X-ray imaging, two different X-ray sources are used, or the driving voltage of the same tube is switched, in order to provide two different X-ray spectra. Two sets of images are obtained under two times exposure, and the image containing only low-density tissue and the image containing only high-density tissue can be obtained through subtraction algorithms 11 . Here, we detected an artificial sample to further verify the feasibility of our novel detector for multi-energy X-ray imaging. The whole detection is under single exposure, as shown in Fig. 4b. In the schematic diagram Fig. S8, black, gray, and white colors represent the high-density, medium-density and low-density materials of the artificial sample, corresponding to the three most important components in the human body, skeletal (wet wt%~10%) 29 , blood and muscle (about 1.0 g cm −3 ) 30 , and fat (wt% 10% to 20% for normal men, 0.9 g cm −3 ) 31 . During the production of the 10-mm-thickness artificial sample, we proportionally used CaCO 3 (2.711 g cm −3 ), PDMS (about 1.0 g cm −3 at 20°C), and paraffin (0.820 g cm −3 ) with similar densities to replace the above three substances respectively, in order to simulate the imaging process of human bodies. In addition, a little carbon black was added, so that the spatial distribution and the stacking situation of the sample inside could not be observed from outside, as illustrated in Fig. S8b. More information about the artificial sample and human tissues is shown in Supporting Information.
The images in Fig. 4c, d show the original dual-energy images from the 2nd and 5th electrodes for the artificial sample, respectively. The size of the imaged object is 5.5 × 5.5 cm 2 and the pixel size is 0.85 mm. Here we achieved the imaging by recording the signals from the five pixels along the incident direction of X-ray, and the imaging object was driven by X-Y motion stage. The images from 64 × 64 pixels arrays have been normalized to 1024 gray values, and they are not optimized by any algorithms. The image detected by the 2nd electrode contains more low-energy X-ray photons, while that detected by the 5th electrode contains more high-energy X-ray photons. Images in Fig. S9 are results of differentdensity-tissue subtraction and are obtained by various subtraction algorithms. Specifically, we take the logarithm of the gray values and then use a linear subtraction algorithm with the parameter к H /к L of 1.5, to obtain the image Fig. S9a, which emphasizes hard-density tissues. Then, we redraw it into a pseudocolor image as Fig. 4e.
We further use high-order non-linear algorithms to optimize the effects of subtraction and obtain the image of objects as Fig. 4f. The orange letter 'H' in it does not overlap with other unconcerned tissues and it successfully demonstrates the result of soft-tissue subtraction. More information about the mathematical principles and parameter selection of subtraction processing can be found in the Supporting Information. Overall, the vertical matrix detector can effectively achieve multi-energy X-ray imaging under single exposure, not limited to dual X-ray sources.

Discussion
This work raises a novel strategy of combining the vertical matrix perovskite detector with machine learning algorithm for multi-energy X-ray discrimination. The fabricated detector array based on MAPbBr 3 single crystal exhibits good linear response and high sensitivity. The conversion matrix of the detector could be obtained by multiple training processes. We experimentally verified the effectiveness of above detectors in unknown X-ray spectrum reconstruction, and the cut-off edges accurately match with the actual spectrum. More importantly, we achieve multi-energy X-ray imaging under single exposure, which has not been achieved in traditional detectors. With the aid of subtraction method, we could clearly distinguish objects with low and high densities. We expect a similar effect could be achieved for other radiation detection semiconductors like CdZnTe. In sum, this work shifts the paradigm of multi-energy X-ray detection and brings encouraging opportunities for next-generation lowcost X-ray spectrometer and energy-resolved X-ray imaging.

Materials
Anhydrous dimethylformamide (DMF) and absolute ethanol (≥99.7%) were obtained from Sinopharm. CaCO 3 (99%, C111980) and Paraffin with ceresin (CAS 8002-72-2) were purchased from Aladdin. CH 3 NH 3 Br (MABr, 99.9%), PbBr 2 (99.999%), and C 60 (99.9%) were purchased from Advanced Election Technology Co. Ltd. Polydimethylsiloxane (PDMS) was obtained from Sigma-Aldrich. All chemicals were used without further purification.  Fig. 4 The applications of the multi-energy X-ray detector. a The reconstructed X-ray spectra obtained from the response signals of the detector, and the simulated X-ray spectra by Monte Carlo, when the driving voltages of the X-ray tube are 45, 55, 65 kVp. b Schematic diagram of multi-energy X-ray imaging. The X-ray energy from low to high is represented by the color from red to purple. The dark-blue lines represent high-density substance, yellow-green rectangles represent medium-density substance and orange balls represent low-density substance. c The image of our artificial sample from 2nd electrode. d The image from 5th electrode. The inset is the optical photo of the sample. e The subtracted pseudocolor image for high-density substance CaCO 3 tablet. f The subtracted image obtained for the low-density paraffin 'H' letter. The pixel size in c-f is 0.85 mm

Crystal growth procedure
We grew the MAPbBr 3 single crystal by the inverse temperature crystallization (ITC) method. MABr and PbBr 2 with a molar ratio of 1.2:1 were dissolved into the DMF solution at a concentration of 1 mol L −1 . The precursor solution was poured into a Teflon cup. Then, a seed crystal was added, and the Telflon cup was sealed with tin foil. The cup was placed in an oven. The solution was kept at 70°C for 10 h. The obtained crystal has a size of 5 mm × 5 mm × 2 mm.

Device fabrication
To obtain parallel surfaces, one face of the crystal was fixed onto the sample holder by paraffin wax, and then we polished the crystal by carefully controlling the holder. The crystal was polished with sandpaper and polishing pads. The final thickness is~1 mm. 60-nm-thick Au electrodes were evaporated on one side, and the opposite side was thermally evaporated with 10-nm C 60 and 80-nm Ag. The patterned electrodes were prepared by laser marking (light source: semiconductor laser, JPT YDFLP-20-LP1 + -S). The average power was 20 W, the pulse width was 200 ns, and the center wavelength was 1064 nm. During laser marking, the processing speed was 200 mm s −1 , the laser power was 5% and the frequency was 30 kHz. Here we used a self-made glass parallel track with scale to guarantee the alignment.

Detector performance measurement
We used Keithley 6517B Source Meter to apply bias voltages and record the response current. For X-ray detection performance, Amptek Mini-X2 tube (Newton Scientific M237, Au target) was used as the X-ray source. Detailed parameters can be seen in Table S4. The dose rate had been calibrated with the ion chamber dosimeter (Magic Max from IBA Dosimetry). All measurement about X-ray detection was conducted in a dark lead box to minimize interference from ambient light and noise response.

Monte Carlo simulation
pyPENELOPE was used for Monte Carlo simulation to obtain the X-ray spectrum under given driving voltages of X-ray tubes 32 . During simulation, the parameters, including electron beam energy, anode target, inclination angle, and filtering material, should be provided as Table S6.
Preparation of the artificial sample for multi-energy X-ray imaging The main inorganic component in bone is CaCO 3 (2.711 g cm −3 ) and Ca 3 (PO 4 ) 2 (3.140 g cm −3 ). The density of muscle is about 1.060 g cm −3 . The density of body fat is about 0.900 g cm −3 . Here we used CaCO 3 , PDMS (1.0 g cm −3 at 20°C), and paraffin (0.820 g cm −3 ) to mimic bones, muscles and body fat, respectively. According to the density from high to low, they are shown as black, gray and white in the Fig. S8. The CaCO 3 tablet has a diameter of 13 mm. The large block of paraffin was fabricated into the shape of the letter 'H' by a wire cutting machine. We prepared 30 g PDMS solution with a mass ratio of prepolymer and curing agent of 10:1, and mixed 5 g carbon black powder. The carbon black was used to obscure views, so that the spatial distribution and the stacking situation of the artificial sample inside could not be observed from outside. The CaCO 3 tablet and paraffin block were placed in a container, in which the carbon-PDMS mixture was poured. Finally, we put the container on the hot table at 80°C for 1 h to make the mixture cured and got the black artificial sample with a size of 55 mm × 55 mm × 10 mm.