A mobile intelligent terminal-based crop spectrum reconstruction system and implementation method

By converting the MST++ model to TFLite format and performing static and 2D reshaping, combined with GPU acceleration, a crop spectral reconstruction system based on a mobile smart terminal was realized. This solved the problems of inconvenience in mobility and data processing in existing technologies, and achieved real-time spectral reconstruction and efficient data management.

CN122492873APending Publication Date: 2026-07-31HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INST OF TECH
Filing Date
2026-05-06
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing spectral reconstruction technologies rely on desktop hardware, making it impossible to achieve mobile and portable operation. They are difficult to meet the real-time spectral reconstruction needs of outdoor and field scenarios, and suffer from poor model deployment adaptability, incompatible data layout, inconvenient data management, and low functional integration.

Method used

A multi-step model conversion process is used to convert the MST++ model to TFLite format, perform static and 2D reshaping, adapt it to mobile GPUs, and integrate modules for image acquisition, model inference, data visualization, file storage and sharing. GPUs are used to accelerate inference and optimize file storage format.

Benefits of technology

It enables real-time reconstruction of RGB to 31-channel spectra on ordinary Android phones, solves the problems of model compatibility and excessively long data sequences, improves inference efficiency, forms a complete closed loop for spectral data processing, and enhances user experience and storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492873A_ABST
    Figure CN122492873A_ABST
Patent Text Reader

Abstract

This invention discloses a crop spectral reconstruction system based on a mobile smart terminal, comprising an image acquisition module that supports real-time capture of RGB images via a mobile phone camera and also supports selecting images from the phone's photo album as input; a model inference module that integrates an optimized TFLite format MST++ model, receives the acquired RGB three-channel images, accelerates inference via GPU, and outputs 31-channel spectral data, achieving rapid reconstruction from RGB to hyperspectral data; a data visualization module that supports the visualization of the 14th channel of the hyperspectral data; a file storage module that saves the hyperspectral data obtained from model inference as a BIN file; and a file storage and sharing module that supports local storage of BIN format spectral files. This invention enables real-time reconstruction of RGB to 31-channel spectra using a regular Android phone, without relying on high-performance desktop hardware, realizing the mobile and portable application of spectral reconstruction technology and expanding its application scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer vision, mobile deployment of deep learning models and agricultural information technology, and specifically relates to a crop spectral reconstruction system based on a mobile smart terminal. Background Technology

[0002] Spectral reconstruction technology can convert ordinary RGB images into high-dimensional spectral data, which can be used in agriculture to monitor indicators such as crop nutrient composition, pest and disease severity, and water conditions, showing broad application prospects. However, current spectral reconstruction technologies mostly rely on high-performance desktop computers and use frameworks such as PyTorch to run advanced reconstruction models. This presents the following technical challenges in field monitoring scenarios for crops: Limited deployment scenarios: Traditional spectral reconstruction relies on desktop hardware, which cannot achieve mobile and portable operation, making it difficult to meet the real-time spectral reconstruction needs of outdoor and field scenarios; Poor model deployment adaptability: MST++ models are in PyTorch format and cannot be run directly on mobile devices. In addition, the models have problems such as dynamic structure and excessively long data sequences, which are not compatible with the texture processing capabilities of mobile GPUs, and are prone to inference failures, memory overflows, and other issues. Data layout incompatibility: The desktop model uses the NCHW data arrangement format, while mobile hardware generally supports the NHWC format. Direct deployment will lead to low inference efficiency and data parsing errors. Inconvenient data management: High-dimensional sequence data generated by crop spectral reconstruction is difficult to store efficiently on mobile devices. Traditional file formats have problems such as write failure and slow speed, and lack convenient historical query and sharing functions, which is not conducive to comparative analysis of data from multiple plots in the field. Low functional integration: Most existing mobile spectral applications only implement a single function and do not form a complete closed loop of "image acquisition - model inference - result visualization - data storage - sharing and querying", which makes them less practical. Summary of the Invention

[0003] (1) Technical problems to be solved To address the shortcomings of existing technologies, the present invention aims to provide a crop spectral reconstruction system and implementation method based on a mobile smart terminal, which solves the problem that existing spectral reconstruction relies on desktop hardware, cannot achieve mobile and portable operation, and is difficult to meet the real-time spectral reconstruction needs of outdoor and field scenarios.

