Susana Ramos-Terróna,
Gustavo de Miguela,
Dietmar Leinenbc,
Jorge Munillad and
Pablo Romero-Gómez*bc
aDepartamento de Química Física y Termodinámica Aplicada, Instituto Químico para la Energía y el Medioambiente (IQUEMA), Universidad de Córdoba, Campus de Rabanales, Edificio Marie Curie, E-14071 Córdoba, Spain
bDepartamento de Física Aplicada I, Universidad de Málaga, 29071 Málaga, Spain. E-mail: prg@uma.es
cInstituto Universitario de Materiales y Nanotecnología, IMANA, University of Malaga, Campus de Teatinos, 29071, Málaga, Spain
dDepartamento de Telecomunicaciones, Universidad de Málaga, Málaga, Spain
First published on 4th June 2025
Metal halide perovskite thin films are a demand in many technological areas since they fulfill the requirements expected in different applications, including solar cells and LEDs. In this article, we demonstrate for the first time that perovskite thin films have the potential to be incorporated in products as an anticounterfeit solution in self-identification methods due to their ability to generate images on its surface with motifs at the microscale range. The images can be recorded using an optical microscope with a camera and can be recognized automatically using a convolutional neural network. The surface pattern of the thin films can be designed by modifying the perovskite composition, structure, and surface strain making falsification difficult to reproduce and mimic. To this end, perovskite thin films have been characterized using X-ray diffraction, UV-Vis spectroscopy and optical microscopy. We report a batch of 5 types of CsxFA1−xPbI3−xBrx perovskite thin films obtained by modifying the experimental conditions that exhibit recognized patterns with accuracy detection of 94.2%.
Digital authentication systems with integrated circuits and blockchain-based electronic commerce are aligned with robust security frameworks used globally. However, with an estimate of more than 50 billion connected IoT devices in the market by 2030, the digital and physical worlds have become tightly integrated.11 In modern society where activities such as transportation, commerce, and the use of goods, food, and medicine are widespread, the risk of cyber-attacks is substantial.12 Consequently, alongside cybersecurity measures, physical identification has emerged as a vital anti-counterfeiting technology for goods that are distributed, traded, and consumed.
Currently, nanomaterials have been claimed as an alternative to traditional physical identification solutions that can be easily implemented in goods.13–20 Zhang et al. created diamond microparticles with SiV centers as advanced, stable, and dynamic anti-counterfeiting nanomaterials with high-capacity encoding.21 Fukuoka et al. generated invisible stealth nanobeacons, which can be used as aqueous-soluble ink for steganographic prints. These nanobeacons provide strong SERS signals that are fingerprint-like and free from pigment interference, are easily customizable for specific applications, and offer a unique technology for secure authentication and watermarking without requiring time-consuming or costly synthesis processes.22 Li et al. proposed a crypto-display which functions as both a conventional meta-hologram under single-wavelength coherent light and a reflective display under white light.23 This display uses double dielectric nanoantennas with distinct reflection spectra, allowing independent control of both modes. Under white light, it appears as a normal reflective display, but under coherent light, it reveals encrypted holographic information, making it suitable for security applications. Castaing et al. created an optical engineering of persistent luminescent nanomaterials.24 These nanotechnologies claim the creation of complex effects that are impossible to reproduce but still the technologies have the lack of not having developed a simple and objective recognition system.
Herein, we report for the first time on anticounterfeit image recognition based on surface structures formed on metal halide perovskite (MHP) thin films which can be produced by simple wet chemistry methods. Different surface patterns can be created modifying the surface strain during the material growth. The surface image is captured at the microscale by an optical microscope with a 20× objective. The images were classified using a convolutional neural network (CNN) based on deep learning architecture with supervised training.
Perovskite films were deposited using the antisolvent method. Cs0.17FA0.83 and Cs0.40FA0.60 perovskites were prepared from a stoichiometric solution containing CsI, FAI, PbI2, and PbBr2 in a 4:
1 mixture of DMF/DMSO. The solution was filtered through a 0.22 μm PTFE filter before spin coating. Two spin-coating protocols were followed: (1) 500 rpm for 12 seconds, followed by 3000 rpm for 30 seconds, or (2) 250 rpm for 12 seconds, followed by 1500 rpm for 20 seconds. During spin coating, chlorobenzene was dispensed 5 seconds before the end of the process to promote perovskite crystallization via the antisolvent effect. The films were subsequently annealed on a hot plate at 50 °C for 1 minute, followed by 100 °C for 30 minutes. Perovskite deposition was carried out either under ambient conditions or in an inert atmosphere (inside a glovebox).
UV-Vis measurements were carried out at room temperature (approximately 25 °C) using a CARY100 UV-Vis spectrometer. The measurement range spanned from 400 to 900 nm in all cases. Typical thickness of the samples used for optical characterization was around 450 nm. The absorbance spectra have been calculated as log10(1/T) where T is the transmission of thin films.
The images of thin film surfaces have been collected using a Nikon e800 optical microscope with a 20× objective and a digital camera (Nikon DXM1200).
0 ≤ H ≤ 8 bits, |
After preprocessing, k-fold validation with k = 10 has been employed to ensure robust results. The dataset is divided into 10 disjoint groups, or folds, of samples. For each fold, the selected samples are used for testing, and the remaining samples are used for training, ensuring that each sample is used for testing exactly once. The final estimated performance is computed as the average of the results obtained across the different folds. Note that this evaluation method may underestimate the capabilities of the system, which may achieve better results with more training data by using higher values of k. However, increasing k also leads to a higher computational load, so the value k = 10 is used as a good compromise between reliable performance estimation and computational efficiency. This division is also stratified because, as shown in Fig. 2, there is a slight imbalance in the number of images across classes. For each fold, after separating the dataset into training and testing subsets, the images are further segmented into one hundred non-overlapping patches of 176 × 176 pixels. This approach increases the number of trainings samples and adjusts the input size to align with the dimensions commonly used in most classification architectures. It is important to note that this patch division is methodologically performed after the training/testing split to ensure that patches from the same image are not used simultaneously both training and testing to avoid any possibility of ‘double-dipping’. For training, data augmentation techniques, with vertical and horizontal flipping of the images across different batches, are implemented to enhance the model's generalization capabilities. As a result, the same patch may be used differently in different epochs, enhancing the robustness of the training process. Fig. 3 sketches the transformation of the images.
Three different CNN architectures have been tested to classify the patches. CNN architectures are employed due to their ability to capture spatial hierarchies in data through convolution operations.25 Concretely, we have used the CNNs called EfficientNet developed by Google AI,26 Lenet,27 and Resnet.28 Lenet was trained completely (400k trainable parameters, with stochastic gradient descent method with learning rate 0.01 and momentum 0.9) and used as baseline, while transfer learning was employed for Resnet (77k trainable parameters, with Adam optimizer with learning rate 0.001), and fine-tunning for EfficientNet (4M tunable parameters, with Adam optimizer with learning rate 0.001). The three CNN architectures were modified to adapt their input and output layers to the patch size (176 × 176) and the number of classes (5), respectively. Additionally, the fully connected part of each network was altered so that an intermediate fully connected layer with 50 neurons precedes the final layer. This layer includes a dropout regularization layer with a factor of 0.2 and a ReLU activation layer.
For the prediction of an image's class, the outputs of these CNNs for each patch forming the image are eventually combined using a majority vote procedure. Thus, as shown in Fig. 1, this process yields two different, albeit related, types of evaluation results: one for patch classification and another for image classification.
![]() | ||
Fig. 4 X-ray diffraction (XRD) patterns of the CsxFA1−xPb(Br0.17I0.83)3 MHPs films fabricated at different experimental conditions. |
Sample | Composition | Spin coating two- steps | Glovebox | Perovskite type 2D or 3D | Image entropy |
---|---|---|---|---|---|
1 | Cs0.17FA0.83Pb(Br0.17I0.83)3 | 500 rpm/12 s | Yes | 3D | 4.12 |
3000 rpm/30 s | |||||
2 | Cs0.17FA0.83Pb(Br0.17I0.83)3 | 250 rpm/12 s | Yes | 3D | 4.20 |
1500 rpm/30 s | |||||
3 | Cs0.40FA0.60Pb(Br0.17I0.83)3 | 500 rpm/12 s | Yes | 3D | 4.31 |
3000 rpm/30 s | |||||
4 | Cs0.40FA0.60Pb(Br0.17I0.83)3 | 250 rpm/12 s | Yes | 3D | 4.01 |
1500 rpm/30 s | |||||
5 | Cs0.40FA0.60Pb(Br0.17I0.83)3 | 250 rpm/12 s | No | 2D | 4.54 |
1500 rpm/30 s |
The optical properties of the MHP films are investigated by using UV-Vis absorption spectroscopy. Fig. 5 shows the absorption spectra for all films in the entire visible and near infrared region. In all films, the spectra display a broad absorption in the investigated region, as expected in MHPs. The absorption onset appears around 790 nm and 770 nm for the experimental conditions 1–2 and 3–4, respectively. The observed shift in the optical bandgap (Eb) can be directly correlated with variations in the A-site cation ratio. Cs+ incorporation into the FA-based lattice leads to structural distortions that influence the Pb–I/Br bond angles and lengths, thereby modulating the electronic band structure. Such composition-dependent bandgap engineering is a well-documented chemical strategy to tailor the optical response of halide perovskites.35 In the case of the film prepared with the experimental conditions 5, the presence of weak absorption bands around 515 nm, 565 nm and 600 nm clearly relates to the formation of low dimensional phases of the MHPs.
![]() | ||
Fig. 5 UV-Vis absorption spectra of the CsxFA1−xPb(Br0.17I0.83)3 MHP films at different experimental conditions. |
In summary, the formation of 3D MHP films has been proven at the experimental conditions 1–4 with minor changes in the optical properties due to the different FA:
Cs ratio. The crystalline structure is slightly modified due to distortions in the network introduced by the different experimental conditions.
Fig. 6 presents the optical microscopy images of the MHP thin film, illustrating various morphologies arising from the fabrication conditions outlined in Table 1. Fig. 6(1) displays a relatively uniform texture with fine surface grains, while Fig. 6(2)–(4) reveal increasing heterogeneity, suggesting compositional or structural differences. Previous studies have demonstrated that the evolution of film stress during formation plays a significant role in determining surface topography.36 Factors contributing to film stress include solvent removal, film shrinkage, phase transitions accompanied by density changes, and mismatches between the thermal expansion coefficients (CTE) of the substrate and film during annealing. Also, Janssen et al.37 and previous studies38 demonstrate the direct relation between the film stress and film strain measured by XRD. In our study, samples from 1 to 4 show a progressive increase in strain that can be correlated with the increase of surface motifs observed qualitatively on surface images. Thus, the change in the spin-coating rate and the variation in the ratio of the A-cations appears to control the morphology of the surface, although a clear correlation between all factors is beyond the scope of this work.
![]() | ||
Fig. 6 Top surface images of the CsxFA1−xPb(Br0.17I0.83)3 MHP films captured using an optical microscope with a 20× objective lens. The scale bar in the image indicates a distance of 50 μm. The labelling numbers correspond to the diferent experimental conditions described in Table 1. |
From a chemical standpoint, the evolution of surface morphology reflects the complex interplay between ionic composition, crystallization kinetics, and interfacial strain. Changes in precursor stoichiometry alter the nucleation and growth dynamics, impacting grain size, orientation, and surface energy—factors that ultimately define the microscale texture captured in the images.
The entropy of each grayscale image was calculated individually, and the average entropy value of each class is summarized in Table 1. Across the image classes, these average entropy values range from 4.0 to 4.5. This moderate entropy level suggests that the images avoid extremes: they are neither overly simplistic, where content is easy to recognize due to low variation, nor overly chaotic, where randomness or noise obscures meaningful structures. Thus, this range indicates a balance between regions that are relatively uniform and areas with more complex textures, pointing to an adequate level of information content within the images. Images with entropy values within this range often contain patterns or structures that may not be immediately apparent to the human eye, as shown in the example of patch segmentation in Fig. 3. Thus, some portions of the images may appear featureless or uniform, while others reveal intricate details or subtle, hidden patterns.
As explained in the previous section, CNNs produce classification results for individual patches, while the classification results for entire images are determined by applying a majority vote to the patch-level results for each image. Overall classification accuracies for patches were 76%, 77% and 90% for Lenet, Resnet and EfficientNet, respectively. Table 2 summarizes the main results for these classifications providing evaluation metrics for the training patch datasets and the testing patch datasets. This is an indicator that the models are performing in a very balanced and consistent manner across the different evaluation aspects. There is no significant difference between the results for the training, and testing datasets, and also the evolution of these results across different epochs (see Fig. 7) does not appear to indicate overfitting. Finally, Table 3 collects the results for image classification after applying the majority vote. In particular, the classification accuracies increase up to 84%, 91% and 94% for Lenet, Resnet and EfficienNet, respectively. These increases are, however, lower than those expected for a majority vote if the output voters were uncorrelated. This, justifying the process followed in validation, shows a clear correlation between classifications belonging to the same image. Therefore, if a patch of an image is misclassified, the probability that other patches from the same image are also misclassified—and likely to the same incorrect class—is much higher.
Training dataset | Testing dataset | |||||||
---|---|---|---|---|---|---|---|---|
CNN | Accuracy | Precision | Recall | F1-Sc | Accuracy | Precision | Recall | F1-Sc |
Lenet | 0.9 | 0.89 | 0.89 | 0.89 | 0.76 | 0.76 | 0.8 | 0.77 |
Resnet | 0.88 | 0.87 | 0.86 | 0.86 | 0.77 | 0.81 | 0.82 | 0.80 |
EfficienctNet | 0.94 | 0.94 | 0.94 | 0.94 | 0.90 | 0.90 | 0.90 | 0.90 |
Training dataset | Testing dataset | |||||||
---|---|---|---|---|---|---|---|---|
CNN | Accuracy | Precision | Recall | F1-Sc | Accuracy | Precision | Recall | F1-Sc |
Lenet | 0.94 | 0.93 | 0.93 | 0.93 | 0.84 | 0.85 | 0.89 | 0.86 |
Resnet | 0.97 | 0.97 | 0.96 | 0.97 | 0.91 | 0.93 | 0.94 | 0.92 |
EfficienctNet | 0.98 | 0.98 | 0.98 | 0.98 | 0.94 | 0.94 | 0.94 | 0.94 |
EfficientNet outperforms the other two architectures. For this, Fig. 8 provides confusion matrices for the image training dataset and testing dataset. It is interesting to note that class 4 is involved in all but one misclassification, where an image of class 3 was incorrectly classified as class 1. These results may indicate that an issue with the reproducibility of some of the samples in this class may have occurred during their fabrication.
This journal is © The Royal Society of Chemistry 2025 |