Road recognition method and device, computer equipment and storage medium
By preprocessing road sample data and training and optimization of neural network models, the problem of low road recognition accuracy in complex environments is solved, high-precision and high-root road recognition are achieved, and the safety of travel for the elderly is improved.
Patent Information
- Application Number
- CN202510342642.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, road identification technology has low recognition accuracy in complex environments, affecting the safety of travel for the elderly.
By obtaining normal road sample data for preprocessing, establishing a neural network model and training, obtaining test sample data for optimization, and finally inputting the optimized model to be identified to obtain road recognition results.
It effectively improves the accuracy and robustness of end-side road identification, especially in complex and dynamic road environments, providing timely and accurate navigation tips to improve travel safety for the elderly.
Smart Images

Figure CN120147993A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of intelligent decision-making, road recognition, and medical health, and particularly relates to a road recognition method, device, computer device, and storage medium. Background Art
[0002] In the medical system for the safe travel of the elderly based on AR devices, road recognition is one of the core technologies to ensure the safe travel of the elderly. During the travel of the elderly, road recognition technology can help the system automatically identify various road features, such as driving lanes, marking lines, traffic signs, intersections, etc. This information can be transmitted to the AR device in a timely manner so that the elderly can obtain real-time navigation prompts and safety warnings, avoiding dangers caused by visual impairments or unfamiliar environments. In addition, in some fintech smart city scenarios, road recognition by AR devices is particularly important.
[0003] By integrating large model enhancement technology, the system can efficiently identify the surrounding road environment and provide accurate navigation support for the elderly. Especially in complex urban environments, the elderly may be interfered by multiple information such as road signs, traffic facilities, and obstacles. Therefore, how to accurately perform road recognition is an important challenge for improving safety.
[0004] However, the complex road environment and dynamic changing scenarios pose great challenges to road recognition. For example, under different weather and lighting conditions, or in complex traffic environments, traditional road recognition technologies may encounter difficulties, resulting in reduced recognition accuracy and affecting the safety of the elderly's travel. Summary of the Invention
[0005] The purpose of the present invention is to overcome the above technical deficiencies, and provide a road recognition method, device, computer device, and storage medium applicable to the medical and health field, so as to solve the technical problem that the road recognition technology in the prior art has a low recognition accuracy in complex environments.
[0006] To achieve the above technical purpose, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a road recognition method, including the following steps:
[0008] Obtain normal road sample data, and preprocess the normal road sample data to obtain a training data set;
[0009] Use the training data set to train a pre-established neural network model to obtain a road recognition model for identifying and positioning road elements;
[0010] Obtain test sample data, and preprocess the test sample data to obtain a test data set, where the test data set includes complex road environments and specific road features;
[0011] Input the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set;
[0012] Obtain the road data to be recognized, and input the road data to be recognized into the optimized road recognition model to obtain a road recognition result.
[0013] In some embodiments, the obtaining of normal road sample data and preprocessing of the normal road sample data to obtain a training data set includes:
[0014] Obtain normal road sample data and perform a scaling operation on the normal road sample data;
[0015] After performing image enhancement processing on the scaled normal road sample data, use the data after image enhancement processing as the training data set, where the image enhancement processing includes at least one of brightness adjustment, contrast adjustment, and pixel normalization.
[0016] In some embodiments, the training of a pre-established neural network model using the training data set to obtain a road recognition model for identifying and locating road elements includes:
[0017] Input the test sample data into the pre-established neural network model to train the neural network model;
[0018] Calculate the loss value of the neural network model;
[0019] Based on the loss value of the neural network model, optimize the neural network model to obtain the road recognition model.
[0020] In some embodiments, the optimizing of the neural network model based on the loss value of the neural network model to obtain the road recognition model includes:
[0021] Obtain the original weights and learning rate of the neural network model;
[0022] Based on the original weights, learning rate of the neural network model, and the loss value of the neural network, optimize the original weights of the neural network model;
[0023] Based on the optimized original weights, optimize the neural network model to obtain the road recognition model.
[0024] In some embodiments, inputting the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set includes:
[0025] Input the test sample data set into the road recognition model to obtain a model recognition result;
[0026] Based on the road recognition result and the result pre-annotated in the test sample data, perform an optimization process on the model recognition model.
[0027] In some embodiments, the performing an optimization process on the model recognition model based on the road recognition result and the result pre-annotated in the test sample data includes:
[0028] Compare the road recognition result with the result pre-annotated in the test sample data to determine whether the accuracy rate of the road recognition result reaches a preset value;
[0029] When the accuracy rate of the road recognition result does not reach the preset value, adjust the model parameters of the road recognition model until the road recognition result reaches the preset value, and use the road recognition model with the finally adjusted parameters as the optimized model.
[0030] In some embodiments, the obtaining the road data to be recognized and inputting the road data to be recognized into the optimized road recognition model to obtain a road recognition result includes:
[0031] Obtain the road data to be recognized and input the road data to be recognized into the optimized road recognition model to identify road features;
[0032] Compare the road features with the saved normal road samples to confirm the current road environment;
[0033] When the road features match the saved normal road samples, determine that the road is normal and output navigation instruction information, otherwise issue an alarm prompt information.
[0034] In a second aspect, the present invention further provides a road recognition device, including:
[0035] A training data set acquisition module, configured to acquire normal road sample data and preprocess the normal road sample data to obtain a training data set;
[0036] A training module, configured to train a pre-established neural network model using the training data set to obtain a road recognition model for recognizing and positioning road elements;
[0037] A test data set acquisition module, configured to acquire test sample data, and preprocess the test sample data to obtain a test data set, where the test data set includes a complex road environment and specific road features;
[0038] An optimization module, configured to input the test sample data set into the road recognition model to optimize the road recognition model by using the test sample data set;
[0039] An identification module, configured to acquire road data to be identified, and input the road data to be identified into the optimized road recognition model to obtain a road recognition result.
[0040] In a third aspect, the present invention further provides a computer device, including a memory and a processor, where computer-readable instructions are stored in the memory, and when the processor executes the computer-readable instructions, the steps of the road recognition method described above are implemented.
[0041] In a fourth aspect, the present invention further provides a computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the steps of the road recognition method described above are implemented.
[0042] Compared with the prior art, for the road recognition method, device, computer device and storage medium provided by the present invention, first, normal road sample data is acquired, and the normal road sample data is preprocessed to obtain a training data set; then the training data set is used to train a pre-established neural network model to obtain a road recognition model for identifying and positioning road elements; then test sample data is acquired, and the test sample data is preprocessed to obtain a test data set, where the test data set includes a complex road environment and specific road features; then the test sample data set is input into the road recognition model to optimize the road recognition model by using the test sample data set; finally, road data to be identified is acquired, and the road data to be identified is input into the optimized road recognition model to obtain a road recognition result. The present invention can effectively improve the accuracy and robustness of road recognition at the edge side. Especially in a complex and dynamic road environment, timely and accurate navigation prompts are provided to help the elderly safely avoid potential traffic risks. This technology can significantly improve the travel safety of the elderly and reduce accidental risks caused by missing or incorrect identification of road environment information. Description of the Drawings
[0043] To more clearly illustrate the solutions in the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.
[0044] Figure 1 is an exemplary system architecture diagram to which the present invention can be applied;
[0045] Figure 2 is a flowchart of an embodiment of the road recognition method according to the present invention;
[0046] Figure 3 is Figure 2 a flowchart of a specific embodiment of the shown step S100;
[0047] Figure 4 is Figure 2 a flowchart of a specific embodiment of the shown step S200;
[0048] Figure 5 is Figure 2 a flowchart of a specific embodiment of the shown step S300;
[0049] Figure 6 is Figure 2 a flowchart of a specific embodiment of the shown step S400;
[0050] Figure 7 is Figure 2 a flowchart of a specific embodiment of the shown step S500;
[0051] Figure 8 is a schematic structural diagram of an embodiment of the road recognition device according to the present invention;
[0052] Figure 9 is a schematic structural diagram of an embodiment of the computer device according to the present invention;
[0053] Figure 10 is a schematic structural diagram of another embodiment of the computer device according to the present invention. Detailed Embodiments
[0054] In order to make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0055] References to "embodiments" in this specification mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the invention. The phrase occurs in various places in the specification and is not necessarily referring to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will understand explicitly and implicitly that the embodiments described herein can be combined with other embodiments.
[0056] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0057] The road recognition method provided by the embodiments of the present invention can be applied in an application environment such as Figure 1 where the client communicates with the server through a network. The server can obtain normal road sample data through the client, preprocess the normal road sample data to obtain a training data set; use the training data set to train a pre-established neural network model to obtain a road recognition model for identifying and locating road elements; obtain test sample data, preprocess the test sample data to obtain a test data set, where the test data set includes complex road environments and specific road features; input the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set; obtain road data to be recognized, input the road data to be recognized into the optimized road recognition model to obtain a road recognition result, and feedback the result to the client. In the present invention, the accuracy and robustness of end-side road recognition can be effectively improved, especially in complex and dynamic road environments, providing timely and accurate navigation prompts to help the elderly safely avoid potential traffic risks. This technology can significantly improve the travel safety of the elderly and reduce accidental risks caused by missing or incorrect road environment information. Among them, the client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers. The present invention will be described in detail below through specific embodiments.
[0058] It should be understood that Figure 1 the numbers of the terminal devices, networks, and servers in
[0059] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers.
[0059] Please refer to Figure 2 which Figure 2 shows a flowchart of an embodiment of the road recognition method according to the present invention, including steps S100 to S500.
[0060] It should be noted that the method described in the present invention can be applied in the fields of medical health or finance. For example:
[0061] In the field of medical health, the road recognition method described in the present invention can be carried on an AR device for medical use. For patients who are blind or have eyes in the recovery period, through AR technology, road information and navigation arrows and other markings are superimposed in real time in the patient's field of vision to help the patient clarify the walking direction. Especially in complex hospital environments or outdoor scenes, it ensures that the patient can accurately find the destination. By using the camera and sensors of the AR device, information such as road conditions and obstacles can be detected and highlighted in the patient's field of vision in the form of graphics, colors, etc., enabling the patient to perceive potential dangers in advance, such as potholes, steps, vehicles, etc., so as to better plan their walking route and avoid falling or collision. For patients with cognitive impairment or memory loss, the AR device can display relevant prompt information on the road, such as department names, ward numbers, etc., to help the patient recall their destination and walking path and improve their ability to move independently. Medical staff can remotely monitor the patient's location and walking status through a system connected to the AR device, detect abnormal situations in time and intervene. At the same time, voice or text instructions can also be sent to the patient to provide further assistance and guidance. The AR device can be integrated with the hospital's electronic medical record system, medical equipment, etc. When the patient approaches a specific medical area, relevant medical treatment information, inspection reports, etc. will automatically pop up, which is convenient for the patient to understand their condition and treatment progress and also helps medical staff better serve the patient. For patients undergoing rehabilitation training, the AR device can set virtual training goals and tasks on the road to guide the patient to complete training items such as walking and running, and through real-time feedback and evaluation, help the patient improve their motor ability and balance ability.
[0062] In the field of finance, the road recognition method described in the present invention can be carried on a smart city platform to analyze the image of the road and identify the boundaries of the road, lane lines, traffic signs, etc. For example, by detecting information such as the color and edges of the lane lines, the driving trajectory of the vehicle and the traffic rules of the road are determined. Various traffic signs and markings on the road, such as speed limit signs, stop signs, zebra crossings, etc., can also be recognized to provide support for smart city travel.
[0063] S100. Obtain normal road sample data, and preprocess the normal road sample data to obtain a training data set.
[0064] In this embodiment, the normal road sample data can be sample data of various normal road scenarios. For example, sample data containing markers such as driving lanes, marking lines, traffic lights, and road signs can be directly obtained from the road sample dataset. Then, the road features are marked through manual annotation. After that, the marked data is preprocessed to provide standardized data for the subsequent training of the model.
[0065] S200. Use the training dataset to train the pre-established neural network model to obtain a road recognition model for identifying and locating road elements.
[0066] In this embodiment, the collected normal road sample data is used to train the artificial intelligence model to learn the feature representation of the road environment, especially the positioning and recognition of road elements (such as lane lines, markers, traffic signals, etc.). When the system encounters a similar road environment, it can accurately identify and give corresponding navigation guidance.
[0067] S300. Obtain the test sample data, and preprocess the test sample data to obtain a test dataset, where the test dataset includes complex road environments and specific road features.
[0068] In this embodiment, the test sample data is different from the normal sample data. It is test data containing complex scenarios (such as road environments under different weather and different lighting conditions) and specific road features (such as damaged road signs, obstacles, etc.). It can be directly obtained from the road sample dataset. Then, the complex environment and specific road features are marked through manual annotation. After that, the marked data is preprocessed to provide test samples for further optimizing the model.
[0069] S400. Input the test sample dataset into the road recognition model to optimize the road recognition model using the test sample dataset.
[0070] In this embodiment, test data containing complex scenarios (such as road environments under different weather and different lighting conditions) and specific road features (such as damaged road signs, obstacles, etc.) is collected, and these data are marked and preprocessed to provide test samples for further optimizing the model. Then, the test samples are input into the trained artificial intelligence model for the recognition and analysis of road features. By comparing the features of the test samples with the saved normal road samples, the current road environment is confirmed. If the test sample conforms to the known road features, it is considered a normal road; if abnormalities are found, such as missing markings or misaligned signs, the system will give a real-time warning to remind the elderly to pay attention and avoid.
[0071] S500. Obtain the road data to be recognized, and input the road data to be recognized into the optimized road recognition model to obtain a road recognition result.
[0072] In this embodiment, after the model optimization is completed, the road recognition result can be directly obtained through the road recognition model. When the system encounters a similar road environment, it can accurately recognize and give corresponding navigation guidance.
[0073] In the embodiment of the present invention, first, normal road sample data is obtained, and the normal road sample data is preprocessed to obtain a training data set; then, the training data set is used to train a pre-established neural network model to obtain a road recognition model for identifying and positioning road elements; then, test sample data is obtained, and the test sample data is preprocessed to obtain a test data set, where the test data set includes complex road environments and specific road features; then, the test sample data set is input into the road recognition model to optimize the road recognition model using the test sample data set; finally, the road data to be recognized is obtained, and the road data to be recognized is input into the optimized road recognition model to obtain a road recognition result. The present invention can effectively improve the accuracy and robustness of end-side road recognition, especially in complex and dynamic road environments, provide timely and accurate navigation prompts, and help the elderly safely avoid potential traffic risks. This technology can significantly improve the travel safety of the elderly and reduce accidental risks caused by missing or incorrect road environment information.
[0074] In some embodiments, refer to Figure 3 , the step S100 specifically includes:
[0075] S110. Obtain normal road sample data and perform a scaling operation on the normal road sample data;
[0076] S120. After performing image enhancement processing on the scaled normal road sample data, use the data after image enhancement processing as the training data set, where the image enhancement processing includes at least one of brightness adjustment, contrast adjustment, and pixel normalization.
[0077] In this embodiment, first, road data (such as road images, video frames, or sensor data) x orig is collected, and then a scaling operation is performed on each frame to ensure that the data adapts to the model input requirements. Finally, the contrast of the image is adjusted to enhance road features and details and improve the recognition accuracy. The video data after preprocessing is represented by x pre . Among them, the image enhancement processing methods include brightness adjustment, contrast adjustment, pixel normalization, etc. Among them, one of brightness adjustment and contrast adjustment is selected.
[0078] Brightness adjustment formula: I′ = I g ,
[0079] I′ is the pixel value of the new image, I is the pixel value of the original image, and g is gamma. If g is greater than 1, the new image is darker than the original image. If g is less than 1, the new image is brighter than the original image. According to experience, the value range of g is generally between 0.5 and 2.
[0080] Contrast adjustment formula: I′ = log(I),
[0081] I′ is the pixel value of the new image, and I is the pixel value of the original image.
[0082] In some embodiments, please refer to Figure 4 , the step S200 specifically includes:
[0083] S210. Input the test sample data into a pre-established neural network model and train the neural network model;
[0084] S220. Calculate the loss value of the neural network model;
[0085] S230. Optimize the neural network model based on the loss value of the neural network model to obtain the road recognition model.
[0086] In this embodiment, first, the pre-processed road data is input into the network, and the loss value of the network is calculated. Among them, the loss function of the network is as follows:
[0087]
[0088] Among them, α i is a hyperparameter used to adjust the weight W of the newly added network unit i of i is the number of steps for adding new network units, which is generally set to 3.
[0089] After obtaining the loss value of the network, the trained network is optimized through the loss value of the network, and then a road recognition model capable of recognizing road environment features is obtained. When the system encounters a similar road environment, it can accurately recognize and give corresponding navigation guidance.
[0090] In some embodiments, the step S230 specifically includes:
[0091] Obtain the original weight and learning rate of the neural network model;
[0092] Optimize the original weight of the neural network model based on the original weight, learning rate of the neural network model, and the loss value of the neural network;
[0093] Optimize the neural network model based on the optimized original weight to obtain the road recognition model.
[0094] In this embodiment, it is assumed that the weights of the original network are The weights of the newly added network units are The learning rate is η (usually set to 0.001). The network can be optimized using the original weights and the loss value. Specifically, the optimization formula is as follows:
[0095]
[0096] In this embodiment, the micro model is enhanced by inserting it into a larger model, sharing weights and gradients; in addition to working independently, the micro model becomes a sub-model of the larger model. It can be regarded as a reverse form of dropout because in the present invention, the target model is extended rather than shrunk. During the training process, NetAug adds gradients from the larger model to the micro model as additional training supervision. During the testing phase, only the micro model is used for inference, thus not adding additional overhead.
[0097] It should be noted that large model enhancement refers to improving the performance and functions of large language models through various technical means to better meet the actual application requirements. The following are some common large model enhancement methods:
[0098] Retrieval-Augmented Generation (RAG):
[0099] Principle: Combining information retrieval technology with large language models enables the model to search for relevant information from external knowledge sources when answering questions or generating content, and integrate this information into the answer, thus providing more accurate and richer content.
[0100] Advantages: It makes up for the limitations of the knowledge of large models, enabling them to obtain real-time, non-public or offline data; improves the accuracy and reliability of answers and reduces the occurrence of hallucination problems.
[0101] Application cases: For example, the retrieval-augmented large language model based on density peak clustering proposed by Liu Bing et al. improves the performance of the model in zero-shot and few-shot learning scenarios by introducing prior knowledge to guide the retrieval process.
[0102] Fine-Tuning:
[0103] Principle: Based on a pre-trained large model, specific domain data is used for secondary training to enable the model to better adapt to the tasks and data distributions in this domain, thereby improving its performance in this domain.
[0104] Advantages: It can be optimized for specific application scenarios, improving the accuracy and efficiency of the model in specific tasks; it can utilize existing large model parameters and knowledge, reducing the consumption of training time and computing resources.
[0105] Application cases: In the fields of healthcare, finance, etc., by fine-tuning large models, they can better understand professional terms and handle related business issues.
[0106] Reinforcement learning:
[0107] Principle: By allowing the large model to continuously try different behaviors in an environment and adjusting the model's parameters according to the feedback results (rewards or punishments) of the behaviors, the model can learn the optimal behavior strategy.
[0108] Advantages: It can improve the decision-making ability and adaptability of large models, enabling them to make better choices in complex environments; it can automatically discover and learn more effective solutions without manual rule design.
[0109] Application cases: In the fields of games, robot control, etc., reinforcement learning can help large models learn how to take optimal actions to achieve goals.
[0110] Knowledge graph injection:
[0111] Principle: Incorporate the structured knowledge in the knowledge graph into the large model, enabling the model to better understand and reason about complex relationships and concepts. The knowledge graph stores a large amount of entities and relationships in a graph structure, providing rich semantic information for the large model.
[0112] Advantages: Enhance the knowledge representation and reasoning ability of large models, improving the model's understanding and answering ability for complex problems; it can enable the model to better handle tasks with clear logical relationships, such as fact query and reasoning in question answering systems.
[0113] Application cases: In intelligent customer service, intelligent recommendation and other systems, knowledge graph injection can help large models more accurately understand users' questions and needs, and provide more reasonable answers and suggestions.
[0114] Multi-modal fusion:
[0115] Principle: Input data of different modalities (such as text, images, audio, etc.) into the large model, enabling the model to simultaneously process and understand multiple types of information, and perform cross-modal reasoning and generation.
[0116] Advantages: Enrich the input information of large models, improving the model's perception and understanding ability of the world; it can achieve a more natural and intelligent human-computer interaction method, for example, more accurately identifying and describing objects through the combination of images and text.
[0117] Application cases: In the fields of image caption generation, video understanding, intelligent driving, etc., multimodal fusion can play an important role.
[0118] NetAug is a new training method for improving the performance of micro neural networks. Different from common regularization techniques, NetAug mainly addresses the underfitting problem of small models by enhancing the model width of small models to obtain more supervision information. A series of networks wider than the original small model are introduced during training, and the supervision signals of the wide networks are used to enhance the learning of the small model. Specifically, only the small network and a single wide network are trained during each weight update to reduce the computational cost. It is applicable to the situation where the dataset is relatively large but the number of model parameters is relatively small, and it is also applicable to small models with underfitting problems caused by limited model capacity. It can effectively improve the actual performance of small models while keeping the model size unchanged, providing a better solution for dealing with the underfitting problem of small models.
[0119] In some embodiments, please refer to Figure 5 , the step S300 specifically includes:
[0120] S310. Obtain test sample data and perform a scaling operation on the test sample data;
[0121] S320. After performing image enhancement processing on the scaled test sample data, use the data after image enhancement processing as the test dataset, where the image enhancement processing includes at least one of brightness adjustment, contrast adjustment, and pixel normalization.
[0122] In this embodiment, a scaling operation is performed on each frame to ensure that the data adapts to the model input requirements. Finally, the contrast of the image is adjusted to enhance road features and details and improve the recognition accuracy. The preprocessed video data is represented by x pre . Among them, the image enhancement processing methods include brightness adjustment, contrast adjustment, pixel normalization, etc. Among them, either brightness adjustment or contrast adjustment is selected.
[0123] Brightness adjustment formula: I′ = I g ,
[0124] I′ is the pixel value of the new image, I is the pixel value of the original image, and g is gamma. If g is greater than 1, the new image is darker than the original image. If g is less than 1, the new image is brighter than the original image. According to experience, the general value range of g is between 0.5 and 2.
[0125] Contrast adjustment formula: I′ = log(I),
[0126] I′ is the pixel value of the new image, and I is the pixel value of the original image.
[0127] In some embodiments, refer to Figure 6 , the step S400 specifically includes:
[0128] S410. Input the test sample data set into the road recognition model to obtain a model recognition result;
[0129] S420. Based on the road recognition result and the result pre-annotated for the test sample data, perform an optimization process on the model recognition model.
[0130] In this embodiment, the trained large model f(x,W) is tested to verify whether its network performance meets the standard. It should be noted that the network for testing does not have newly added network units. Exemplarily, a part of the decoder-transformer[1] is adopted in the large model of the present invention. The original model has 6 layers of networks, the hidden size is 512, the attention heads are 4, the hidden size of the newly added model is 2014, and then int8 quantization is adopted.
[0131] According to the result of model detection in the embodiment of the present invention, the accuracy of road recognition is evaluated, and adjustments and optimizations are made according to the feedback in the actual scenario to ensure that the system can adapt to various complex road environments and maintain high recognition ability.
[0132] Optionally, the step S420 specifically includes:
[0133] Compare the road recognition result with the result pre-annotated for the test sample data to determine whether the correct rate of the road recognition result reaches a preset value;
[0134] When the correct rate of the road recognition result does not reach the preset value, adjust the model parameters of the road recognition model until the road recognition result reaches the preset value, and use the road recognition model with the finally adjusted parameters as the optimized model.
[0135] In this embodiment, by judging the correct rate of the road recognition result, when the correct rate does not meet the standard, the model is optimized by adjusting the parameters until the recognition accuracy of the optimized model reaches the standard and then terminated, ensuring the accuracy of model recognition.
[0136] In some embodiments, refer to Figure 7 , the step S500 specifically includes:
[0137] S510. Obtain the road data to be recognized, and input the road data to be recognized into the optimized road recognition model to identify road features;
[0138] S520. Compare the road features with the saved normal road samples to confirm the current road environment;
[0139] S530. When the road features match the saved normal road samples, determine that the road is normal and output navigation instruction information; otherwise, send an alarm prompt message.
[0140] In this embodiment, after obtaining the optimized model, the model can identify road features for the recognition and analysis of road features. By comparing the features of the test samples with the saved normal road samples, the current road environment is confirmed. If the test samples conform to the known road features, it is considered a normal road; if abnormalities are found, such as missing markings or misaligned signs, the system will give a real-time warning to remind the elderly to pay attention and avoid.
[0141] The technical solution provided by the present invention first obtains normal road sample data, preprocesses the normal road sample data to obtain a training data set; then uses the training data set to train a pre-established neural network model to obtain a road recognition model for identifying and positioning road elements; then obtains test sample data, preprocesses the test sample data to obtain a test data set, where the test data set includes complex road environments and specific road features; then inputs the test sample data set into the road recognition model to optimize the road recognition model with the test sample data set; finally, obtains the road data to be recognized, and inputs the road data to be recognized into the optimized road recognition model to obtain a road recognition result. The present invention aims to solve the challenges of road recognition in dynamic environments, especially to optimize the model operation on edge devices. This technical framework combines multi-modal data processing and deep learning models to improve the accuracy and real-time performance of road recognition by enhancing the capabilities of the network model. In the inference stage, the system can efficiently process road data from different environments, such as complex traffic conditions, changing lighting, and weather conditions, thus maintaining efficient road recognition performance.
[0142] Different from traditional static model-based road recognition methods, this technology improves the performance of edge devices in complex dynamic environments through large model enhancement technology. Specifically, through the comprehensive analysis of multi-dimensional data such as road conditions, road markings, and environmental factors, the network model can perform fast and accurate road recognition in real-time scenarios, ensuring the stable operation of the system under various environmental changes. Especially on edge devices, this technology can achieve high-precision road recognition with limited computing resources by optimizing the computational efficiency of the model, ensuring that the elderly can obtain real-time and accurate road information during travel and improving travel safety.
[0143] This technology can effectively solve the road recognition problem in the elderly care scenario and improve the adaptability and real-time processing ability of the road recognition system in a dynamic environment.
[0144] Another embodiment of the present invention provides a road recognition device. Please refer to Figure 8 , the road recognition device includes a training dataset acquisition module 11, a training module 12, a test dataset acquisition module 13, an optimization module 14, and a recognition module 15.
[0145] The training dataset acquisition module 11 is used to acquire normal road sample data and preprocess the normal road sample data to obtain a training dataset.
[0146] The training module 12 is used to train a pre-established neural network model with the training dataset to obtain a road recognition model for identifying and locating road elements.
[0147] The test dataset acquisition module 13 is used to acquire test sample data and preprocess the test sample data to obtain a test dataset, where the test dataset includes a complex road environment and specific road features.
[0148] The optimization module 14 is used to input the test sample dataset into the road recognition model to optimize the road recognition model with the test sample dataset.
[0149] The recognition module 15 is used to acquire the road data to be recognized, input the road data to be recognized into the optimized road recognition model, and obtain a road recognition result.
[0150] In some embodiments, the training dataset acquisition module 11 includes:
[0151] A first scaling unit, used to acquire normal road sample data and perform a scaling operation on the normal road sample data;
[0152] A first image enhancement processing unit, used to perform image enhancement processing on the normal road sample data after the scaling operation and use the data after the image enhancement processing as the training dataset, where the image enhancement processing includes at least one of brightness adjustment, contrast adjustment, and pixel normalization.
[0153] In some embodiments, the training module 12 specifically includes:
[0154] A training unit, used to input the test sample data into a pre-established neural network model and train the neural network model;
[0155] A loss value calculation unit, used to calculate the loss value of the neural network model;
[0156] A model optimization unit that optimizes the neural network model based on the loss value of the neural network model to obtain the road recognition model.
[0157] In some embodiments, the model optimization unit is specifically configured to:
[0158] Input the test sample data into a pre-established neural network model and train the neural network model;
[0159] Calculate the loss value of the neural network model;
[0160] Optimize the neural network model based on the loss value of the neural network model to obtain the road recognition model.
[0161] In some embodiments, the test data set acquisition module 13 specifically includes:
[0162] A second scaling unit for acquiring test sample data and performing a scaling operation on the test sample data;
[0163] A second image enhancement processing unit for performing image enhancement processing on the test sample data after the scaling operation and using the data after the image enhancement processing as the test data set, where the image enhancement processing includes at least one of brightness adjustment, contrast adjustment, and pixel normalization.
[0164] In some embodiments, the optimization module 14 specifically includes:
[0165] An identification unit for inputting the test sample data set into the road recognition model to obtain a model recognition result;
[0166] A processing unit for optimizing the model recognition model based on the road recognition result and the result pre-annotated for the test sample data.
[0167] In some embodiments, the processing unit is specifically configured to:
[0168] Compare the road recognition result with the result pre-annotated for the test sample data to determine whether the correct rate of the road recognition result reaches a preset value;
[0169] When the correct rate of the road recognition result does not reach the preset value, adjust the model parameters of the road recognition model until the road recognition result reaches the preset value, and use the road recognition model with the finally adjusted parameters as the optimized model.
[0170] In some embodiments, the recognition module 15 specifically includes:
[0171] An input unit for obtaining road data to be recognized, and inputting the road data to be recognized into an optimized road recognition model to recognize road features;
[0172] A comparison unit for comparing the road features with saved normal road samples to confirm the current road environment;
[0173] An output unit for determining that the road is normal and outputting navigation instruction information when the road features match the saved normal road samples, otherwise sending an alarm prompt message.
[0174] In an embodiment of the present invention, first, normal road sample data is obtained, and the normal road sample data is preprocessed to obtain a training data set; then, the training data set is used to train a pre-established neural network model to obtain a road recognition model for recognizing and positioning road elements; then, test sample data is obtained, and the test sample data is preprocessed to obtain a test data set, wherein the test data set includes complex road environments and specific road features; then, the test sample data set is input into the road recognition model to optimize the road recognition model using the test sample data set; finally, road data to be recognized is obtained, and the road data to be recognized is input into the optimized road recognition model to obtain a road recognition result. The present invention can effectively improve the accuracy and robustness of end-side road recognition. Especially in complex and dynamic road environments, it provides timely and accurate navigation prompts to help the elderly safely avoid potential traffic risks. This technology can significantly improve the travel safety of the elderly and reduce accidental risks caused by missing or incorrect road environment information.
[0175] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), etc., or a random access memory (RAM), etc.
[0176] It should be understood that although the steps in the flowchart of the accompanying drawings are shown sequentially according to the indication of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit and can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0177] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 9 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a road recognition method.
[0178] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as Figure 10 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of a road recognition method
[0179] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0180] Obtain normal road sample data, and preprocess the normal road sample data to obtain a training data set;
[0181] Train a pre - established neural network model using a training data set to obtain a road recognition model for identifying and locating road elements;
[0182] Obtain test sample data, and pre - process the test sample data to obtain a test data set, where the test data set includes a complex road environment and specific road features;
[0183] Input the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set;
[0184] Obtain road data to be recognized, and input the road data to be recognized into the optimized road recognition model to obtain a road recognition result.
[0185] In one embodiment, a computer - readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0186] Obtain normal road sample data, and pre - process the normal road sample data to obtain a training data set;
[0187] Train a pre - established neural network model using a training data set to obtain a road recognition model for identifying and locating road elements;
[0188] Obtain test sample data, and pre - process the test sample data to obtain a test data set, where the test data set includes a complex road environment and specific road features;
[0189] Input the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set;
[0190] Obtain road data to be recognized, and input the road data to be recognized into the optimized road recognition model to obtain a road recognition result.
[0191] It should be noted that for the functions or steps that the above - mentioned computer - readable storage medium or computer device can achieve, reference can be made to the relevant descriptions on the server side and the client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0192] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above various methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0193] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0194] In summary, for the road recognition method, device, computer equipment and storage medium provided by the present invention, first, normal road sample data is obtained, and the normal road sample data is preprocessed to obtain a training data set; then, the training data set is used to train a pre-established neural network model to obtain a road recognition model for recognizing and positioning road elements; then, test sample data is obtained, and the test sample data is preprocessed to obtain a test data set, where the test data set includes complex road environments and specific road features; then, the test sample data set is input into the road recognition model to optimize the road recognition model with the test sample data set; finally, road data to be recognized is obtained, and the road data to be recognized is input into the optimized road recognition model to obtain a road recognition result. The present invention aims to solve the challenges of road recognition in a dynamic environment, especially to optimize the model operation for edge devices. This technical framework combines multi-modal data processing and deep learning models, and improves the accuracy and real-time performance of road recognition by enhancing the capabilities of the network model. In the inference stage, the system can efficiently process road data from different environments, such as complex traffic conditions, changing lighting and weather conditions, so as to maintain efficient road recognition performance.
[0195] Different from traditional static model-based road recognition methods, this technology improves the performance of edge devices in complex dynamic environments through large model enhancement technology. Specifically, through the comprehensive analysis of multi-dimensional data such as road conditions, road markings and environmental factors, the network model can perform fast and accurate road recognition in real-time scenarios, ensuring the stable operation of the system under various environmental changes. Especially on edge devices, this technology can achieve high-precision road recognition with limited computing resources by optimizing the computing efficiency of the model, ensuring that the elderly can obtain real-time and accurate road information during travel and improving travel safety.
[0196] It should be noted that if non-company software tools or components appear in the embodiments of the present application, they are only used for illustrative introduction and do not represent actual use.
[0197] This technology can effectively solve the road recognition problem in the elderly care scenario, and improve the adaptability and real-time processing ability of the road recognition system in a dynamic environment.
[0198] The specific implementation manners of the present invention described above do not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and deformations made according to the technical concept of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A road recognition method, characterized in that: The steps include: Acquire normal road sample data, and preprocess the normal road sample data to obtain a training data set; The pre-established neural network model is trained using a training data set to obtain a road recognition model for identifying and locating road elements; Acquire test sample data, and preprocess the test sample data to obtain a test data set, wherein the test data set contains a complex road environment and specific road features; Inputting the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set; The road data to be identified is obtained, and the road data to be identified is input into the optimized road identification model to obtain a road identification result.
2. The road recognition method according to claim 1, characterized in that: The obtaining of normal road sample data and preprocessing of the normal road sample data to obtain a training data set includes: Acquire normal road sample data, and perform scaling operation on the normal road sample data; After performing image enhancement processing on the normal road sample data after the scaling operation, the image enhancement processed data is used as a training data set, wherein the image enhancement processing includes at least one of brightness adjustment, contrast adjustment, and pixel normalization.
3. The road recognition method according to claim 1, characterized in that: The method of using the training data set to train the pre-established neural network model to obtain a road recognition model for identifying and locating road elements includes: Inputting the test sample data into a pre-established neural network model to train the neural network model; Calculating the loss value of the neural network model; Based on the loss value of the neural network model, the neural network model is optimized to obtain the road recognition model.
4. The road recognition method according to claim 3, characterized in that: The step of optimizing the neural network model based on the loss value of the neural network model to obtain the road recognition model includes: Obtaining the original weights and learning rate of the neural network model; Optimizing the original weights of the neural network model based on the original weights of the neural network model, the learning rate, and the loss value of the neural network; Based on the optimized original weights, the neural network model is optimized to obtain a road recognition model.
5. The road recognition method according to claim 1, characterized in that: The step of inputting the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set includes: Inputting the test sample data set into the road recognition model to obtain a model recognition result; Based on the road recognition result and the pre-labeled result of the test sample data, the model recognition model is optimized.
6. The road recognition method according to claim 5, characterized in that: The optimizing process of the model recognition model based on the road recognition result and the pre-labeled result of the test sample data includes: Comparing the road recognition result with the pre-marked result of the test sample data to determine whether the accuracy of the road recognition result reaches a preset value; When the accuracy of the road recognition result does not reach the preset value, the model parameters of the road recognition model are adjusted until the road recognition result reaches the preset value, and the road recognition model after the final parameter adjustment is used as the optimized model.
7. The road recognition method according to claim 1, characterized in that: The obtaining of the road data to be identified and inputting the road data to be identified into the optimized road identification model to obtain a road identification result includes: Acquire road data to be identified, and input the road data to be identified into an optimized road identification model to identify road features; Comparing the road features with the saved normal road samples to confirm the current road environment; When the road feature matches the saved normal road sample, the road is determined to be normal and navigation instruction information is output; otherwise, an alarm prompt information is issued.
8. A road recognition device, characterized in that: include: A training data set acquisition module is used to acquire normal road sample data and pre-process the normal road sample data to obtain a training data set; A training module, used to train a pre-established neural network model using a training data set to obtain a road recognition model for identifying and locating road elements; A test data set acquisition module, used to acquire test sample data and preprocess the test sample data to obtain a test data set, wherein the test data set contains a complex road environment and specific road features; An optimization module, used for inputting the test sample data set into the road recognition model to optimize the road recognition model using the test sample data set; The recognition module is used to obtain road data to be recognized, and input the road data to be recognized into the optimized road recognition model to obtain a road recognition result.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the road recognition method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the road recognition method according to any one of claims 1 to 7 are implemented.