[0004] (2) Technical solution To address the aforementioned technical problems, this invention provides a crop spectral reconstruction system based on a mobile smart terminal, comprising: The image acquisition module supports real-time capture of RGB images via the phone's camera, and also supports selecting images from the phone's photo album as input; The model inference module integrates an optimized TFLite format MST++ model, receives the acquired RGB three-channel images, accelerates inference through the GPU, and outputs 31-channel spectral data to achieve rapid reconstruction from RGB to hyperspectral data. The data visualization module supports the visualization of the 14th channel in hyperspectral data, allowing users to intuitively view the spectral characteristics of this channel and facilitating preliminary analysis of crop spectral data. The file storage module saves the hyperspectral data obtained from model inference as BIN file format. It improves storage efficiency by optimizing file writing and adapts to the storage characteristics of mobile devices. The file storage and sharing module supports local storage of BIN format spectral files to establish a historical database, allowing users to query past inference results at any time. It also supports sharing stored BIN files to other platforms to achieve data interoperability.

[0005] Preferably, the system is applied to a mobile app.

[0006] Furthermore, the specific optimization method for the optimized TFLite format MST++ model includes the following steps: S1. Multi-format model conversion: The original PyTorch MST++ model is converted to ONNX format in turn, and then further converted to TFLite format to adapt to mobile inference engines and solve the problem that PyTorch models cannot run directly on mobile devices. S2. Static Model Processing: To address the issue of dynamic models failing to perform inference correctly on mobile devices, the MST++ model is statically reconstructed to fix the model's input and output dimensions, ensuring stable operation of the model in the mobile inference engine. S3. Model 2D Remodeling: To address the issue of excessively long data sequences in the ViT structure of the MST++ model, as well as the shortcomings of mobile GPUs having too small textures and being unable to handle 512x512x3 size data sequences, the model is remodeled into 2D, splitting long data sequences into 2D structures adapted to mobile GPU texture processing, thus solving the problems of memory overflow and inference lag. S4. Model Training Alignment and Operator Replacement: After converting the model to TFLite format, a training alignment operation is performed to ensure that the reconstruction accuracy of the converted model is consistent with the original PyTorch model; at the same time, operators that are not compatible with mobile devices are replaced to improve the compatibility and efficiency of model inference. S5. Data Layout Adaptation: To address the issue of inconsistent data layout between NCHW on the computer and NHWC on the mobile device, data format conversion is performed before model inference to eliminate inference errors and performance losses caused by differences in data layout. S6. GPU-accelerated inference: The GPU Delegate is used to drive the mobile GPU for parallel inference, which greatly improves the model inference speed and achieves real-time spectral reconstruction.

[0007] Furthermore, the image acquisition module acquires RGB images with a resolution of 512x512.

[0008] A method for crop spectral reconstruction based on a mobile smart terminal, implemented using the aforementioned crop spectral reconstruction system based on a mobile smart terminal, includes the following steps: A. Initialization Phase: After the APP starts, it automatically completes various preparatory tasks, loads the optimized TFLite format spectral reconstruction model, initializes the GPU Delegate to start the mobile GPU inference environment, and simultaneously initializes the image acquisition module, file storage module, and historical record database.

[0009] B. In the image acquisition stage, RGB crop images with a resolution of 512x512 are selected. After the user selects the target image, it is passed to the subsequent model inference module.

[0010] C. In the model inference stage, the model inference module outputs the received RGB crop images as hyperspectral data, and finally verifies the validity of the output hyperspectral data.

[0011] D. Result visualization and storage stage: The hyperspectral data obtained by the model inference module will be transferred to the data visualization module, which will allow users to view the crop spectral image of the 14th channel in the hyperspectral data. At the same time, the hyperspectral data will be saved as a BIN file and written to local storage.

[0012] E. Historical Query and Sharing Stage: Users can use the APP to query previously saved BIN format spectral files and view the corresponding spectral visualization results, which facilitates the comparison of crop spectral data from different periods and plots. After selecting the target BIN file, users can share the file to other platforms or devices through the APP's built-in sharing function.

