Construction method, construction method and equipment of evidence photograph recognition model based on AI national investigation
By constructing and deploying an AI-powered land survey evidence photo recognition model, the problems of inaccurate photo quality and classification were solved, resulting in efficient and accurate land survey results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 曹扬
- Filing Date
- 2025-08-04
- Publication Date
- 2026-05-29
AI Technical Summary
In land surveys, the quality of evidence photographs is difficult to control, leading to inaccurate land classification and affecting survey efficiency and accuracy.
An AI-based land survey evidence photo recognition model was constructed. By acquiring and preprocessing historical evidence photos, the target recognition model was trained and deployed on terminal devices to achieve real-time recognition of the quality and classification of evidence photos.
This improved the quality and classification accuracy of evidence photos, enhanced the efficiency and precision of land surveys, and ensured the accuracy of land category identification.
Smart Images

Figure HDA0005531550220000011 
Figure HDA0005531550220000012 
Figure HDA0005531550220000021
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method for constructing an AI-based land survey evidence photo recognition model, a recognition method, and a device. Background Technology
[0002] Land use change surveys are an important national survey of national conditions and strength. They mainly use remote sensing monitoring, field surveys, and database updates to grasp the annual changes in land use and provide basic data support for natural resource management. Typically, evidence-providing photographs are collected using methods such as satellite remote sensing, which are part of the field survey work in the change survey, specifically identifying the location of land use changes based on preliminary determinations of the land use type based on satellite remote sensing imagery.
[0003] In on-site investigations, staff typically use mobile devices to take photographs documenting land use conditions. The quality of the photographs and the classification of land types are determined by the staff based on their experience during the on-site investigation, using the information in the photographs to classify and identify land uses.
[0004] However, due to the limitations of the staff's own operations and technology, the collection and judgment of evidence photos in the above-mentioned methods are difficult to control in terms of quality during the photo shooting process. It is also impossible to check and judge whether the photos taken meet the quality requirements, resulting in rework of evidence shooting work. Furthermore, it is impossible to accurately identify land categories, leading to many errors in land category identification. Ultimately, this results in low efficiency and low accuracy of land survey-related work and identification results. Summary of the Invention
[0005] The purpose of this application is to provide an AI-based method for constructing a land survey evidence photo recognition model, a recognition method, and a device to accurately identify and judge the quality of evidence photos while meeting the accuracy requirements for classifying evidence photos.
[0006] To achieve the above objectives, this application provides the following solution:
[0007] Firstly, this application provides an AI-based method for constructing a land survey evidence photo recognition model, the method comprising:
[0008] Obtain a training dataset, which includes historical evidence photos collected from various regions and time periods;
[0009] Preprocess each historical evidence photo in the training dataset;
[0010] Using the preprocessed historical evidence photos, the constructed initial recognition model is trained to obtain target recognition models corresponding to each region and time period. The target recognition model includes a quality recognition sub-model and a category recognition sub-model. The target recognition model is deployed to each terminal device so that when the terminal device runs the target recognition model, it recognizes and processes the collected target evidence photos and outputs the recognition results. The recognition results indicate the shooting quality category and land use classification category of the target evidence photo. The region corresponding to the target evidence photo collected by the terminal device is consistent with the region corresponding to the target recognition model running on it.
[0011] In some embodiments of the first aspect, the preprocessing of each historical evidence photograph in the training dataset includes:
[0012] The historical evidence photos are categorized by land use and labeled with their shooting quality.
[0013] Standardize the processing of labeled historical evidence photos.
[0014] In some embodiments of the first aspect, training the initial recognition model based on a neural network using the preprocessed historical evidence photographs includes:
[0015] The preprocessed historical evidence photos are input into the constructed initial recognition model to extract features from the preprocessed historical evidence photos.
[0016] The extracted features are processed for recognition, and the corresponding initial recognition results are output.
[0017] Based on the annotation information and recognition results, the parameters of the initial recognition model are updated, and the loss function is calculated;
[0018] Repeat the above training steps according to the set threshold until the loss function meets the set threshold.
[0019] In some embodiments of the first aspect, after training an initial recognition model based on a neural network using the preprocessed historical evidence photographs to obtain target recognition models corresponding to each region and time period, the method further includes:
[0020] The target recognition models for each region and time period are converted to obtain the target recognition models after format conversion;
[0021] Based on regional and time information, the target recognition model with the converted format is deployed to the corresponding terminal devices.
[0022] In some embodiments of the first aspect, the target recognition model is in PyTorch, TensorFlow, or MXNet format, and the converted target recognition model is in ONNX or MindSpore Lite format.
[0023] The process of converting the target recognition model for each region and time period to obtain the converted target recognition model includes:
[0024] The model loading module uses PyTorch's torch.load function to load pre-trained .pth inference model files;
[0025] Create a virtual tensor that matches the input size of the target recognition model;
[0026] The model transformation is performed using the torch.onnx.export function in PyTorch, generating an inference model file that conforms to the ONNX standard, i.e., an .onnx file.
[0027] Secondly, this application provides an AI-based method for recognizing evidence photos from land surveys, the method comprising:
[0028] Obtain evidence photos of the target in its location;
[0029] The target evidence photos are preprocessed;
[0030] The target evidence photo that meets the quality requirements is input into the target recognition model constructed by the AI-based land survey evidence photo recognition model construction method as described in any one of claims 1-6, and the recognition result is output. The recognition result includes the land category and quality category to which the land in the target evidence photo belongs, and the area corresponding to the target evidence photo is consistent with the area corresponding to the target recognition model running on it.
[0031] In some embodiments of the second aspect, before acquiring the target evidence photograph of its location, the method further includes:
[0032] Based on the location and time period, a target recognition model request message is sent to the server, the target recognition model request message including the location and time period information;
[0033] The receiving service center returns the target recognition model based on the location and time period information.
[0034] In some embodiments of the second aspect, after identifying and processing the target evidence photograph, the method further includes:
[0035] The target evidence photo and the recognition result are sent to the server, so that the server uses the received target evidence photo and the recognition result to update the parameters of the target recognition model according to the set period.
[0036] Thirdly, this application provides a processing apparatus, the processing apparatus comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the method as described in the first or second aspect.
[0037] According to the specific embodiments provided in this application, the following technical effects are disclosed:
[0038] This application provides an AI-based method, method, and device for constructing a land survey evidence photo recognition model. It acquires historical evidence photos from various regions and time periods as a training dataset, preprocesses these historical photos, and then trains an initial recognition model using the preprocessed photos. Finally, it constructs target recognition models corresponding to each region and time period. The constructed target recognition model includes a category recognition sub-model for land use classification and a quality recognition sub-model for evidence photo quality identification. This target recognition model can be deployed on terminal devices after format conversion, allowing field personnel to run the model on these devices during land survey fieldwork. This enables real-time identification of land use categories and photo quality in the collected target evidence photos, outputting recognition results representing land use categories and photo quality results, ultimately achieving efficient and accurate land survey evidence photo results. This involves using quality detection algorithms and target recognition models deployed on terminal devices to detect and classify the quality of collected evidence photos. This addresses the issue of inconsistent professional skills among field personnel during land survey evidence collection, which leads to inaccurate land classification and low-quality photos. Furthermore, AI technology is used to assist in land classification identification and real-time quality assessment of evidence photos during the evidence collection process, thereby improving the overall quality of land change survey results and effectively guiding subsequent land survey evidence collection work. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating the AI-based land survey evidence photo recognition model construction method of some embodiments of this application;
[0040] Figure 2 These are photographs showing substandard quality collected in some embodiments of this application;
[0041] Figure 3These are photographs serving as evidence of quality compliance in some embodiments of this application;
[0042] Figure 4 This is a schematic diagram of land use categories by region for some embodiments of this application;
[0043] Figure 5 This is a schematic diagram of land use categories by region and time for some embodiments of this application;
[0044] Figure 6 This is a schematic diagram illustrating the classification of substandard photograph quality in some embodiments of this application.
[0045] Figure 7 This is a flowchart illustrating an AI-based land survey evidence photo recognition method according to some embodiments of this application;
[0046] Figure 8 This is a schematic diagram illustrating the identification results of target evidence photographs in some embodiments of this application;
[0047] Figure 9 This is a schematic diagram illustrating the identification results of the target evidence photograph in some embodiments of this application;
[0048] Figure 10 This is a schematic diagram illustrating the identification results of the target evidence photograph in some embodiments of this application;
[0049] Figure 11 This application also provides schematic diagrams illustrating the identification results of target evidence photographs in some embodiments;
[0050] Figure 12 This is a schematic diagram of the structure of a processing device provided in some embodiments of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] It is understood that the land survey evidence photos involved in this application are historical evidence photos with relevant land category labels and land change survey evidence photos from this year.
[0054] In this scenario, to ensure the accuracy of the identification results, there are requirements for the quality and characteristics of the evidence photos taken, such as requirements for image clarity, exposure accuracy, and the proportion of the subject in the photo. At the same time, it is necessary to confirm whether the classification of the photographed plot meets the land classification requirements of the land change survey.
[0055] However, due to the limitations of the staff's own experience and skills, the evidence photos collected on-site in the relevant technologies have quality defects. It is also impossible to accurately check and judge whether the evidence photos meet the shooting quality requirements. Finally, it also makes it impossible to make accurate identification results when identifying land categories based on evidence photos.
[0056] To overcome the limitations of the aforementioned evidence photos taken by staff, which cannot effectively check and judge whether the photos meet quality requirements, this application proposes an AI-based method for checking evidence photos in land surveys. This method is deployed on edge devices, such as smart terminals and other IoT devices that staff can carry during field surveys. This allows the deployed AI algorithm, such as a neural network model, to accurately detect and judge the quality of the evidence photos taken during collection and shooting, providing accurate evidence for the identification of land survey evidence photos.
[0057] ONNX (Open Neural Network Exchange) is an open format for representing deep learning models. It allows AI developers to more easily migrate their models across different frameworks, tools, runtimes, and hardware. ONNX provides a framework-independent way to represent deep learning models, thereby promoting interoperability of AI models across different platforms.
[0058] At its core, ONNX is a scalable model that supports various operations in deep learning, such as convolution, activation functions, and pooling. This model can be exported, imported, and executed in different environments without requiring modification to the model itself. This means that once a model is converted to ONNX format, it can be supported by a variety of different deep learning frameworks and runtimes, including but not limited to TensorFlow, PyTorch, Caffe2, Microsoft Cognitive Toolkit (CNTK), and MXNet.
[0059] ONNX has a wide range of applications. It can be used to train a model using PyTorch and then deployed to a production environment that uses modules like TensorFlow as the inference engine.
[0060] ONNX supports deploying models to edge devices such as smartphones and IoT devices. These devices typically have limited computing resources and hardware configurations, and ONNX provides a way to optimize models to adapt to various constraints. Through ONNX Runtime, developers can efficiently run ONNX models on these devices while maintaining model accuracy and performance.
[0061] Additionally, its features include the MindSpore Lite neuron model, which includes MindSpore Lite as the built-in AI inference engine of HarmonyOS, providing inference deployment capabilities for deep learning models.
[0062] MindSpore Lite is developed by Huawei. It is a lightweight AI engine within the MindSpore full-scenario AI framework, providing ultra-fast, intelligent, and simple AI solutions that enable users to easily deploy intelligent applications across all scenarios. Huawei has deep expertise and innovative capabilities in the AI field, and MindSpore Lite is a crucial component of its AI framework.
[0063] To better understand the AI-based land survey evidence photo detection model construction method, detection method, and equipment provided in this application, the following detailed explanation is provided with reference to the accompanying drawings.
[0064] Figure 1 This is a flowchart illustrating the method for constructing an AI-based land survey evidence photo detection model, as provided in an embodiment of this application.
[0065] This training method can be performed by the processing device under the x86-64 operating system. It uses the PyTorch library that supports Python or the MindSpore large model library based on Huawei Ascend to perform category classification training on the evidence photos and generate relevant inference model training data. At the same time, inference models are established and trained separately according to the basic regional division and deployment method of the survey.
[0066] like Figure 1 As shown, the training steps for this model are as follows:
[0067] S110, Obtain the training dataset, which includes historical evidence photos collected from various regions and time periods.
[0068] S120, preprocess each historical evidence photo in the training dataset.
[0069] S130, using the preprocessed historical evidence photo, the constructed initial recognition model is trained to obtain the target recognition model corresponding to each region and time period. The target recognition model includes a quality recognition sub-model and a category recognition sub-model. The target recognition model is used to deploy on each terminal device, so that when the terminal device runs the target recognition model, it recognizes and processes the collected target evidence photos and outputs the recognition result. The recognition result indicates the shooting quality category and land use classification category of the target evidence photo. The area corresponding to the target evidence photo collected by the terminal device is consistent with the area corresponding to the target recognition model running on it.
[0070] Specifically, the first step is to obtain a training dataset, which can include historical evidence photos from various regions and time periods.
[0071] Furthermore, the historical evidence photos in the training data can be preprocessed to label the land use classification and shooting quality categories, and then standardized.
[0072] This allows for automated preprocessing of evidence photos, followed by manual sampling to ensure that the training data in the basic training dataset is classified according to relevant shooting quality quantification standards, thus guaranteeing the accuracy of the training dataset.
[0073] For example, for such Figure 2 The photos shown below were filtered to identify those of poor quality for use as evidence. The remaining photos, which were properly exposed, are listed below. Figure 3 As shown, after basic image quality labeling is performed on the training set, it is used to train the quality self-module, ensuring the effective and rapid reading of the training set data.
[0074] Finally, after completing the preprocessing of the training data, the preprocessed training data, or the training dataset with qualified detection and annotation quality, can be used to train the constructed initial recognition model, so as to continuously update the parameters of the initial model and finally obtain the target recognition model.
[0075] The target recognition model can include a quality sub-recognition model and a category recognition sub-model. The quality recognition sub-model is used to identify the shooting quality classification of the input evidence photos, such as exposure, sharpness, and subject proportion. The category recognition sub-model is used to output the land use category, such as cultivated land, road land, and residential land.
[0076] In this embodiment, the initial recognition model can be built based on a neural network model.
[0077] During the training process, preprocessed historical evidence photos, such as photos that have been divided into regions and labeled with land use categories and shooting quality categories, are used to train the recognition model.
[0078] The training can be performed by retraining the model on the NetImage model library using the PyTorch library. The model training is carried out with fully custom parameters, and the training can be terminated when the confidence of the inference model reaches 85%, thus obtaining the target recognition model.
[0079] The output target recognition model can utilize the pth model file exported from the PyTorch library, where pth is a neuron model file.
[0080] In practice, the trained pth inference model file can classify and identify the content of the captured images based on the input images to be identified as evidence, and output the confidence parameters of each category after classification, i.e., the identification results, which serve as the inference basis for classifying the evidence images. The classification confidence data is queried according to the category index set before training. The category index is generated when the training dataset is created and is stored in the npy file; this facilitates the classification and determination of categories when using the inference model in the future.
[0081] It is understandable that the PyTorch or MindSpore models trained on x86-64 computer devices, i.e., the constructed target recognition models, are based on evidence photo data from various historical years. This historical evidence photo data can be further processed according to the shooting time as an additional parameter in the inference model's iteration, dividing the training data into time periods and training inference models for different time periods. This results in the foundational inference model used for subsequent terminal deployment.
[0082] Even if a computer system can directly run and verify the target recognition model after training, it is impractical to deploy a service based on the inference of evidence photos using a central server. This is also difficult to meet the needs of centralized evidence photo inference services within a short period. Therefore, in this application, to facilitate the nature and implementation of land change surveys, the trained target recognition model can be formatted and optimized, then deployed to terminal devices via a decentralized service, such as the mobile terminals held by personnel conducting on-site operations. This allows for real-time recognition of evidence photo data on the mobile terminal while the target recognition model is running. Furthermore, during target recognition deployment, it is ensured that the area corresponding to the target evidence photo collected by the terminal device is consistent with the area corresponding to the target recognition model running on it.
[0083] It is understood that in this embodiment of the application, historical evidence photos of various regions and time periods are obtained as training datasets. These historical evidence photos are then preprocessed, and the preprocessed photos are used to train the initial recognition model, ultimately constructing target recognition models corresponding to each region and time period. The constructed target recognition model includes a category recognition sub-model and a quality recognition sub-model for land use category identification. This target recognition model can be deployed on terminal devices after format conversion, enabling personnel to run the target recognition model on the terminal device during land survey operations. This allows for land category identification of the collected evidence photos that have passed quality checks and meet quality requirements, and outputs the identification results representing the land use category and the shooting quality identification results, ultimately achieving efficient and accurate land survey evidence results. This involves using quality detection algorithms and target recognition models deployed on terminal devices to detect and classify the quality of collected evidence photos. This addresses the issue of inconsistent professional skills among field personnel during land survey evidence collection, which leads to inaccurate land classification and low-quality photos. Furthermore, AI technology is used to assist in land classification identification and real-time quality assessment of evidence photos during the evidence collection process, thereby improving the overall quality of evidence photos and enhancing the overall organization of land change survey results. This effectively guides subsequent land survey evidence collection work.
[0084] Optionally, in some embodiments of this application, the preprocessing of historical evidence photos in the acquired training dataset may specifically include the following steps:
[0085] S121, label the historical evidence photo with land use category and shooting quality category.
[0086] S121, Standardize the processing of labeled historical evidence photos.
[0087] Specifically, after obtaining historical evidence photos from various regions and time periods, different types of training data can be prepared by dividing the regions according to the basic administrative regions of the investigation and the characteristics of the evidence shooting time, so that the evidence photos in the training data can be equipped with classification labels and quality classification labels.
[0088] For example, the centralized field photography for land use change surveys takes place every November and December, while routine change evidence data is available throughout the year. Evidence photos can be categorized by administrative region and shooting time, and further classified and labeled according to the land use classification requirements of the land use change survey. Each category of photos represents the characteristics of its respective area, while also meeting the requirements for different shooting time periods, shooting angles, and shooting subjects.
[0089] like Figure 4 , Figure 5and Figure 6 The image shown is a diagram illustrating the regional and classification characteristics of the actual evidence photos used in the training set.
[0090] In addition, to enrich the training dataset, it can also include unqualified historical evidence photos and label their shooting quality.
[0091] That is, the training dataset in this embodiment can also include a non-qualified dataset, meaning that sample photos taken in various regions that do not meet the basic quality requirements of land change surveys can be prepared for training. For example... Figure 1 The photo was taken at 5 PM, and the exposure is insufficient.
[0092] Among them, unqualified photos are those that do not meet the quality requirements, such as those with an excessively large proportion of sky, backlighting, blurry images, overexposure, etc., which affect the basic quality of the evidence photos.
[0093] In practice, the photographs used as evidence in this application must meet the "neutral exposure" principle, meaning the colors of ground features must be accurately reproduced, with no obvious overexposure (blowout of highlights) or underexposure (lack of detail in shadows), ensuring that details such as farmland crops, building textures, and vegetation cover are clearly distinguishable. Specific quantitative references include: a uniform histogram distribution, with the main peak located in the middle of the horizontal axis (grayscale value range of 50-200), and no obvious pixel accumulation at either end (indicators of overexposure / underexposure). The brightness range for key ground features is as follows: Vegetation / Farmland: RGB channel brightness value 80-180 (avoiding excessive brightness that could lead to loss of leaf texture). Buildings / Roads: RGB brightness value 50-220 (avoiding blurred shadow structures or overexposure and whitening of cement surfaces).
[0094] Subject coverage requirements, including for distant views (overall scene): The main subject of the image patch (such as farmland or construction land) must occupy more than 70% of the frame and include its complete boundaries and surrounding environment (such as roads, waterways, and other landmarks). For example, newly added farmland distant views must fully show the field boundaries and adjacent features (such as protective forests and irrigation canals), avoiding only shooting a part of the scene. For facility-based agricultural land, greenhouses, livestock facilities, and supporting roads must be fully presented, with the facilities occupying ≥70% of the frame.
[0095] Close-up photos (detailed close-ups) subject coverage requirements: Focus on the core features of the land type; the main subject details (such as crop seedlings, building structures) must occupy more than 80% of the image, and the background interference area must be ≤20%. For example, close-ups of cultivated land must clearly show crop roots and soil texture, with leaves or seedlings covering ≥80% of the image.
[0096] Close-up shots of construction sites should highlight the texture of building walls and the structure of doors and windows, with the main body accounting for ≥85% of the total area. Avoid shooting blank areas of the sky or ground.
[0097] Special land use requirements: Newly added arable land: must include the "emerging seedlings" state, with seedlings or crops covering ≥90% of the screen, and the variety (such as corn, wheat) must be identifiable.
[0098] Agroforestry land: Both trees (≤30%) and crops (≥70%) must be photographed simultaneously, and the "agroforestry" attribute must be marked.
[0099] Optimization strategies for special scenarios, complex terrain areas: mountainous areas: the background adopts "diagonal composition", the main body (such as terraced fields) accounts for ≥60%, and includes more than 30% of the mountain outline for positioning.
[0100] Close-up shots should focus on the field ridges and crop roots, accounting for ≥85% of the shot, while avoiding shots of the sky or shaded areas.
[0101] Water area map: The distant view must include the water surface and the surrounding shoreline, accounting for ≥70%, and must show more than 20% of the water flow characteristics (such as ripples).
[0102] Close-up shots must include water quality and aquatic plants, accounting for ≥80% of the shot; shots of reflective or turbid areas are prohibited.
[0103] In practice, Canny, Sobel, and Laplacian algorithms can be used to determine the subject and store the specific subject proportion attributes as basic parameters for automated classification and detection. Among them, the Canny algorithm extracts single-pixel-level edges through Gaussian filtering for noise reduction, gradient calculation, non-maximum suppression, and double threshold connection, which has strong noise resistance and continuous edges.
[0104] Sobel / Laplacian: A first- / second-order differential operator-based algorithm for calculating grayscale gradients, sensitive to regular geometric boundaries (such as building corners) to detect patch boundaries and calculate the proportion of main pixel.
[0105] Furthermore, the labeled historical evidence photos are subjected to standardized preprocessing to achieve standardization of training data.
[0106] For example, the original JPEG files can be converted to Tensor format and uniformly scaled to a 224×224 input size. Color enhancement uses HSV spatial perturbation to adjust brightness, saturation, etc., according to the shooting time period, and establishes a multi-level caching mechanism to ultimately ensure the accuracy of the training dataset.
[0107] Optionally, in some embodiments of this application, when training the initial recognition model, optimizer selection, basic parameter settings, and model initialization can be performed first.
[0108] Among these options, you can select a base optimizer based on the characteristics of the task. For example, you can choose the Adam optimizer as the optimizer for this task. At the same time, you need to manually set the momentum parameter and core parameter settings.
[0109] When setting basic parameters, the following aspects can be included:
[0110] Learning rate (lr): A key hyperparameter controlling the magnitude of parameter updates; an initial value of 0.001 is recommended. In this invention, the learning rate can be appropriately increased during training for image tasks, but should not be increased excessively.
[0111] The moment estimation parameters, betas = (β1, β2), control the exponential decay rate of the first and second moments of the gradient; β1 defaults to 0.9, affecting momentum calculation; β2 defaults to 0.999, controlling the adaptive learning rate adjustment.
[0112] eps = 1e-8: Numerical stability term to prevent division by zero errors; default value is used.
[0113] The initialization of the model can include organizing and classifying historical evidence photos. The classification rules are based on the smallest administrative region of the land survey to divide the area into regions for model training, generating a corresponding set of evidence photos for model training. For details on the regional model, see [link to specific model details]. Figure 3 The system is categorized by region, and a naming format for the generated PTH files is defined, using administrative division codes to ensure the uniqueness of subsequent PTH model files. Furthermore, time variables can be added to increase the granularity of the inference models based on daily changes. Specific region- and time-point-based classification rules are detailed in [link to relevant documentation]. Figure 3 A diagram showing the rules for dividing China by region and time.
[0114] Understandably, after the above operations, the prepared model training data can be imported into the platform to begin model training.
[0115] Specifically, S130 may include the following steps:
[0116] S131, Input the preprocessed historical evidence photos into the constructed initial recognition model, and extract features from the preprocessed historical evidence photos;
[0117] S131, Perform recognition processing on the extracted features and output the corresponding initial recognition result;
[0118] S133, Based on the annotation information and recognition results, update the parameters of the initial recognition model and calculate the loss function;
[0119] S134, Repeat the above training steps according to the set threshold until the loss function meets the set threshold.
[0120] Specifically, in this embodiment of the application, each historical evidence photo in the preprocessed training dataset can first be input into the initial recognition model, so that the initial recognition model can extract features and perform recognition processing on each historical evidence photo, and output the initial recognition result.
[0121] The extracted features can include grayscale values, the proportion of the main subject in the image, etc., which can be used as the basis for inference of land category identification.
[0122] In detail, the extracted photo features include color features, texture features, and spatial features. Specifically, based on the characteristics of the evidence photos in this application, color and texture features are mainly extracted. Color and texture feature extraction requires the use of color histograms, which primarily count the number of pixels of each color in the image. RGB histograms: statistically analyze pixel distribution according to the red, green, and blue channels; HSV histograms: statistically analyze hue, saturation, and value, which better aligns with human color perception. Color moments: describe the statistical characteristics of color distribution using mathematical moments such as mean, variance, and third moment, simplifying calculations. Color sets: quantize the color space into finite "color buckets," using binary vectors to represent whether a certain type of color exists in the image.
[0123] Correspondingly, the application mainly focuses on the identification and segmentation of colors in the evidence photos. By segmenting colors, the proportion of the sky and the ground attachments of the subject in the evidence photo can be extracted to assist in the model classification of the evidence photos.
[0124] Texture feature extraction primarily employs the Gray-Level Co-occurrence Matrix (GLCM): This involves statistically analyzing the frequency of occurrence of two gray-level value pairs with fixed distances and angles in an image to describe the coarseness and directionality of the texture (e.g., horizontal / vertical stripes). Local Binary Pattern (LBP): By comparing the gray-level values of a pixel with its neighboring pixels, a binary code is generated to describe the local texture structure (e.g., facial texture in face recognition). Wavelet Transform: This decomposes the image into sub-bands of different frequencies and directions to extract multi-scale texture features.
[0125] Correspondingly, in this application, the main focus is on classifying the textures in the evidence photos (such as distinguishing between farmland and buildings), and using the extracted texture information as parameters to participate in the model classification.
[0126] In addition, the extracted features can also include sharpness, exposure, and subject proportion, which can be used as a basis for identifying shooting quality.
[0127] Furthermore, the initial identification results are compared with land category labels to determine the current loss function. Then, based on the loss function, the parameters of the initial identification model are updated, and the above process is repeated until the iteration conditions are met, such as satisfying the set loss function threshold.
[0128] In practice, the relevant training can be carried out according to the following steps.
[0129] Each batch requires three steps: gradient zeroing → backpropagation → optimizer.step(), and the actual effective value should be observed with the help of learning rate monitoring tools.
[0130] A hierarchical learning rate strategy was adopted: the initial LR of the backbone network was 0.001, and the classification LR was 0.01. The warm-up phase lasted for 3 epochs; the subsequent training used 30-40 epochs; the gradient clipping threshold was set to 2.0, and the weight decay coefficient was 0.05.
[0131] The batch and epoch values in the inference model training should be set according to the region division of the training inference model and the amount of training data. The setting requirements should reasonably control the performance of the training speedometer model while taking into account the configuration of hardware computing resources.
[0132] The training steps for the recognition model are as follows:
[0133] After training begins, the data and annotation information for each batch are acquired. The training data is imported into the initialized model for inference. The model weights are optimized and updated. The class labels and inference categories after inference for the current batch are obtained. The classification evaluation metric is calculated. The data is tested using the acquired batch data to form an epoch. A validation model file is used for comparative analysis, and the model with the highest validation accuracy is saved as a .pth file. Based on this, 30-40 epochs are designed to be executed for model training to complete the model inference process.
[0134] Furthermore, in some embodiments of this application, in order to improve the accuracy of the target recognition model output, the constructed target recognition model can also be verified.
[0135] For example, the accuracy of the trained model can be verified using the land use change survey data from the previous year that has already been accepted. For land categories with a classification accuracy of less than 80%, the first step of training data preparation and labeling should be repeated, and the model should be retrained to ensure that the trained model achieves a classification accuracy of 85%.
[0136] It is understood that, in order to realize the practical application of the constructed target recognition model in this application embodiment, it needs to be deployed on the terminal device held by the staff who actually go to the site, so as to realize intelligent, real-time and reasonable inference of the collected photos and output accurate recognition results.
[0137] The target recognition model can be in PyTorch, TensorFlow, or MXNet format, and the converted target recognition model can be in ONNX or MindSpore Lite format. The process of converting the target recognition model for each region and time period to obtain the converted target recognition model includes:
[0138] The model loading module uses PyTorch's torch.load function to load pre-trained .pth inference model files;
[0139] Create a virtual tensor that matches the input size of the target recognition model;
[0140] The model transformation is performed using the torch.onnx.export function in PyTorch, generating an inference model file that conforms to the ONNX standard, i.e., an .onnx file.
[0141] Specifically, the results of the inference model are released and deployed according to the regional and time parameters of the training; they are deployed to mobile devices via the mobile Internet, and real-time mobile inference is performed using mobile devices. The inferred data is provided to users for reference, thereby improving the shooting quality of evidence photos and the accuracy of land category determination.
[0142] The basic requirements for the transformation and optimization of inference models are as follows:
[0143] The corresponding inference models undergo format conversion and model optimization. For Android devices, inference models trained on computers, such as PyTorch, TensorFlow, and MXNet, need to be converted to ONNX format. For Huawei HarmonyOS devices, PyTorch, TensorFlow, and MXNet models trained on computers need to be converted to MindSpore Lite inference models. The converted inference models are then optimized for different terminal platforms, based on region and time period.
[0144] The main steps of model conversion based on the Android system are:
[0145] The model loading module uses PyTorch's torch.load function to load pre-trained .pth inference model files;
[0146] The model parameters are loaded into a custom model class instance using the load_state_dict method;
[0147] Calling model.eval sets the model to inference mode;
[0148] The input tensor construction module creates virtual tensors that match the size of the model input.
[0149] Supports dynamic batch dimension settings, with variable dimensions specified via the dynamic_axes parameter;
[0150] It automatically adapts to CPU / GPU devices and selects computing devices based on torch.cuda.is_available. Depending on the hardware configuration of the inference model being converted, it can choose GPU or CPU for inference model conversion.
[0151] The core module for format conversion uses PyTorch's torch.onnx.export() function to perform model conversion;
[0152] Configure the naming conventions for input / output nodes;
[0153] The parameter `export_params` controls whether to export the training parameters.
[0154] The output verification module generates an inference model file conforming to the ONNX standard, i.e., an .onnx file.
[0155] Verify the model's validity using onnx.checker.check_model;
[0156] Transform validated ONNX models using TensorFlow Lite
[0157] Use tf.lite.TFLiteConverter to convert ONNX models to TFLite format.
[0158] Optimization of the converted trained model can be achieved by converting floating-point weights in the model to low-precision integers, such as INT8 or UINT8, for models on different terminals. This can significantly reduce the model size and speed up inference. ONNXRuntime provides quantization tools that support dynamic and static quantization. The model conversion tool conveter_lite in MindSpore Lite integrates post-training quantization functionality, allowing conversion to a quantized model by configuring a quantization configuration file. To ensure efficient model deployment and retrieval, static quantization is used to quantize the converted ONNX model, reducing its size and facilitating rapid deployment and handling situations with highly dynamic inputs.
[0159] Furthermore, regarding the deployment and parameter configuration of inference models on the Android platform...
[0160] Integrate the TensorFlow Lite library into an Android project.
[0161] Model loading parameters:
[0162] Model path: Specifies the storage location of the model files on the Android device. The model files are downloaded to the specified storage location on the Android platform through the inference model deployment and release platform, such as the device's SD card or storage device.
[0163] Runtime options need to be considered:
[0164] Execution Provider: Select the inference hardware engine (such as CPU, GPU, NNAPI, etc.).
[0165] Number of threads: Sets the number of threads used during inference, affecting parallel computing efficiency.
[0166] Memory optimization: Configure memory allocation strategies when loading models, use memory mapping (mmap) to load models, or enable GPU delegation to load computational tasks onto the GPU, reducing CPU memory usage.
[0167] Inference input parameters:
[0168] Input data format: Input real-time data captured by the camera on your Android device in JPG format.
[0169] Preprocessing configuration, image normalization parameters (mean, standard deviation), and size scaling.
[0170] Inference output parameters
[0171] The output node specification specifies the name of the output node for the model inference results and its corresponding dimension.
[0172] Results parsing method, probability value mapping value settings for classification tasks.
[0173] Inference process implementation steps:
[0174] Initialize the inference session, create an ONNX Runtime session, load the model, and configure runtime options.
[0175] Data preprocessing involves preprocessing the data acquired by the Android device (such as images and sensor data) according to the model requirements.
[0176] Input data population converts the preprocessed data into the array format required for model input and passes it into the inference session.
[0177] Perform inference, call the inference interface, and obtain the model output results.
[0178] Post-processing of results involves parsing the inference output and converting it into a format that the application can use, conforming to the evidence classification results and inference confidence levels that can be read by the Android platform.
[0179] Release resources: Release session resources after inference is complete to avoid memory leaks.
[0180] The optimization of the aforementioned inference model by region and time period includes: dividing the land survey into zones based on the smallest administrative region; dividing the zone into time periods according to the planting and production schedule of crops on the ground in the survey area; merging regions with similar climates and areas with similar land cover changes into one region for model base data preparation and training; and dividing the time period based on the seasonal changes of land cover within the region, using the principle of specific patterns in land cover changes to seasonally divide the model training area to ensure the accuracy of the basic model training data.
[0181] It is understood that the identification models constructed through the above embodiments can be deployed on various terminal devices after data format conversion, so that the terminal devices can carry out land survey operations in the field.
[0182] It can also be understood that the identification model deployed on the terminal device may include a category identification sub-model for land use category identification and a quality identification sub-model for quality inspection.
[0183] In some embodiments, the quality identification sub-model can also be trained and constructed based on the aforementioned neural network, that is, the input training dataset includes historical evidence photos of varying quality, so that the quality identification sub-model is embedded in the constructed identification model.
[0184] Alternatively, the aforementioned quality detection algorithm can be directly embedded into the recognition model to achieve automatic detection of the input evidence photos.
[0185] Correspondingly, after deploying the target recognition model on the terminal device, it can be run via a client. Operators can input the acquired target evidence photos through the client's interface, and after recognition is completed, the corresponding recognition results, such as quality and category results, can be displayed on the interface.
[0186] Furthermore, when displaying the quality results, operators can discard the currently collected target evidence photos and retake them based on the quality results; or they can initiate compensation processing for the target evidence photos; or the terminal device can automatically perform compensation processing while outputting the quality results.
[0187] The quality identification result can include whether it is qualified or not, and when it is unqualified, it can also output specific unqualified information, such as the detection results of image sharpness, exposure accuracy and the proportion of the subject in the image.
[0188] In some aspects, after completing the construction of the recognition model through the above steps, this application also provides an AI-based method for recognizing land survey evidence photos, which can be executed by a terminal device.
[0189] The terminal device can be a portable device for operators to use on-site, such as a mobile terminal, and the terminal device is equipped with target recognition models for the corresponding areas according to the work area and time period.
[0190] like Figure 7 As shown, the method specifically includes the following steps:
[0191] S210, Obtain evidence photos of the target in its location.
[0192] S220, Preprocess the photographs used as evidence against the target.
[0193] S230, the target evidence photo that meets the quality requirements is input into the target recognition model constructed by the AI-based land survey evidence photo recognition model construction method in the above embodiments, and the recognition result is output. The recognition result includes the land category and shooting quality category to which the land use status in the target evidence photo belongs, and the area corresponding to the target evidence photo is consistent with the area corresponding to the target recognition model running on it.
[0194] Specifically, in this embodiment, after deploying a target recognition model for a corresponding region and time period on the terminal device, the terminal device can acquire real-time data collected by the terminal camera, i.e., target evidence photos. Then, using the deployed target recognition model, it performs real-time inference calculations on the single frame of data captured, i.e., utilizes the CPU, GPU, and NPU of the terminal hardware device for real-time and rapid inference, ultimately outputting the corresponding recognition result representing the land category. The inference result is dynamically labeled according to the percentage of classification confidence, and the labeling is displayed in real-time on the terminal operation interface, such as the real-time shooting interface of the APP corresponding to the target recognition model. Figure 8 , Figure 9 , Figure 10 and Figure 11 As shown.
[0195] In addition, before outputting the category recognition results, the quality recognition sub-model in the target recognition model can be used to identify and detect the quality of the target evidence photos, and output the corresponding quality recognition results. This can remind the operators to retake the photos or start image processing to overcome quality defects.
[0196] Correspondingly, when operators actually use it, they input the target evidence photo data into the target recognition model for image classification to obtain the evidence photo classification results, which are then used by field personnel to refer to and judge the content of the photos.
[0197] In addition, to improve the accuracy of identification, operators can also confirm and correct the output results in the operation interface of the terminal evidence APP, such as by using the land category selector.
[0198] Meanwhile, the app records the inference results of the real-time inference model and related captured data, including capture time, capture location, capture angle and other relevant information.
[0199] In this embodiment of the application, for the recognition model constructed by computer equipment, the ONNX model or MindSpore Lite model used for mobile deployment after format conversion, the relevant photo data of the evidence is obtained by the camera sensor of the mobile terminal and real-time reasoning is performed. The recognition result is output according to the classification index, and the output result includes whether the evidence photo is qualified.
[0200] This involves outputting the classification of evidence photos and the probability of classification inference. The classification is based on the technical regulations for land change surveys, divided into three levels of land categories. The first level includes three main categories: agricultural land, construction land, and unused land. The second level further subdivides agricultural land into cultivated land, forest land, grassland, orchards, and other agricultural land, while construction land is divided into residential land and transportation land. Unused land is divided into water areas and water conservancy facilities, and other land. The third level further refines the classification based on the second level. Agricultural land can be divided into paddy fields, dry land, arbor forests, and shrub forests, while construction land can be divided into rural homesteads, highway land, and railway land. Unused land can be divided into river surfaces, bare land, and sandy land.
[0201] According to the specific requirements for taking evidence photos in the land change survey, the classification of the photographed content must be directly classified into the third-level land category. In this invention, the reasoning and classification index of land categories are trained according to the third-level land category.
[0202] The system performs real-time annotation on the terminal device based on the inference model and prompts the user to select a land type. At the same time, a warning message is displayed when the user's selected land type differs significantly from the predicted land type.
[0203] Optionally, in some embodiments of this application, after completing the above-mentioned identification and processing of the target evidence photos, it is also necessary to upload the collected target evidence photos and identification results to the backend server.
[0204] That is, the method also includes:
[0205] The evidence photo of the target and the recognition result are sent to the server, so that the server can use the received evidence photo of the target and the recognition result to update the parameters of the target recognition model in batches.
[0206] Specifically, during the field evidence collection process, the classification results of the terminal's real-time reasoning are recorded and can be transmitted to the backend database according to the set sending method, such as centralized batch transmission. After the land change survey work of this year is completed, the backend database will automatically analyze and judge the real-time reasoning results and the final survey results. By sorting out the evidence photos with discrepancies, the training set results in the corresponding area will be updated according to the set cycle to continuously train the reasoning model, correct the accuracy of the reasoning model, and improve the usability of the reasoning model.
[0207] Optionally, in some embodiments of this application, the deployment of the target recognition model can be achieved through data interaction between the terminal device and the server.
[0208] That is, the terminal device can send a target recognition model request message to the server based on its location and time period. The target recognition model request message includes the location and time period information; and then receive the target recognition model returned by the service center based on the location and time period.
[0209] Specifically, the automatic deployment and training method for the evidence photo classification reasoning model includes reasoning model libraries for different geographical locations, establishing different reasoning models according to the smallest administrative unit of the land change survey, and differentiating the reasoning models within the smallest administrative unit area according to the time periods of daily and annual changes. The time segmentation principle is based on the regular crop production time and cultivation time period within the survey area. At the same time, the evidence shooting location is obtained, and the reasoning model with the closest time period at the nearest location is queried and downloaded to the mobile terminal for deployment.
[0210] The automatic deployment and training method for the evidence photo classification reasoning model includes the initial division and setting of the training data area, and the organization and labeling of historical evidence data.
[0211] The annotation of historical evidence data includes marking the land categories of the accepted evidence photos, as well as annotation and organization based on the smallest administrative region of the land change survey as the basic statistical summary unit. During the organization process, the training data is divided into time periods according to the characteristics of the region. In particular, specific time periods are divided and trained for special land cover conditions in different regions to avoid the training data failing to distinguish the corresponding regional characteristics.
[0212] The characteristics of land use in different regions are relatively consistent. By cross-testing regional evidence data with training models based on the smallest regional unit, training models in the same region can be effectively merged. By adopting the cross-validation mode of training models in adjacent regions, regional merging can be carried out. After ensuring the inference credibility of the inference model, the model regions can be merged to form a new regional model data result, reducing the number of inference models.
[0213] This method utilizes automated inference model retrieval and deployment techniques based on the location and time of evidence photography. After establishing a regional inference model library, it can automatically match terminal inference models to the library based on the terminal's shooting location. It also queries the inference model within the region and the inference model closest to the shooting time period based on the evidence photo's shooting time and location.
[0214] The system automatically matches the terminal device via the network. Furthermore, when the terminal device changes its region, the terminal device APP needs to set the automatic location detection for the first time it is opened. It also needs to check whether the inference model is correct. If the inference model is incorrect for the location, it needs to be updated according to the correct location inference model.
[0215] This is understandable. To make it easier to understand, we will use actual operation as an example to explain in detail below.
[0216] For example, the specific implementation steps are as follows:
[0217] Camera and model initialization:
[0218] Camera configuration, requesting camera permissions, initializing the camera, setting appropriate preview resolutions such as 1280×720 to adapt to various hardware devices, and configuring image formats to adapt to the input requirements of the prediction model.
[0219] Load the inference model, selecting a converted lightweight inference model (such as ONNX or MindSpore Lite inference model) to meet real-time requirements. Load the converted inference model using frameworks such as TensorFlow Lite or ONNX Runtime. Initialize the model's input and output tensors, and configure the number of threads and computing device (CPU / GPU / NPU) for the mobile terminal.
[0220] Real-time inference process:
[0221] Image preprocessing involves acquiring preview frames from the camera, converting them to the model input format (JPG), and adjusting the image size to match the model input requirements.
[0222] Model inference end:
[0223] The preprocessed image is input into the model to perform inference. The inference frequency is controlled at 20fps based on hardware performance to avoid excessive consumption of mobile terminal resources.
[0224] Use asynchronous threads to perform inference calculations to prevent blocking the UI thread.
[0225] Post-processing analysis:
[0226] The analytical reasoning model outputs the probability values of the evidence categories.
[0227] The model output probability values are mapped to the camera preview coordinate system.
[0228] Annotation rendering implementation:
[0229] Create a label layer and overlay a transparent view on top of the camera preview layer to draw the labels, keeping the coordinate system of the label layer consistent with that of the preview layer.
[0230] Draw the labeled content and draw the reasoning results based on the reasoning information output by the reasoning model.
[0231] Labels and confidence scores are displayed above the bounding box, showing the category name and confidence score.
[0232] It is understandable that the neural network model described in this application utilizes the evidence photos from land change surveys over the years, and uses the basic administrative regions of the land change survey as the basic reasoning model units. The main reason for this is that the land change survey is a nationwide, unified survey conducted at a specific time. Due to the different landforms and climates across the country, the field evidence photos show significant seasonal and climatic differences. For example, in southern regions, there is still vegetation growing on the ground, while in northern regions, there is no vegetation growing at the same time. Due to climatic differences, even in the south, the types of vegetation growing on the ground exhibit obvious regional characteristics. To improve the accuracy of artificial intelligence classification and ensure the accuracy of land category identification, it is necessary to train the reasoning model for different regions.
[0233] This application uses information from historical evidence photos from land change surveys to train the corresponding inference model for the survey area. The model training partitions and data volume are optimized according to the survey area and the number of historical evidence photos to ensure both the efficiency of inference model training and the rationality of the training area division. If the number of historical evidence photos is too large and the inference model training efficiency is reduced, the area needs to be split.
[0234] Land change surveys involve routine change investigations, and the time for evidence collection and photography is often scattered throughout the year. Therefore, it is necessary to divide the inference model according to seasonal time periods. In particular, for land types such as cultivated land and orchards with vegetation, the photography time parameter should be added to divide the inference model, and models should be established for different seasons.
[0235] On the other hand, this application also provides an AI-based land survey evidence photo recognition model construction device, which includes:
[0236] The acquisition module is used to acquire the training dataset, which includes historical evidence photos collected from various regions and time periods.
[0237] The preprocessing module is used to preprocess each historical evidence photo in the training dataset;
[0238] A construction module is used to train an initial recognition model using the preprocessed historical evidence photos to obtain target recognition models corresponding to each region and time period. The target recognition model includes a quality recognition sub-model and a category recognition sub-model. The target recognition model is deployed to each terminal device so that when the terminal device runs the target recognition model, it recognizes and processes the collected target evidence photos and outputs the recognition results. The recognition results indicate the shooting quality category and land use classification category of the target evidence photo. The region corresponding to the target evidence photo collected by the terminal device is consistent with the region corresponding to the target recognition model running on it.
[0239] Optionally, in some embodiments of this application, the preprocessing module is specifically used for:
[0240] The historical evidence photos are categorized by land use and labeled with their shooting quality.
[0241] Standardize the processing of labeled historical evidence photos.
[0242] Optionally, in some embodiments of this application, the construction module is specifically used for:
[0243] The preprocessed historical evidence photos are input into the constructed initial recognition model to extract features from the preprocessed historical evidence photos.
[0244] The extracted features are processed for recognition, and the corresponding initial recognition results are output.
[0245] Based on the annotation information and recognition results, the parameters of the initial recognition model are updated, and the loss function is calculated;
[0246] Repeat the above training steps according to the set threshold until the loss function meets the set threshold.
[0247] Optionally, in some embodiments of this application, the device further includes:
[0248] The format conversion module is used to convert the target recognition model for each region and time period to obtain the target recognition model after format conversion.
[0249] The deployment module is used to deploy the format-converted target recognition model to the corresponding terminal devices based on regional and time information.
[0250] Optionally, in some embodiments of this application, the target recognition model is in PyTorch, TensorFlow, or MXNet format, and the converted target recognition model is in ONNX or MindSpore Lite format. The format conversion module is specifically used for:
[0251] The model loading module uses PyTorch's torch.load function to load pre-trained .pth inference model files;
[0252] Create a virtual tensor that matches the input size of the target recognition model;
[0253] The model transformation is performed using the torch.onnx.export function in PyTorch, generating an inference model file that conforms to the ONNX standard, i.e., an .onnx file.
[0254] On the other hand, this application also provides an AI-based land survey evidence photo recognition device, which includes:
[0255] The acquisition module is used to acquire evidence photos of the target in its area.
[0256] The preprocessing module is used to preprocess the target evidence photos;
[0257] The identification module is used to input the target evidence photo that meets the quality requirements into the target identification model constructed by the AI-based land survey evidence photo identification model construction method described in the above embodiment, and output the identification result. The identification result includes the land use classification category and shooting quality category of the land in the target evidence photo. The area corresponding to the target evidence photo is consistent with the area corresponding to the target identification model running on it.
[0258] Optionally, in some embodiments of this application, the device further includes:
[0259] The first sending module is used to send a target recognition model request message to the server according to the region and time period.
[0260] The receiving module is used to receive the target recognition model returned by the service center based on the region and time period.
[0261] Optionally, in some embodiments of this application, the device further includes:
[0262] The second sending module is used to send the target evidence photo and the recognition result to the server, so that the server uses the received target evidence photo and the recognition result to update the parameters of the target recognition model according to a set period.
[0263] In one exemplary embodiment, a processing device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 12 As shown, the processing device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores evidence photos and their tag data. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an AI-based method for constructing a land survey evidence photo recognition model or an AI-based method for recognizing land survey evidence photos.
[0264] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the processing device to which the present application is applied. The specific processing device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0265] In one exemplary embodiment, a processing device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0266] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0267] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0268] It is understood that this application provides an AI-based method, recognition method, and device for constructing a land survey evidence photo recognition model. It acquires historical evidence photos from various regions and time periods as a training dataset, preprocesses these historical photos, and then trains an initial recognition model using these preprocessed historical photos. Finally, it constructs target recognition models corresponding to each region and time period. The constructed target recognition model includes a category recognition sub-model for land use category identification and a quality recognition sub-model for photo quality identification. This target recognition model can be deployed on a terminal device after format conversion, allowing personnel to run the target recognition model on the terminal device during land survey operations. This enables the model to identify the quality and land use category of the collected evidence photos and output the identification result representing the land use category, ultimately achieving efficient and accurate land survey evidence results. This involves using a target recognition model deployed on terminal devices to process and classify the collected evidence photos. This addresses the issue of inconsistent skill levels among field personnel during land survey evidence collection, which often leads to inaccurate land classification and low-quality photos. Furthermore, AI technology is used to assist in land classification identification and real-time quality assessment of evidence photos during the evidence collection process. This helps improve the overall quality of evidence photos, enhances the comprehensive organization of land change survey results, and effectively guides subsequent land survey evidence collection work.
[0269] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0270] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0271] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for constructing an AI-based land survey evidence photo recognition model, characterized in that, The method includes: Obtain a training dataset, which includes historical evidence photos collected from various regions and time periods; Preprocess each historical evidence photo in the training dataset; Using the preprocessed historical evidence photos, the constructed initial recognition model is trained to obtain target recognition models corresponding to each region and time period. The target recognition model includes a quality recognition sub-model and a category recognition sub-model. The target recognition model is deployed to each terminal device so that when the terminal device runs the target recognition model, it recognizes and processes the collected target evidence photos and outputs the recognition results. The recognition results indicate the shooting quality category and land use classification category of the target evidence photo. The region corresponding to the target evidence photo collected by the terminal device is consistent with the region corresponding to the target recognition model running on it.
2. The method for constructing an AI-based land survey evidence photo recognition model according to claim 1, characterized in that, The preprocessing of each historical evidence photo in the training dataset includes: The historical evidence photos are categorized by land use and labeled with their shooting quality. Standardize the processing of labeled historical evidence photos.
3. The method for constructing an AI-based land survey evidence photo recognition model according to claim 1, characterized in that, The step of training the initial recognition model based on a neural network using the preprocessed historical evidence photos includes: The preprocessed historical evidence photos are input into the constructed initial recognition model to extract features from the preprocessed historical evidence photos. The extracted features are processed for recognition, and the corresponding initial recognition results are output. Based on the annotation information and recognition results, the parameters of the initial recognition model are updated, and the loss function is calculated; Repeat the above training steps according to the set threshold until the loss function meets the set threshold.
4. The method for constructing an AI-based land survey evidence photo recognition model according to claim 1, characterized in that, After training an initial recognition model based on a neural network using the preprocessed historical evidence photos to obtain target recognition models for each region and time period, the method further includes: The target recognition models for each region and time period are converted to obtain the target recognition models after format conversion; Based on regional and time information, the target recognition model with the converted format is deployed to the corresponding terminal devices.
5. The method for constructing an AI-based land survey evidence photo recognition model according to claim 4, characterized in that, The target recognition model is in PyTorch, TensorFlow, or MXNet format, and the converted target recognition model is in ONNX or MindSpore Lite format.
6. The method for constructing an AI-based land survey evidence photo recognition model according to claim 5, characterized in that, The process of converting the target recognition model for each region and time period to obtain the converted target recognition model includes: The model loading module uses PyTorch's torch.load function to load pre-trained .pth inference model files; Create a virtual tensor that matches the input size of the target recognition model; The model transformation is performed using the torch.onnx.export function in PyTorch, generating an inference model file that conforms to the ONNX standard, i.e., an .onnx file.
7. A method for recognizing evidence photos from a land survey based on AI, characterized in that, The method includes: Obtain evidence photos of the target in its location; The target evidence photos are preprocessed; The target evidence photo that meets the quality requirements is input into the target recognition model constructed by the AI-based land survey evidence photo recognition model construction method as described in any one of claims 1-6, and the recognition result is output. The recognition result includes the land use classification category and shooting quality category of the land in the target evidence photo, and the area corresponding to the target evidence photo is consistent with the area corresponding to the target recognition model running on it.
8. The AI-based land survey evidence photo recognition method according to claim 7, characterized in that, Before obtaining the target evidence photographs of its location, the method further includes: Based on the location and time period, a target recognition model request message is sent to the server, the target recognition model request message including the location and time period information; The receiving server returns the target recognition model based on the location and time period information.
9. The AI-based land survey evidence photo recognition method according to claim 7, characterized in that, After identifying and processing the target evidence photograph, the method further includes: The target evidence photo and the recognition result are sent to the server, so that the server uses the received target evidence photo and the recognition result to update the parameters of the target recognition model according to the set period.
10. A processing apparatus, characterized in that, The processing device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the method as described in any one of claims 1-9.