[0013] F. During the testing and verification phase, the APP was installed on multiple Android phones of different models to verify the system's compatibility and stability, ensuring that it could meet the actual needs of real-time monitoring of crops in the field.

[0014] Furthermore, in step B, the user selects an image through the APP as follows: the user selects the "take a picture" mode through the APP interface to obtain an image of the crop. In the photo mode, the image acquisition module calls the mobile phone camera and automatically adapts to the 512x512 resolution. After the user takes a picture of the crop in the field, the image is automatically transmitted to the subsequent model inference module.

[0015] Furthermore, in step B, the user selects an image through the APP as follows: the user selects the "Album Selection" mode through the APP interface to obtain crop images. In the album selection mode, the image acquisition module opens the phone's album and filters out RGB crop images with a resolution of 512x512. After the user selects the target image, it is passed to the subsequent model inference module.

[0016] Furthermore, step C specifically involves the following steps: After receiving the acquired 512x512 RGB three-channel crop images, the model inference module first preprocesses the image data, converting it into a format recognizable by the model. Simultaneously, it performs a data arrangement conversion from NCHW to NHWC to ensure consistency with the mobile GPU processing format. Subsequently, it calls the GPU Delegate to drive the mobile GPU and runs the optimized TFLite format MST++ model to perform inference calculations on the preprocessed RGB data, outputting hyperspectral data. Finally, it verifies the validity of the output hyperspectral data to ensure that the data is free of anomalies. If anomalies are found, the inference is re-performed to ensure the accuracy of the crop spectral data.

[0017] Furthermore, step D specifically involves: the hyperspectral data obtained by the model inference module being transmitted to the data visualization module, where users can view the crop spectral image of channel 14 in the hyperspectral data to intuitively understand the spectral characteristics of the crop under this channel, facilitating a preliminary judgment of the crop's growth status; simultaneously, the file storage module saves the hyperspectral data as a BIN file, improving storage efficiency by optimizing file writing, quickly writing the data to local storage, and recording the file path, storage time, etc., into the historical record database for easy subsequent querying and tracing.

[0018] Furthermore, step E specifically involves: users can use the APP's file storage and sharing module to search for previously saved BIN format spectral files by criteria such as save time, file name, and crop plot. Clicking on a file allows users to view the corresponding spectral visualization results, facilitating comparison of crop spectral data from different periods and plots. After selecting a target BIN file, users can share the file to other platforms or devices using the APP's built-in sharing function, enabling the interoperability of crop spectral data and facilitating collaborative analysis by agricultural technicians.

[0019] Beneficial effects Compared with the prior art, the beneficial effects of the present invention are as follows: This invention employs a multi-step model conversion, staticization, 2D reshaping, and data arrangement adaptation. The 2D reshaping results in improved performance compared to the original model, successfully deploying the MST++ model on mobile devices. It solves problems such as model compatibility, excessively long data sequences, and low inference efficiency. With the help of GPU acceleration, it achieves second-level spectral reconstruction. Finally, the average absolute error between the mobile model inference data and the computer model inference data is approximately the same, thus enabling this invention to achieve efficient mobile deployment of the model. This invention enables real-time reconstruction of RGB to 31-channel spectra using ordinary Android phones, without relying on desktop-level high-performance hardware. It realizes the mobile and portable application of spectral reconstruction technology, expands the application scenarios of the technology, and makes this invention have the advantage of lowering the threshold for use. This invention integrates six major functions: image acquisition, reasoning, visualization, storage, sharing, and historical query, forming a complete processing loop. It solves the problems of difficult spectral data storage and inconvenient sharing, improves the user experience, and makes this invention both functionally complete and practical. The system of this invention operates stably without problems such as inference failure or data loss, and is compatible with mobile terminals of different configurations, giving this application the advantages of strong stability and compatibility. This invention uses the BIN file format to store crop spectral data, optimizes file writing to improve storage efficiency, and significantly increases file writing speed, meeting the needs of real-time processing of multiple batches of spectral data in mobile field scenarios, thus giving this application the advantage of high data processing efficiency. Attached Figure Description

[0020] Figure 1 This is a functional block diagram of the system of the present invention; Figure 2 This is a flowchart of the model optimization process for this invention; Figure 3 This is a functional flowchart of the crop spectral monitoring APP of the present invention; Figure 4 This is a schematic diagram of the user interface of the APP of this invention; Figure 5 This is a visual comparison chart of the data from the mobile inference terminal and the 14-channel visualization on the computer terminal in this invention. Detailed Implementation

[0021] like Figure 1 and 2 As shown, this invention provides a crop spectral reconstruction system based on a mobile smart terminal. This system is applied to a mobile APP, which eliminates the need for desktop-level high-performance hardware. Ordinary Android phones can achieve real-time reconstruction of RGB to 31-channel spectra, realizing the mobile and portable application of spectral reconstruction technology and meeting the real-time spectral reconstruction needs of outdoor, field and other scenarios.

[0022] The system includes an image acquisition module, a model inference module, a data visualization module, a file storage module, and a file storage and sharing module.

[0023] The image acquisition module supports capturing 512x512 resolution RGB images in real time using the phone's camera, and also supports selecting 512x512 resolution images from the phone's photo album as input, thus meeting the image acquisition needs in different scenarios.

[0024] The model inference module integrates an optimized TFLite format MST++ model, receives acquired RGB three-channel images, accelerates inference through GPU, and outputs 31-channel spectral data to achieve rapid reconstruction from RGB to hyperspectral data. The specific optimization method for the TFLite format MST++ model includes the following steps: S1. Multi-format model conversion: The original PyTorch MST++ model is converted to ONNX format in turn, and then further converted to TFLite format to adapt to mobile inference engines and solve the problem that PyTorch models cannot run directly on mobile devices. S2. Static Model Processing: To address the issue of dynamic models failing to perform inference correctly on mobile devices, the MST++ model is statically reconstructed to fix the model's input and output dimensions, ensuring stable operation of the model in the mobile inference engine. S3. Model 2D Remodeling: To address the issue of excessively long data sequences in the ViT structure of the MST++ model, as well as the shortcomings of mobile GPUs having too small textures and being unable to handle 512x512x3 size data sequences, the model is remodeled into 2D, splitting long data sequences into 2D structures adapted to mobile GPU texture processing, thus solving the problems of memory overflow and inference lag. S4. Model Training Alignment and Operator Replacement: After converting the model to TFLite format, a training alignment operation is performed to ensure that the reconstruction accuracy of the converted model is consistent with the original PyTorch model; at the same time, operators that are not compatible with mobile devices are replaced to improve the compatibility and efficiency of model inference. S5. Data Layout Adaptation: To address the issue of inconsistent data layout between NCHW on the computer and NHWC on the mobile device, data format conversion is performed before model inference to eliminate inference errors and performance losses caused by differences in data layout. S6. GPU-accelerated inference: The GPU Delegate is used to drive the mobile GPU for parallel inference, which greatly improves the model inference speed and achieves real-time spectral reconstruction.

[0025] The data visualization module supports the visualization of the 14th channel in hyperspectral data, allowing users to intuitively view the spectral characteristics of this channel and facilitating preliminary analysis of crop spectral data.

[0026] The file storage module saves the hyperspectral data obtained from model inference in BIN format. It improves storage efficiency by optimizing file writing: it uses direct memory allocation to reduce garbage collection overhead, adapts to the device's native byte order with NHWC contiguous memory layout to improve cache hit rate, adopts batch writing of whole buffers and supports memory-mapped files to reduce disk I / O operations, and optimizes access and loop efficiency through pre-allocated buffers, direct index calculation and segmented dimension conversion. This improves file writing speed on mobile devices and meets the need for rapid storage of multiple batches of crop spectral data in the field.

[0027] The file storage and sharing module supports local storage of BIN format spectral files to establish a historical database, allowing users to query past inference results at any time. It also supports sharing stored BIN files to other platforms to achieve data interoperability.

[0028] like Figure 3 As shown, the present invention also provides a method for crop spectral reconstruction based on a mobile smart terminal, which is implemented based on the above-mentioned crop spectral reconstruction system based on a mobile smart terminal, and includes the following steps: A. Initialization Phase: After the APP starts, it automatically completes various preparatory tasks, loads the TFLite format spectral reconstruction model after format conversion, staticization, 2D reshaping and operator replacement optimization, initializes the GPU Delegate to start the mobile GPU inference environment, and completes the initialization of the image acquisition module, file storage module and historical record database to ensure that the subsequent functional modules can work together normally and make full preparations for crop spectral reconstruction.

[0029] B. In the image acquisition stage, users can select either "take a photo" or "select from album" mode through the APP interface to acquire crop images. In the photo mode, the phone's camera is invoked and automatically adapted to a 512x512 resolution. After the user takes a picture of the crops in the field (such as leaves, fruits, etc.), the image is automatically transmitted to the subsequent inference module. In the album selection mode, the phone's album is opened, and RGB crop images with a resolution of 512x512 are selected. After the user selects the target image, it is transmitted to the inference module, meeting the needs of crop image acquisition in different field scenarios.

[0030] C. In the model inference stage, after receiving the acquired 512x512 RGB three-channel crop images, the model inference module first preprocesses the image data, converting it into a format recognizable by the model. At the same time, it completes the data arrangement conversion from NCHW to NHWC to ensure consistency with the mobile GPU processing format. Then, it calls the GPU Delegate to drive the mobile GPU and runs the optimized TFLite model to perform inference calculations on the preprocessed RGB data, outputting hyperspectral data. Finally, it verifies the validity of the output hyperspectral data to ensure that there are no anomalies. If anomalies are found, the inference is re-performed to ensure the accuracy of the crop spectral data.

[0031] D. Result Visualization and Storage Stage: The hyperspectral data obtained by the model inference module is transferred to the data visualization module. Users can view the crop spectral image of channel 14 in the hyperspectral data to intuitively understand the spectral characteristics of crops in this channel, which facilitates a preliminary judgment of crop growth status. At the same time, the file storage module saves the hyperspectral data as a BIN file, improves storage efficiency by optimizing file writing, quickly writes the data to local storage, and records the file path, saving time, etc. into the historical record database for easy subsequent query and traceability.

[0032] E. Historical Query and Sharing Stage: Through the APP's file storage and sharing module, users can query previously saved BIN format spectral files by criteria such as save time, file name, and crop plot. Clicking on a file allows users to view the corresponding spectral visualization results, facilitating comparison of crop spectral data from different periods and plots. After selecting a target BIN file, users can share the file to other platforms or devices through the APP's built-in sharing function, enabling the interoperability of crop spectral data and facilitating collaborative analysis by agricultural technicians.

[0033] F. In the testing and verification phase, the APP was installed on multiple Android phones of different models. In a field setting, the functions of image acquisition, model inference, data storage, visualization, sharing, and historical query were tested. The focus was on verifying the clarity of crop image acquisition, the accuracy of spectral reconstruction, and the stability of each function. It was confirmed that all functions could run stably, the inference results were accurate, and file writing and sharing were normal. The system's compatibility and stability were verified to ensure that it could meet the actual needs of real-time monitoring of crops in the field.

[0034] like Figure 4 The image shown is a schematic diagram of the user interface of the APP in this application. This interface provides a clear and direct understanding of how to use the system.

[0035] This invention solves the technical problems of mobile deployment of existing spectral reconstruction technologies through model optimization and functional integration, and has the following significant effects: Through multi-step model transformation, staticization, 2D reshaping, and data arrangement adaptation, the performance of the model after 2D reshaping and retraining is improved compared with the original model, as shown in Table 1. Table 1

[0036] This invention solves problems such as model compatibility, excessively long data sequences, and low inference efficiency. It achieves second-level spectral reconstruction with the help of GPU acceleration. When tested on a PC, the MST_2D model has lower relative average error (MRAE) and mean absolute error (MAE) than the original MST++ model, indicating that it has smaller errors and higher accuracy in data prediction and reconstruction. At the same time, its peak signal-to-noise ratio (PSNR) is higher, which means that the hyperspectral data reconstruction effect is clearer and of better quality.

[0037] Finally, the model was deployed on a mobile device for testing. The average absolute error between the MST_2D model inference data on the mobile device and the MST_2D model inference data on the computer was about 0.0003 (approximately zero), which gives the present invention the advantage of achieving efficient mobile deployment of the model.

[0038] This invention enables real-time reconstruction of RGB to 31-channel spectra using ordinary Android phones, without relying on desktop-level high-performance hardware. It realizes the mobile and portable application of spectral reconstruction technology, expands the application scenarios of the technology, and makes this invention have the advantage of lowering the threshold for use. This invention integrates six major functions: image acquisition, reasoning, visualization, storage, sharing, and historical query, forming a complete processing loop. It solves the problems of difficult spectral data storage and inconvenient sharing, improves the user experience, and makes this invention both functionally complete and practical. This invention uses the BIN file format to store crop spectral data, optimizes file writing to improve storage efficiency, and significantly increases file writing speed, meeting the needs of real-time processing of multiple batches of spectral data in mobile field scenarios, thus giving this application the advantage of high data processing efficiency.

[0039] After testing and verification on multiple Android phones, the results of the multi-platform inference test are shown in Table 2. The system of this invention runs stably without inference failure or data loss. It is compatible with mobile terminals with different configurations. As can be seen from the multi-platform inference test data, the system can complete inference tasks on different chip platforms. The memory, video memory usage and CPU load performance can also adapt to the hardware resource limitations of each model, demonstrating good compatibility and stability, and has broad application prospects. Table 2

[0040] like Figure 5As shown, this application presents a visual comparison and verification diagram of the data from the mobile inference terminal and the 14-channel data from the computer terminal. Figure 5 The left-middle image shows the visualization results of the reconstructed hyperspectral data (band 14) on the mobile device, and the right-middle image shows the distribution of the absolute difference between the reconstructed data and the original data. Figure 5 As can be seen, the overall difference is extremely low (the maximum error is less than 0.0040), indicating that the difference between the mobile reconstruction data and the original data is minimal and the reconstruction accuracy is high. The error is mainly concentrated in a few local areas, and the overall data fidelity is good, which verifies the reliability of the mobile reconstruction algorithm.

[0041] The above embodiments are preferred implementations of the present invention. In addition, the present invention can be implemented in other ways. Any obvious substitutions without departing from the concept of the present technical solution are within the protection scope of the present invention.

Claims

1. A crop spectral reconstruction system based on a mobile intelligent terminal, characterized in that, include: The image acquisition module supports real-time capture of RGB images via the phone's camera, and also supports selecting images from the phone's photo album as input; The model inference module integrates an optimized TFLite format MST++ model, receives the acquired RGB three-channel images, accelerates inference through the GPU, and outputs 31-channel spectral data to achieve rapid reconstruction from RGB to hyperspectral data. The data visualization module supports the visualization of the 14th channel in hyperspectral data, allowing users to intuitively view the spectral characteristics of this channel and facilitating preliminary analysis of crop spectral data. The file storage module saves the hyperspectral data obtained from model inference as BIN file format. It improves storage efficiency by optimizing file writing and adapts to the storage characteristics of mobile devices. The file storage and sharing module supports local storage of BIN format spectral files to establish a historical database, allowing users to query past inference results at any time. It also supports sharing stored BIN files to other platforms to achieve data interoperability.

2. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 1, characterized in that, This system is used in mobile apps.

3. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 1, characterized in that, The specific optimization method for the TFLite format MST++ model includes the following steps: S1. Multi-format model conversion: The original PyTorch MST++ model is converted to ONNX format in turn, and then further converted to TFLite format to adapt to mobile inference engines and solve the problem that PyTorch models cannot run directly on mobile devices. S2. Static Model Processing: To address the issue of dynamic models failing to perform inference correctly on mobile devices, the MST++ model is statically reconstructed to fix the model's input and output dimensions, ensuring stable operation of the model in the mobile inference engine. S3. Model 2D Remodeling: To address the issue of excessively long data sequences in the ViT structure of the MST++ model, as well as the shortcomings of mobile GPUs having too small textures and being unable to handle 512x512x3 size data sequences, the model is remodeled into 2D, splitting long data sequences into 2D structures adapted to mobile GPU texture processing, thus solving the problems of memory overflow and inference lag. S4. Model Training Alignment and Operator Replacement: After converting the model to TFLite format, a training alignment operation is performed to ensure that the reconstruction accuracy of the converted model is consistent with the original PyTorch model; at the same time, operators that are not compatible with mobile devices are replaced to improve the compatibility and efficiency of model inference. S5. Data Layout Adaptation: To address the issue of inconsistent data layout between NCHW on the computer and NHWC on the mobile device, data format conversion is performed before model inference to eliminate inference errors and performance losses caused by differences in data layout. S6. GPU-accelerated inference: The GPU Delegate is used to drive the mobile GPU for parallel inference, which greatly improves the model inference speed and achieves real-time spectral reconstruction.

4. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 1, characterized in that, The image acquisition module acquires RGB images with a resolution of 512x512.

5. A method for crop spectral reconstruction based on a mobile intelligent terminal, implemented using the crop spectral reconstruction system based on a mobile intelligent terminal as described in any one of claims 1-4, characterized in that, Includes the following steps: A. Initialization Phase: After the APP starts, it automatically completes various preparatory tasks, loads the optimized TFLite format spectral reconstruction model, initializes the GPU Delegate to start the mobile GPU inference environment, and simultaneously initializes the image acquisition module, file storage module, and historical record database. B. In the image acquisition stage, RGB crop images with a resolution of 512x512 are selected. After the user selects the target image, it is passed to the subsequent model inference module. C. In the model inference stage, the model inference module outputs the received RGB crop images as hyperspectral data, and finally verifies the validity of the output hyperspectral data. D. Result visualization and storage stage: The hyperspectral data obtained by the model inference module will be transferred to the data visualization module, which will allow users to view the crop spectral image of the 14th channel in the hyperspectral data. At the same time, the hyperspectral data will be saved as a BIN file and written to local storage. E. Historical Query and Sharing Stage: Users can use the APP to query previously saved BIN format spectral files and view the corresponding spectral visualization results, which facilitates the comparison of crop spectral data from different periods and plots. After selecting the target BIN file, users can share the file to other platforms or devices through the APP's built-in sharing function. F. During the testing and verification phase, the APP was installed on multiple Android phones of different models to verify the system's compatibility and stability, ensuring that it could meet the actual needs of real-time monitoring of crops in the field.

6. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 5, characterized in that, In step B, the user selects an image through the APP: The user selects the "take a picture" mode through the APP interface to obtain an image of the crop. In the photo mode, the image acquisition module calls the mobile phone camera and automatically adapts to a 512x512 resolution. After the user takes a picture of the crop in the field, the image is automatically transmitted to the subsequent model inference module.

7. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 5, characterized in that, In step B, the user selects an image through the APP: The user selects the "Album Selection" mode through the APP interface to obtain crop images. In the album selection mode, the image acquisition module opens the phone's album and filters out RGB crop images with a resolution of 512x512. After the user selects the target image, it is passed to the subsequent model inference module.

8. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 5, characterized in that, Step C specifically involves the following steps: After receiving the acquired 512x512 RGB three-channel crop images, the model inference module first preprocesses the image data, converting it into a format recognizable by the model. Simultaneously, it performs a data arrangement conversion from NCHW to NHWC to ensure consistency with the mobile GPU processing format. Subsequently, it calls the GPU Delegate to drive the mobile GPU and runs the optimized TFLite format MST++ model to perform inference calculations on the preprocessed RGB data, outputting hyperspectral data. Finally, it verifies the validity of the output hyperspectral data to ensure that there are no anomalies. If anomalies are found, the inference is re-performed to ensure the accuracy of the crop spectral data.

9. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 5, characterized in that, Step D specifically involves the following steps: The hyperspectral data obtained by the model inference module is transmitted to the data visualization module, where users can view the crop spectral image of channel 14 in the hyperspectral data to intuitively understand the spectral characteristics of the crop in that channel, facilitating a preliminary judgment of the crop's growth status; Simultaneously, the file storage module saves the hyperspectral data as a BIN file, improving storage efficiency by optimizing file writing, quickly writing the data to local storage, and recording the file path, storage time, etc., into the historical record database for easy subsequent querying and tracing.

10. The crop spectral reconstruction system based on a mobile intelligent terminal according to claim 5, characterized in that, Step E specifically involves the following steps: Users can use the file storage and sharing module of the APP to search for previously saved BIN format spectral files by criteria such as save time, file name, and crop plot. Clicking on a file allows users to view the corresponding spectral visualization results, facilitating the comparison of crop spectral data from different periods and plots. After selecting a target BIN file, users can share the file to other platforms or devices using the APP's built-in sharing function, enabling the interoperability of crop spectral data and facilitating collaborative analysis by agricultural technicians.