Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the technical solutions of the present application, but not all embodiments. All other embodiments, based on the embodiments described in the present document, which can be obtained by a person skilled in the art without any creative effort, are within the scope of protection of the technical solutions of the present application.
In the embodiment of the application, the relevant data collection and processing should be strictly according to the requirements of relevant national laws and regulations when the example is applied, the informed consent or independent consent of the personal information body is obtained, and the subsequent data use and processing behaviors are developed within the authorized range of the laws and regulations and the personal information body.
Road collection equipment: the device refers to hardware equipment which is installed in a vehicle and can shoot and record road information, and the hardware equipment comprises, but is not limited to, intelligent rearview mirrors, automobile data recorders and the like. Hereinafter, simply referred to as an acquisition device.
Intelligent automobile data recorder: the vehicle-mounted terminal is a mainstream vehicle-mounted terminal in the current market, is internally provided with a flow card, and can navigate in real time, listen to music, upload road condition information, record driving tracks and the like.
Road element information: the information refers to common information in roads, including but not limited to lane line information, traffic speed limit signs, electronic eyes, traffic lights, dangerous signs, road names and the like. Hereinafter, simply referred to as road elements.
And (3) road element identification: is a process of acquiring road element information. The specific process is that image frame data is extracted from a real-time video stream recorded by road acquisition equipment at a certain frequency, and an image recognition algorithm is input to obtain road elements.
Mother stock: the more reliable map data information reflecting the real world is the final product of map data processing. There is a need to continuously make corrections with real world data.
Algorithm model: refers to the output of a machine learning algorithm running on a dataset, representing what the machine learning algorithm learns, i.e., the rules, numbers, and data structures of any other specific algorithm required to make predictions. The algorithm model in the present context is dedicated to the identification of various types of road elements, and needs to be deployed to run on a road collection device, hereinafter simply referred to as the model.
Knapsack problem: is a Non-deterministic problem of polynomial complexity of combinatorial optimization (Non-deterministic Polynomial Complete, NP-complete problem). The problem can be described as: given a set of items, each item has its own weight and price, and within a defined total weight, how to choose to maximize the total price of the item.
Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include, for example, sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, pre-training model technologies, operation/interaction systems, mechatronics, and the like. The pre-training model is also called a large model and a basic model, and can be widely applied to all large-direction downstream tasks of artificial intelligence after fine adjustment. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Computer Vision (CV) is a science of studying how to "look" a machine, and more specifically, to replace human eyes with a camera and a Computer to perform machine Vision such as recognition, monitoring and measurement on a target, and further perform graphic processing to make the Computer process into an image more suitable for human eyes to observe or transmit to an instrument to detect. As a scientific discipline, computer vision research-related theory and technology has attempted to build artificial intelligence systems that can acquire information from images or multidimensional data. The large model technology brings important innovation for the development of computer vision technology, and a pre-trained model in the vision fields of swin-transformer, viT, V-MOE, MAE and the like can be rapidly and widely applied to downstream specific tasks through fine tuning. Computer vision techniques typically include image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content/behavior recognition, three-dimensional object reconstruction, 3D techniques, virtual reality, augmented reality, synchronous positioning, and map construction, among others, as well as common biometric recognition techniques such as face recognition, fingerprint recognition, and others.
Key technologies to the speech technology (Speech Technology) are automatic speech recognition technology (ASR) and speech synthesis technology (TTS) and voiceprint recognition technology. The method can enable the computer to listen, watch, say and feel, is the development direction of human-computer interaction in the future, and voice becomes one of the best human-computer interaction modes in the future. The large model technology brings revolution for the development of the voice technology, and WavLM, uniSpeech and other pre-training models which use a transducer architecture have strong generalization and universality and can excellently finish voice processing tasks in all directions.
Natural language processing (Nature Language processing, NLP) is an important direction in the fields of computer science and artificial intelligence. It is studying various theories and methods that enable effective communication between a person and a computer in natural language. The natural language processing relates to natural language, namely the language used by people in daily life, and is closely researched with linguistics; and also to computer science and mathematics. An important technique for model training in the artificial intelligence domain, a pre-training model, is developed from a large language model (Large Language Model) in the NLP domain. Through fine tuning, the large language model can be widely applied to downstream tasks. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic questions and answers, knowledge graph techniques, and the like.
Machine Learning (ML) is a multi-domain interdisciplinary, involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like. The pre-training model is the latest development result of deep learning, and integrates the technology.
The automatic driving technology refers to that the vehicle realizes self-driving without operation of a driver. Typically including high-precision maps, environmental awareness, computer vision, behavioral decision-making, path planning, motion control, and the like. The automatic driving comprises various development paths such as single car intelligence, car-road coordination, networking cloud control and the like. The automatic driving technology has wide application prospect, and the current field is the field of logistics, public transportation, taxis and intelligent transportation, and is further developed in the future.
With research and advancement of artificial intelligence technology, research and application of artificial intelligence technology is being developed in various fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, autopilot, unmanned, digital twin, virtual man, robot, artificial Intelligence Generated Content (AIGC), conversational interactions, smart medical, smart customer service, game AI, etc., and it is believed that with the development of technology, artificial intelligence technology will be applied in more fields and with increasing importance value.
The scheme provided by the embodiment of the application relates to the technologies of artificial intelligence such as machine learning, and particularly, road acquisition equipment cuts a target sampling image based on a preset element distribution area corresponding to each road element type to obtain an element sub-image set corresponding to each road element type; and respectively carrying out road element identification on the corresponding element sub-image sets based on the target element detection models corresponding to the road element types, and obtaining corresponding road element identification results. Each target element detection model is obtained through training according to a sample image set belonging to the corresponding road element type by using a machine learning technology. Training and application of the target element detection model is described in detail below.
In the related art, a road element identification model is deployed in a road acquisition device, after a road image is acquired by the road acquisition device, one or more road elements existing in the road image are identified by using the road element identification model, and then the road acquisition device uploads the identified road elements to a server.
However, because the types of road elements are various, the road element identification model needs to consume more computing resources to meet the requirements of multi-type identification, but the road acquisition equipment is usually equipment with poor hardware performance such as an intelligent rearview mirror and a vehicle recorder and is limited by limited resources of the road acquisition equipment, when the road element identification model is used in the road acquisition equipment, the model performance consumption is reduced by sacrificing the identification accuracy, or the model performance consumption is reduced by reducing the identifiable road element types, and obviously, the two modes cannot meet the identification requirements of diversified road elements while guaranteeing the identification accuracy.
In the embodiment of the application, road acquisition equipment cuts a target sampling image based on a preset element distribution area corresponding to each road element type to obtain an element sub-image set corresponding to each road element type; based on the target element detection model corresponding to each road element type, respectively carrying out road element identification on the corresponding element sub-image set to obtain a corresponding road element identification result; each target element detection model is trained according to a sample image set belonging to the corresponding road element type.
Compared with the large model for identifying all road element types, in the embodiment of the application, the target element detection models corresponding to the road element types are utilized to respectively identify one type of road element, and each target element detection model only identifies one type of road element, so that the performance consumption of the target element detection model is lower, and the identification accuracy is ensured, and meanwhile, the identification requirement of diversified road elements is met.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are for illustration and explanation only, and not for limitation of the present application, and that the embodiments of the present application and the features of the embodiments may be combined with each other without conflict.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application. The application scenario at least includes a road collection device 110. The road acquisition device 110 is configured to cut the target sampling image based on a preset element distribution area corresponding to each road element type, so as to obtain an element sub-image set corresponding to each road element type; and respectively carrying out road element recognition on the corresponding element sub-image sets based on the target element detection models corresponding to the road element types, and obtaining corresponding road element recognition results.
The application scenario may further include a server 120, where after the road collecting device 110 obtains the road element identification result, the road collecting device 110 may further send each identified road element to the server 120, and the server 120 is configured to map according to each road element after receiving each road element from the road collecting device.
The number of the road collecting devices 110 may be one or more, and the number of the servers 120 may be one or more, and the number of the road collecting devices 110 and the servers 120 is not particularly limited in the present application.
The road collecting device 110 in the embodiment of the present application may be provided with a client related to road element collection, and the server 120 may be a server related to data processing. In addition, the client in the present application may be software, a web page, an applet, etc., and the server is a background server corresponding to the software, the web page, the applet, etc., or a server dedicated to data processing, etc., and the present application is not limited specifically.
In the embodiment of the present application, the road collecting device 110 may be an intelligent rearview mirror or a vehicle event data recorder, and of course, the road collecting device 110 may also be a device with other specific road element collecting functions, such as a smart phone, a computer, an internet of things device, an intelligent home appliance, a vehicle-mounted terminal, etc., but not limited thereto.
The server 120 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a content delivery network (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligence platform. The road collecting device 110 and the server 120 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
Referring to fig. 2, a flow chart of a road element identification method provided in an embodiment of the application is shown, and the method is applied to a road collection device, and the specific flow chart is as follows:
s201, cutting out the target sampling image based on the preset element distribution areas corresponding to the road element types, and obtaining element sub-image sets corresponding to the road element types.
Among the road element types include, but are not limited to: lane line information, traffic speed limit signs, electronic eyes, traffic lights, dangerous signs, road names and the like.
Because the positions of the road elements in the image are distributed in a certain rule and in a concentrated way, the element distribution areas corresponding to the road element types can be determined based on the characteristics. For example, road elements such as traffic lights and electronic eyes are generally concentrated in the upper half of the screen, and therefore, the upper half of the image can be used as an element distribution area corresponding to the traffic lights and electronic eyes, whereas ground lane elements such as lane line information are generally concentrated in the lower half of the screen, and therefore, the lower half of the image can be used as an element distribution area corresponding to the lane line information.
In the embodiment of the present application, overlapping portions may exist between element distribution areas corresponding to different road element types. The element sub-image set may contain one or more element sub-images.
Referring to fig. 3, a schematic diagram of a possible distribution of road elements is provided in an embodiment of the present application, where a represents an electronic eye, B represents lane line information, C represents a traffic light, D represents a lane sign, a hatched portion represents an element distribution area, the element distribution area corresponding to the electronic eye includes a left side and a right side of an image, the element distribution area corresponding to the lane line information is a lower side area of the image, the element distribution area corresponding to the red-green light is a right side area of the image, and the element distribution area corresponding to the lane sign is an upper side area of the image.
The road acquisition equipment cuts the target sampling image based on element distribution areas (left side and right side of the image) corresponding to the electronic eyes to obtain an element sub-image set corresponding to the electronic eyes, wherein the element sub-image set corresponding to the electronic eyes comprises two element sub-images; cutting the target sampling image based on an element distribution area (lower area of the image) corresponding to the lane line information to obtain an element sub-image set corresponding to the lane line information, wherein the element sub-image set corresponding to the lane line information comprises an element sub-image; cutting the target sampling image based on an element distribution area (right area of the image) corresponding to the traffic light to obtain an element sub-image set corresponding to the traffic light, wherein the element sub-image set corresponding to the traffic light comprises an element sub-image; and cutting the target sampling image based on the element distribution area (upper area of the image) corresponding to the lane label to obtain an element sub-image set corresponding to the lane label, wherein the element sub-image set corresponding to the lane label comprises one element sub-image.
S202, respectively carrying out road element identification on corresponding element sub-image sets based on respective corresponding target element detection models of the road element types to obtain corresponding road element identification results; each target element detection model is trained according to a sample image set belonging to the corresponding road element type.
In the embodiment of the application, a corresponding target element detection model is obtained in advance through training aiming at each road element type, and a specific model training process is shown below.
In the case of road element recognition, as one possible implementation manner, a corresponding element detection model is set for each type of road element, and model training is performed on each element detection model, so that road element detection is performed by using the element detection model after training. The model training process and the model application process are described below, respectively.
Model training phase
Referring to fig. 4, which is a schematic diagram of a model architecture provided in an embodiment of the present application, for each road element type, a corresponding initial element detection model is provided, where the initial element detection model includes: an initial element detection model A corresponding to the road element type A, an initial element detection model B corresponding to the road element type B, an initial element detection model C corresponding to the road element type C, and an initial element detection model D corresponding to the road element type D. The following description will be given by taking the above four models as examples only.
In the embodiment of the application, the initial element detection models can adopt the same network structure or different network structures, and the method is not limited. The network structure of each initial element detection model is not limited herein.
Since the training process of each initial element detection model is the same, the model training process is specifically described with the training process of the initial element detection model a.
Referring to fig. 5, a flow chart of a training method of an initial element detection model provided in an embodiment of the present application is shown, where the flow chart can be applied to a terminal device or a server, and the specific flow chart is as follows:
s501, based on the element distribution area corresponding to the road element type A, respectively performing image clipping on each initial sample in the initial sample set to obtain a sample image set corresponding to the road element type A.
In the embodiment of the present application, the clipping process for the initial sample is the same as the clipping process for the target sampling image in the above description, and will not be repeated here.
For example, referring to fig. 6, the initial sample set includes initial samples 1, 2, 3, … …, M is a positive integer, image cropping is performed on the initial samples 1, 2, 3, … …, M based on the element distribution areas corresponding to the road element type a, respectively, to obtain a sample image set corresponding to the road element type a, the sample image set includes sample images 1, 2, 3, … …, 2M, and the element distribution areas corresponding to the road element type a include the left side and the right side of the image, for the initial samples 1, image cropping is performed on the initial samples 1 based on the element distribution areas (the left side and the right side of the image) corresponding to the road element type a, to obtain two sample images corresponding to the road element type a.
In the embodiment of the application, the road elements and the positions thereof contained in each initial sample can be marked in advance, so that after the initial sample is cut, the real road element marking result corresponding to each sample image can be obtained by combining the cutting area corresponding to the sample image according to the road elements and the positions marked in the initial sample, and the real road element identification result can be marked on each sample object directly.
S502, based on the sample image set, performing iterative training on an initial element detection model corresponding to the road element type A to obtain a candidate element detection model of the road element type A.
As shown in fig. 7, in an iterative process, the following operations are performed:
s701, performing element recognition on a plurality of sample images in the sample image set corresponding to the road element type A based on an initial element detection model corresponding to the road element type A to obtain a prediction result.
In the embodiment of the present application, for each sample image, a sample image set corresponding to the road element type a may identify a corresponding road element identification result, where the road element identification result of a plurality of sample images is referred to as a prediction result.
An initial sample of one batch (batch) may be input in each iteration process, and the number of initial samples input in each batch may be preset, which is not limited.
For example, based on an initial element detection model corresponding to the road element type a, element recognition is performed on a plurality of sample images in the sample image 1, the sample image 2, the sample images 3, … … and the sample image 2M, so as to obtain a prediction result, and the prediction result characterizes road elements belonging to the road element type a contained in the plurality of sample images.
S702, based on the prediction result, combining the real results corresponding to the sample images to obtain a model evaluation value.
In the embodiment of the application, the model evaluation value is used for evaluating the performance of the current element detection model. For example, the model evaluation value may employ an accuracy (precision), a recall (recall), or an F1 value, but is not limited thereto.
The calculation modes of the accuracy rate, the recall rate and the F1 value can be various, and the accuracy rate is used for representing the number of the correct sample images to be predicted/the duty ratio of the sample images input in the current iteration in the sample images (i.e. a plurality of sample images) input in the current iteration; the recall rate is used for representing the ratio of the number of the correct sample images to be predicted in the sample images of the real road element A input by the current iteration; f1 =2 x (accuracy rate x recall)/(accuracy rate+recall).
S703, judging whether the model convergence condition is met or not based on the model evaluation value, if yes, executing S704, otherwise, executing S705.
In the embodiment of the application, when the model convergence condition is met, the candidate element detection model is output, and the model training is finished. And when the model convergence condition is not met, performing model parameter adjustment based on the model evaluation value.
Exemplary model convergence conditions include, but are not limited to, the model evaluation value of the current iteration is not lower than a set evaluation value threshold, the model evaluation values of successive rounds of iterations are not lower than a set evaluation value threshold, and the difference between the model evaluation values of each two adjacent rounds of the successive rounds of iterations meets a set difference range.
S704, outputting a candidate element detection model.
S705, performing model parameter adjustment based on the model evaluation value, and returning to S701.
In some embodiments, considering that road element collection can be classified into two task scenes of "verification type" and "discovery type", the verification type task scene is used for verifying whether known elements in a road network change, the verification type task scene has higher requirements on accuracy of an element detection model, the discovery type task scene is used for discovering element types of positions in the road network, and the discovery type task scene has higher requirements on recall rate of the element detection model, so in the embodiment of the application, different candidate element detection models can be trained according to different collection task scenes. For convenience of distinction, in the embodiment of the present application, the candidate element detection model corresponding to the verification-type task scenario is referred to as a first candidate element detection model, and the candidate element detection model corresponding to the discovery-type task scenario is referred to as a second candidate element detection model.
Specifically, taking the road element type a as an example, the first candidate element detection model corresponding to the road element type a is obtained by training in the following manner:
based on an element distribution area corresponding to a road element type, respectively carrying out image cutting on each initial sample in an initial sample set to obtain a sample image set corresponding to the road element type;
based on the sample image set, performing iterative training on a first initial element detection model corresponding to one road element type to obtain a corresponding first candidate element detection model; wherein, in each iteration process, the following operations are performed:
performing element recognition on a plurality of sample images in a sample image set based on a first initial element detection model to obtain a prediction result;
based on the prediction result, combining the real results corresponding to the sample images to obtain the accuracy of the current iteration, and adjusting the model parameters based on the accuracy of the current iteration.
Specifically, the second candidate element detection model corresponding to the road element type a is obtained by training in the following manner:
based on an element distribution area corresponding to a road element type, respectively carrying out image cutting on each initial sample in an initial sample set to obtain a sample image set corresponding to the road element type;
Performing iterative training on a second initial element detection model corresponding to one road element type based on the sample image set to obtain a corresponding second candidate element detection model; wherein, in each iteration process, the following operations are performed:
performing element recognition on a plurality of sample images in the sample image set based on a second initial element detection model to obtain a prediction result;
based on the prediction result, combining the real results corresponding to the sample images to obtain the recall rate of the current iteration, and adjusting the model parameters based on the accuracy rate of the current iteration.
That is, for the training process of the first candidate element detection model, the model evaluation value thereof adopts the accuracy. For the training process of the second candidate element detection model, the model evaluation value adopts a recall rate.
According to the implementation mode, on the premise that the equipment performance is limited, the models are difficult to meet the requirements of high accuracy and high recall rate, so that different acquisition task scenes can be met by respectively training the models of the high-accuracy low recall type and the low-accuracy high recall type. Thus, according to the goals of 'safe and accurate' and 'safe and recall', two types of candidate element detection models corresponding to various road elements can be respectively trained, and the two types of candidate element detection models are respectively used for meeting the verification type task scene of 'high-accuracy and low-accuracy and high-recall' and the discovery type task scene of 'low-accuracy and high-recall'.
In some embodiments, the acquisition task in the verification-type task scenario is referred to as a verification-type task, the acquisition task in the discovery-type task scenario is referred to as a discovery-type task, the verification-type task is a task for performing known element update on an acquisition road segment, and the discovery-type task is a task for performing new element detection on the acquisition road segment.
Each road element type corresponds to two candidate element detection models, the two candidate element detection models including: a first candidate element detection model for completing a validation-type task and a second candidate element detection model for completing a discovery-type task.
In the embodiment of the application, if the road acquisition equipment receives a verification type task instruction, a first candidate element detection model corresponding to each road element type is used as a target element detection model corresponding to each road element type; and if the discovery-type task instruction is received, taking the second candidate element detection model corresponding to each road element type as a target element detection model corresponding to each road element type.
In other words, in the embodiment of the application, before the road element is collected, different task instructions can be issued to the road collecting device, so that the road collecting device adopts one candidate element detection model of two candidate element detection models as a target element detection model for subsequent use according to the received task instructions, thereby meeting the use requirements of different application scenes and further improving the collecting effect of the road collection.
In the embodiment of the present application, the task instruction (discovery-type task instruction or verification-type task instruction) may be input, but is not limited to, voice, text, keyboard, firmware button, etc.
For example, if the target object inputs a verification-type task instruction, and the road collection device receives the verification-type task instruction, then the first candidate element detection model corresponding to each of the road element type a, the road element type B, the road element type C, and the road element type D is used as the target element detection model corresponding to each of the road element types, and if the discovery-type task instruction is received, the second candidate element detection model corresponding to each of the road element type a, the road element type B, the road element type C, and the road element type D is used as the target element detection model corresponding to each of the road element types.
In some embodiments, if the acquisition task scenario is not distinguished, model training is performed based on the training process shown in fig. 7, a candidate element acquisition model is output, and the output candidate element acquisition model is directly used as a target element detection model.
(II) model application stage
Specifically, in the model application stage, the road acquisition device cuts the target sampling image based on the preset element distribution area corresponding to each road element type to obtain element sub-image sets corresponding to each road element type, and then respectively carries out road element recognition on the corresponding element sub-image sets based on the target element detection model corresponding to each road element type to obtain the corresponding road element recognition result.
In some embodiments, considering that resources of the road collection device are limited, in order to maximize the model detection effect on the premise of meeting the performance constraint of the road collection device, in the embodiment of the application, according to the calculation resources (such as CPU idle rate, memory idle rate, etc.) of the road collection device, the performance consumption evaluation values of the target element detection models corresponding to each road element type can be combined, and part or all of the target element detection models can be screened from the target element detection models for use.
Specifically, based on the target element detection model corresponding to each road element type, respectively performing road element recognition on the corresponding element sub-image set to obtain a corresponding road element recognition result, including:
Acquiring respective performance consumption evaluation values of the target element detection models, and acquiring computing resource allowance of the road acquisition equipment;
screening at least one target element detection model meeting the set performance condition from the target element detection models based on the acquired performance consumption evaluation values and by combining with calculation of the resource allowance;
and respectively carrying out road element recognition on the corresponding element sub-image sets based on at least one target element detection model to obtain corresponding road element recognition results.
The calculation resource allowance of the road acquisition device and the respective performance consumption evaluation value of each target element detection model can be measured by one or more of CPU idle rate and memory idle rate, but the method is not limited to the method. In this description, only the CPU idle rate is taken as a measure for calculating the remaining amount of resources, and accordingly, the respective performance consumption evaluation values of the target element detection models also take the CPU idle rate as a measure. Herein, the computing resource margin of the road collecting device may also be referred to as a performance constraint upper limit Pmax.
The respective performance consumption evaluation values of the respective target element detection models may also be understood as respective corresponding performance consumption evaluation values of the respective road element types.
For example, an average value of the CPU idle rate of the road collecting device in a certain time can be counted and used as the computing resource allowance of the road collecting device. For example, the computing resource margin of the road collecting device may be 50% (the average value of CPU idle rate of the road collecting device over a certain time is 50%).
The performance consumption evaluation value of the target element detection model may be a static measurement value, where the static measurement value is an average CPU occupancy measured before model deployment, and the measurement before model deployment may be performance consumption evaluation of the target element detection model in a laboratory environment. The performance consumption evaluation value of a target element detection model can also adopt a dynamic measurement value, wherein the dynamic measurement value is an average CPU occupancy rate obtained by statistics of the model in the acquisition process (namely, an average value of historical CPU occupancy rates in a period of time in the use process of the model). Of course, the performance consumption evaluation value of one target element detection model may be obtained by integrating the static measurement value and the dynamic measurement value (for example, weighting and summing the dynamic measurement value and the dynamic measurement value), which is not limited. It is contemplated that if the model has never been run during acquisition, then the dynamic measurement values are missing, and the static measurement values may be directly used as the energy consumption assessment values.
For example, the target element detection models corresponding to the road element type a, the road element type B, the road element type C, and the road element type D are respectively the target element detection model a, the target element detection model B, the target element detection model C, and the target element detection model D, and the performance consumption evaluation values corresponding to the target element detection model a, the target element detection model B, the target element detection model C, and the target element detection model D are respectively 10%, 15%, 20%, and 25%.
Based on the obtained performance consumption evaluation values, in combination with calculating the resource margin, when at least one target element detection model satisfying the set performance condition is screened out from the target element detection models, the following implementation modes exist, but are not limited to:
a first possible implementation: and sorting the target element detection models based on the acquired performance consumption evaluation values, and screening at least one target element detection model with the sum of the performance consumption evaluation values not larger than the calculated resource allowance from the target element detection models in turn based on the sorting result as at least one target element detection model meeting the set performance condition.
For example, the performance consumption evaluation values corresponding to the target element detection model a, the target element detection model B, the target element detection model C, and the target element detection model D are respectively 10%, 15%, 20%, and 25%, and the calculated resource margin of the road collection device is 50%, the target element detection models are ranked according to the obtained performance consumption evaluation values, and in the ranking result, the target element detection models are sequentially: the target element detection model D, the target element detection model C, the target element detection model B, and the target element detection model a are selected based on the sorting result, and first, the target element detection model D is selected, the performance consumption evaluation value of the target element detection model D is not more than 50%, and second, the target element detection model C is selected, and the sum of the performance consumption evaluation values of the target element detection model D and the target element detection model C is not more than 50%, and for the target element detection model B, the sum of the performance consumption evaluation values of the target element detection model D, the target element detection model C, and the target element detection model B is more than 50%, so that the target element detection model D and the target element detection model C are selected as 2 target element detection models satisfying the set performance condition.
A second possible implementation: considering that if the distribution of road elements in an actual road segment is ignored only according to the target element detection model used for performance consumption screening, the final element detection result is affected.
Specifically, based on the obtained performance consumption evaluation values, in combination with calculating the resource margin, at least one target element detection model satisfying the set performance condition is selected from the target element detection models, including:
acquiring element value evaluation values corresponding to the target element detection models based on element distribution densities corresponding to the road element types in the acquisition road sections of the target sampling images;
and screening at least one target element detection model meeting the set performance condition from the target element detection models based on the performance consumption evaluation value and the element value evaluation value of each target element detection model by combining with calculation of the resource allowance.
In the embodiment of the application, one acquisition line can be formed by one or more road sections, and the element distribution density corresponding to each road element type can be preset for each road section in the acquisition line. And further, based on the element distribution density corresponding to each road element type in the acquisition road section of the target sampling image, element value evaluation values corresponding to each target element detection model can be obtained.
For example, referring to fig. 8, it is assumed that the acquired link includes link 1, link 2, link 3, etc., and ρa, ρb, ρc, ρd are used to represent the respective corresponding element distribution densities of the road element type a, the road element type B, the road element type C, and the road element type D in fig. 8, and the respective corresponding element distribution densities of the road element type a, the road element type B, the road element type C, and the road element type D in link 1 are 3/km (i.e., 3 per kilometer), 0/km, 1/km, 2/km, and 2/km in link 2, and the respective corresponding element distribution densities of the road element type a, the road element type B, the road element type C, and the road element type D in link 3 are 1/km, 2/km, 1/km, and 2/km, respectively.
For convenience of distinction, a section where the target sample image is acquired among one or more sections is referred to as an acquisition section. The element distribution density may also be referred to as road network element density information. For example, the acquisition link may be any one of the links of the link 1, the link 2, the link 3, and the like in fig. 8.
In the above implementation manner, on the basis of performance consumption, the element distribution density of each road element type in the collection road section is combined to perform screening of the target element detection model, and since the element distribution density of each element in the image can be represented to a certain extent, the higher the element distribution density, the higher the possibility that the road element of the type exists in the image is explained, therefore, the element distribution density of each road element type in the collection road section is combined to perform screening of the target element detection model, so that most road elements can be ensured to be identified to a certain extent, and the identification accuracy of the road elements is further improved.
The element value evaluation value may be obtained by, but not limited to, the following two implementations:
the implementation mode is as follows: and directly taking the element distribution density corresponding to each road element type in the acquisition road section of the target sampling image as the element value evaluation value corresponding to each target element detection model.
For example, still referring to fig. 8, in the road segment 1, the element distribution densities corresponding to the road element type a, the road element type B, the road element type C, and the road element type D are 3/km, 0/km, 1/km, and 2/km, respectively, and therefore, in the road segment 1, the element value evaluation values corresponding to the road element type a, the road element type B, the road element type C, and the road element type D are 3, 0, 1, and 2, respectively; similarly, in the road section 2, the element distribution densities corresponding to the road element type A, the road element type B, the road element type C and the road element type D are respectively 1/km, 2/km, 1/km and 2/km, and in the road section 2, the element value evaluation values corresponding to the road element type A, the road element type B, the road element type C and the road element type D are respectively 1, 2, 1 and 2; in the road section 3, element distribution densities corresponding to the road element type A, the road element type B, the road element type C and the road element type D are respectively 0/km, 3/km, 1/km and 2/km, and element value evaluation values corresponding to the road element type A, the road element type B, the road element type C and the road element type D are respectively 0, 3, 1 and 2.
The implementation mode II is as follows: in order to meet different acquisition requirements, in the embodiment of the application, the importance of different road element types is represented by element weights, and element value evaluation values are obtained by combining the element weights on the basis of element distribution density.
Specifically, the road collection device performs the following operations for each road element type:
acquiring element weights corresponding to one road element type, and acquiring corresponding element value evaluation values based on element distribution density corresponding to the one road element type in an acquisition road section of a target sampling image by combining the element weights;
and taking the element value evaluation value corresponding to one road element type as the element value evaluation value of the target element detection model corresponding to one road element type.
The element weight corresponding to one road element type is used for representing the acquisition importance of the road element type, and the higher the element weight is, the higher the priority of the acquisition requirement of the road element of the type is indicated by way of example. The element weight may be represented by w.
As a possible implementation manner, if the target element detection model corresponding to each road element type is an element detection model for completing a verification task, the verification task is a task of updating a known element of the collected road section; then, based on the element distribution density corresponding to one road element type in the acquisition road section of the target sampling image, the corresponding element value evaluation value is obtained by combining the element weight, and the method comprises the following steps:
And obtaining an element value evaluation value corresponding to the road element type by combining element weight directly based on element distribution density corresponding to the road element type in the acquisition road section of the target sampling image.
That is, in the verification task, the element distribution density is directly used, and the element value evaluation value is obtained in combination with the element weight.
Taking the road element type A as an example, acquiring element weights corresponding to the road element type A, and acquiring element value evaluation values corresponding to the road element type A by combining the element weights corresponding to the road element type A based on element distribution density corresponding to the road element type A in an acquisition road section of a target sampling image.
Illustratively, element value evaluation value corresponding to road element type a=element weight wa of road element type a collects element distribution density ρa corresponding to road element type a in the road segment. The element distribution density is represented by ρ.
Referring to fig. 9, the acquired link includes link 1, link 2, link 3, and the like, ρa, ρb, ρc, ρd are respectively used to represent element distribution densities corresponding to each of the road element type a, the road element type B, the road element type C, and the road element type D, wa, wb, wc, wd are respectively used to represent element weights corresponding to each of the road element type a, the road element type B, the road element type C, and the road element type D, assuming that the acquired link is link 1, the element value evaluation value corresponding to the road element type a= 3*3 =9, the element value evaluation value corresponding to the road element type b= 1*0 =0, the element value evaluation value corresponding to the road element type c= 0*1 =0, and the element value evaluation value corresponding to the road element type d=2×2=4.
As a possible implementation manner, the target element detection model corresponding to each road element type is an element detection model for completing a discovery task, and the discovery task is a task for detecting new elements of the collected road segments; then, based on the element distribution density corresponding to one road element type in the acquisition road section of the target sampling image, the corresponding element value evaluation value is obtained by combining the element weight, and the method comprises the following steps:
obtaining a density difference value by combining the element distribution density corresponding to one road element type with the reference distribution density set for one road element in the acquisition road section based on the target sampling image;
and obtaining an element value evaluation value corresponding to the road element type based on the density difference value and the element weight.
That is, in the discovery task, the element value evaluation value is obtained based on the element distribution density and the reference distribution density in combination with the element weight. Herein, v is used to denote the element value evaluation value.
The reference distribution density may refer to an element distribution density of a certain road element type in a reference map obtained by analyzing the reference map, for example. The reference distribution density may be set with the acquisition route as granularity, or may be set with the acquisition road section as granularity.
Taking the road element type A as an example, acquiring element weights corresponding to the road element type A, acquiring density difference values by combining the reference distribution density ρa' set for the road element type A based on element distribution density pa corresponding to the road element type A in an acquisition road section of a target sampling image, and acquiring element value evaluation values va corresponding to the road element type A based on the density difference values and the element weights corresponding to the road element type A. Illustratively, va=wa (ρa' - ρa).
Referring to fig. 10, the acquired link includes link 1, link 2, link 3, and the like, ρa, ρb, ρc, and pd are respectively used to represent element distribution densities corresponding to each of a road element type a, a road element type B, a road element type C, and a road element type D, wa, wb, wc, wd are respectively used to represent element distribution densities corresponding to each of a road element type a, a road element type B, a road element type C, and a road element type D, assuming that the acquired link is link 1, each of the reference distribution densities of the road element type a, the road element type B, the road element type C, and the road element type D is 4, the element value evaluation value corresponding to the road element type a is=3×4-3×3, the element value evaluation value corresponding to the road element type B is=1×4×0×4, the element value evaluation value corresponding to the road element type C is=0×4-1×0, and the element value evaluation value corresponding to the road element type D is=2×2×4-3×2.
Through the implementation manner, for the discovery task, the difference value between the reference distribution density and the element distribution density is used as the road network density, and if the reference distribution density is larger than the element distribution density, the newly added element is more likely to be discovered, so that the discovery of the new road element is facilitated.
In the embodiment of the application, in the road element acquisition process, element value evaluation values of all target element detection models are calculated by combining element density information and element weights of the current driving road, so that the model combination with the highest element value is dynamically selected and started on the premise of meeting the equipment performance constraint.
In the embodiment of the application, based on the respective performance consumption evaluation value and element value evaluation value of each target element detection model, when at least one target element detection model meeting the set performance condition is screened out from each target element detection model by combining with calculating the resource allowance, a greedy algorithm, dynamic programming and other modes can be adopted but are not limited.
As one possible implementation manner, screening at least one target element detection model satisfying a set performance condition from among the target element detection models based on the respective performance consumption evaluation value and element value evaluation value of the target element detection models in combination with calculating a resource margin, includes:
Ranking the target element detection models based on the obtained element value evaluation values to obtain ranking results;
based on the sorting result, the following operations are sequentially executed for each target element detection model:
obtaining the amount of used resources based on the performance consumption evaluation value of each of the screened at least one target element detection model, and determining the amount of residual resources based on the amount of used resources and the calculated resource allowance;
and if the performance consumption evaluation value of the current target element detection model is not greater than the residual resource quantity, taking the current target element detection model as a target element detection model meeting the set performance condition.
The sequence of element value evaluation values of the road element type a, the road element type B, the road element type C, and the road element type D is denoted as va, vb, vc, vd and va, vb, vc, vd, and is referred to as a value sequence. The sequence of the performance consumption evaluation values of the road element type a, the road element type B, the road element type C, and the road element type D is pa, pb, pc, pd and pa, pb, pc, pd, respectively, is called a performance sequence.
In the process of screening the target element detection model, the performance consumption can be used as a constraint condition, the element value can be used as a solving target, and then the model combination process can be converted into a knapsack-like problem to be solved, namely, the final element value evaluation value summation (selected from a performance sequence) is enabled to be maximum as far as possible on the premise that the performance consumption evaluation value summation (selected from an value sequence) of the finally screened target element detection model is not larger than the equipment performance limit Pmax.
That is, va, vb, vc, vd is ranked, a target element detection model (denoted as model x) with the highest element value evaluation value is preferentially selected, whether the performance accumulated value (Psum) +px is larger than Pmax is judged, the Psum initial value is 0, px is the performance consumption evaluation value of model x, if psum+px is not larger than Pmax, the model x is screened out as the target element detection model meeting the set performance condition, and psum=psum+px is accumulated; if Psum+Px is greater than Pmax, the model x is not satisfied with the current performance limit, and the model is not selected; and repeatedly executing the steps until all the target element detection models are traversed, and obtaining the target element detection models meeting the set performance conditions.
For example, referring to fig. 11, assuming that values of va, vb, vc, vd are 3, 4, 3, 2, pa, pb, pc, and pd are 5%, 15%, 20%, and 25%, respectively, and the calculated resource margin is 50%, sorting is performed on the basis of values of va, vb, vc, vd, to obtain a sorting result, where the sorting result is: a target element detection model B, a target element detection model A, a target element detection model C and a target element detection model D.
Based on the sorting result, the following operations are sequentially performed for the target element detection model B, the target element detection model a, the target element detection model C, and the target element detection model D:
first, for the target element detection model B, there is no element detection model that has been screened at this time, and therefore, the performance consumption evaluation value of each of the at least one target element detection model that has been screened is 0, the amount of used resources is 0 (i.e., psum=0), the remaining amount of resources is determined to be 50% based on the amount of used resources and Pmax, and at this time, the performance consumption evaluation value of the target element detection model B is 15% and not more than 50% of the remaining amount of resources, and therefore, the target element detection model B is regarded as the target element detection model that satisfies the set performance condition.
Next, for the target element detection model a, the screened target element detection model includes a target element detection model B, 15% of the used resource amount is obtained based on the performance consumption evaluation value of the target element detection model B, and the remaining resource amount 50% -15% = 35% is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value of the target element detection model a is not more than 5% of the remaining resource amount 35%, so that the target element detection model a is taken as the target element detection model satisfying the set performance condition.
Next, for the target element detection model C, the screened target element detection model includes a target element detection model a and a target element detection model B, the used resource amount 20% is obtained based on the performance consumption evaluation values of the target element detection model a and the target element detection model B, and the remaining resource amount 50% -20% = 30% is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value of the target element detection model C is not more than 30% of the remaining resource amount, so the target element detection model C is regarded as the target element detection model satisfying the set performance condition.
Next, for the target element detection model D, the screened target element detection model includes a target element detection model a, a target element detection model B, and a target element detection model C, the used resource amount 40% is obtained based on the performance consumption evaluation values of the target element detection model a, the target element detection model B, and the target element detection model C, and the remaining resource amount 50% -40% = 10% is determined based on the used resource amount and the calculation resource margin, and the performance consumption evaluation value 25% of the target element detection model D is greater than the remaining resource amount 10%, and therefore, the target element detection model D does not satisfy the set performance condition.
The application will now be described with reference to a specific example.
It is assumed that there are N road collecting devices, N is a positive integer, each road collecting device corresponds to one collecting route, and the same road section may exist in the collecting route corresponding to each road collecting device.
The server sends acquisition instructions to the N road acquisition devices respectively, wherein the acquisition instructions can be verification type task instructions or discovery type task instructions. Each road collecting device in the N road collecting devices collects road elements according to the collecting route after receiving the collecting instruction.
In the process of collecting road elements according to the collecting route for each road collecting device, when the road collecting device N is about to drive to one road section in the collecting route (for example, the distance between the road collecting device N and one road section reaches a set distance threshold value), at least one target element detection model meeting set performance conditions is screened out from target element detection models based on the acquired performance consumption evaluation values and combined with the calculation resource allowance, and then road element identification is carried out according to each target sampling image collected in the road section based on the screened at least one target element detection model, so that a corresponding road element identification result is obtained, and then the road element identification result is reported to a server. Of course, the road collecting device may report the road element recognition results of all the road segments in the collecting route to the server after obtaining the same, or report the road element recognition results of all the target sample images in one road segment in the collecting route to the server after obtaining the same.
Taking any one of the N road collecting devices as an example, referring to fig. 12A, it is assumed that the collecting sections of the road collecting device include sections such as section 1, section 2, section 3, and the like.
Firstly, counting CPU occupation conditions of road acquisition equipment in a period of time, obtaining Pmax of the road acquisition equipment, and initializing a performance accumulated value Psum, wherein the Psum initialization value is 0. Wherein Pmax may be an average value of the CPU idle rate. Let pmax=30%.
Next, respective performance consumption evaluation values of each target element detection model are obtained based on the historical performance statistics, each target element detection model includes a target element detection model a, a target element detection model B, and a target element detection model C, and the respective performance consumption evaluation values of each target element detection model include pa, pb, pc, and pa, pb, and pc are respectively 10%, 15%, and 18%.
And then, obtaining a value sequence { va, vb and vc } of each road section according to the element distribution density and element weight of each road element type in each road section issued by the server.
When the road acquisition equipment is about to run to the road section 1, sequencing the target element detection model A, the target element detection model B and the target element detection model C according to the values of va, vb and vc corresponding to the road section 1 to obtain a sequencing result, wherein the sequencing result is as follows: a target element detection model A, a target element detection model B, and a target element detection model C.
The road acquisition device sequentially performs the following operations for the target element detection model a, the target element detection model B, and the target element detection model C based on the sorting result:
first, for the target element detection model a, there is no element detection model that has been screened at this time, and therefore, the performance consumption evaluation value of each of the at least one target element detection model that has been screened is 0, the amount of used resources is 0 (i.e., psum=0), the remaining amount of resources is determined to be 30% based on the amount of used resources and Pmax, and at this time, the performance consumption evaluation value of the target element detection model a is 10% and not more than 30% of the remaining amount of resources, and therefore, the target element detection model a is regarded as the target element detection model that satisfies the set performance condition.
Next, for the target element detection model B, the screened target element detection model includes a target element detection model a, the used resource amount 10% is obtained based on the performance consumption evaluation value of the target element detection model a, and the remaining resource amount 30% -10% = 20% is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value of the target element detection model B is not more than 15% and is not more than 20% of the remaining resource amount, so that the target element detection model B is taken as the target element detection model satisfying the set performance condition.
Next, for the target element detection model C, the screened target element detection model includes a target element detection model a and a target element detection model B, the used resource amount 25% is obtained based on the performance consumption evaluation values of the target element detection model a and the target element detection model B, and the remaining resource amount 30% -25% = 5% is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value 18% of the target element detection model C is greater than the remaining resource amount 30%, so that the target element detection model C does not satisfy the set performance condition.
Then, the road collecting device may cut out the target sampled image based on the element distribution area corresponding to each preset road element type for each target sampled image collected in the road section 1, obtain the element sub-image set corresponding to each road element type, and respectively perform road element recognition on the corresponding element sub-image set based on the target element detection model a and the target element detection model B, obtain the corresponding road element recognition result, and upload the road element recognition result to the server.
Referring to fig. 12B, before the road collecting device travels to the road segment 2, the target element detection model a, the target element detection model B, and the target element detection model C are ranked according to the values of va, vb, and vc corresponding to the road segment 2, so as to obtain a ranking result, where the ranking result is: a target element detection model B, a target element detection model a, and a target element detection model C.
The road acquisition device sequentially performs the following operations for the target element detection model B, the target element detection model a, and the target element detection model C based on the sorting result:
first, for the target element detection model B, there is no element detection model that has been screened at this time, and therefore, the performance consumption evaluation value of each of the at least one target element detection model that has been screened is 0, the amount of used resources is 0 (i.e., psum=0), the remaining amount of resources is determined to be 30% based on the amount of used resources and Pmax, and at this time, the performance consumption evaluation value of the target element detection model B is 15% and not more than 30% of the remaining amount of resources, and therefore, the target element detection model B is regarded as the target element detection model that satisfies the set performance condition.
Next, for the target element detection model a, the screened target element detection model includes a target element detection model B, 15% of the used resource amount is obtained based on the performance consumption evaluation value of the target element detection model B, and 30% -15% = 15% of the remaining resource amount is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value of the target element detection model a is not more than 10% of the remaining resource amount 15%, so that the target element detection model a is taken as the target element detection model satisfying the set performance condition.
Next, for the target element detection model C, the screened target element detection model includes a target element detection model a and a target element detection model B, the used resource amount 25% is obtained based on the performance consumption evaluation values of the target element detection model a and the target element detection model B, and the remaining resource amount 30% -25% = 5% is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value 18% of the target element detection model C is greater than the remaining resource amount 30%, so that the target element detection model C does not satisfy the set performance condition.
Then, the road collecting device may cut out the target sampled image based on the element distribution area corresponding to each preset road element type for each target sampled image collected in the road section 2, obtain the element sub-image set corresponding to each road element type, and respectively perform road element recognition on the corresponding element sub-image set based on the target element detection model a and the target element detection model B, obtain the corresponding road element recognition result, and upload the road element recognition result to the server.
Referring to fig. 12C, before the road collecting device travels to the road segment 3, the target element detection model a, the target element detection model B, and the target element detection model C are ranked according to the values of va, vb, and vc corresponding to the road segment 3, so as to obtain a ranking result, where the ranking result is: a target element detection model C, a target element detection model a, and a target element detection model B.
The road acquisition device sequentially performs the following operations for the target element detection model C, the target element detection model a, and the target element detection model B based on the sorting result:
first, for the target element detection model C, there is no element detection model that has been screened at this time, and therefore, the performance consumption evaluation value of each of the at least one target element detection model that has been screened is 0, the amount of used resources is 0 (i.e., psum=0), the remaining amount of resources is determined to be 30% based on the amount of used resources and Pmax, and at this time, the performance consumption evaluation value of the target element detection model C is 18% and not more than 30% of the remaining amount of resources, and therefore, the target element detection model C is regarded as the target element detection model that satisfies the set performance condition.
Next, for the target element detection model a, the screened target element detection model includes a target element detection model C, the used resource amount 18% is obtained based on the performance consumption evaluation value of the target element detection model C, and the remaining resource amount 30% -18% = 12% is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value of the target element detection model a is not more than 10% of the remaining resource amount 12%, so that the target element detection model a is taken as the target element detection model satisfying the set performance condition.
Next, for the target element detection model B, the screened target element detection model includes a target element detection model a and a target element detection model C, the used resource amount 28% is obtained based on the performance consumption evaluation values of the target element detection model a and the target element detection model C, and the remaining resource amount 30% -28% = 2% is determined based on the used resource amount and the calculation resource remaining amount, and the performance consumption evaluation value of the target element detection model B is 15% greater than the remaining resource amount 2%, so that the target element detection model B does not satisfy the set performance condition.
Then, the road collecting device may cut out the target sampled image based on the element distribution area corresponding to each preset road element type for each target sampled image collected in the road section 2, obtain the element sub-image set corresponding to each road element type, and respectively perform road element recognition on the corresponding element sub-image set based on the target element detection model a and the target element detection model C, obtain the corresponding road element recognition result, and upload the road element recognition result to the server.
Through the implementation mode, the large model is split into the small model with smaller performance consumption, and the identification accuracy of the independent road elements can be improved while more equipment performance limits are met. In addition, the model combination can be dynamically adjusted according to the road network information, and the type of the acquisition element is dynamically adjusted on the premise of limited equipment performance, so that the value of the acquisition element is maximized.
Based on the same inventive concept, the embodiment of the application provides a road element identification device. As shown in fig. 13, which is a schematic structural diagram of the road element identifying device 1300, may include:
an image processing unit 1301, configured to cut a target sampling image based on a preset element distribution area corresponding to each road element type, so as to obtain an element sub-image set corresponding to each road element type;
an element detection unit 1302, configured to respectively identify road elements on the corresponding element sub-image sets based on the respective target element detection models corresponding to the respective road element types, so as to obtain corresponding road element identification results; each target element detection model is trained according to a sample image set belonging to the corresponding road element type.
As a possible implementation manner, the element detection unit 1302 is specifically configured to, when performing road element recognition on the corresponding element sub-image set based on the target element detection model corresponding to each road element type, obtain a corresponding road element recognition result:
acquiring respective performance consumption evaluation values of the target element detection models, and acquiring computing resource allowance of the road acquisition equipment;
Screening at least one target element detection model meeting a set performance condition from the target element detection models based on the acquired performance consumption evaluation values and combining the computing resource allowance;
and respectively carrying out road element recognition on the corresponding element sub-image sets based on the at least one target element detection model to obtain corresponding road element recognition results.
As a possible implementation manner, when the element detection unit 1302 is specifically configured to, based on the obtained performance consumption evaluation values and in combination with the computing resource margin, screen out at least one target element detection model that meets the set performance condition from the target element detection models:
based on the element distribution density corresponding to each road element type in the acquisition road section of the target sampling image, obtaining element value evaluation values corresponding to each target element detection model;
and screening at least one target element detection model meeting a set performance condition from the target element detection models based on the performance consumption evaluation value and the element value evaluation value of each target element detection model by combining the computing resource allowance.
As a possible implementation manner, in the collecting road section based on the target sampled image, the element detecting unit 1302 is specifically configured to:
for each road element type, the following operations are respectively executed:
acquiring element weights corresponding to one road element type, and acquiring corresponding element value evaluation values based on element distribution density corresponding to the one road element type in an acquisition road section of the target sampling image by combining the element weights;
and taking the element value evaluation value corresponding to the one road element type as the element value evaluation value of the target element detection model corresponding to the one road element type.
As a possible implementation manner, the target element detection model corresponding to each road element type is an element detection model for completing a verification type task, wherein the verification type task is a task of updating a known element of the collected road section;
the element detection unit 1302 is specifically configured to, in the collecting road section based on the target sampled image, combine the element distribution density corresponding to the one road element type with the element weight to obtain a corresponding element value evaluation value:
And directly obtaining an element value evaluation value corresponding to the road element type by combining the element weight based on the element distribution density corresponding to the road element type in the acquisition road section of the target sampling image.
As a possible implementation manner, the target element detection model corresponding to each road element type is an element detection model for completing a discovery task, where the discovery task is a task of performing new element detection on the collected road segment;
the element detection unit 1302 is specifically configured to, in the collecting road section based on the target sampled image, combine the element distribution density corresponding to the one road element type with the element weight to obtain a corresponding element value evaluation value:
obtaining a density difference value by combining the element distribution density corresponding to the type of the road element with the reference distribution density set for the type of the road element based on the acquisition road section of the target sampling image;
and obtaining an element value evaluation value corresponding to the road element type based on the density difference value and the element weight.
As a possible implementation manner, when the computing resource margin is combined with the performance consumption evaluation value and the element value evaluation value of each target element detection model, and at least one target element detection model satisfying the set performance condition is screened out from the target element detection models, the element detection unit 1302 is specifically configured to:
Ranking the target element detection models based on the obtained element value evaluation values to obtain ranking results;
based on the sorting result, the following operations are sequentially executed for each target element detection model:
obtaining the amount of used resources based on the performance consumption evaluation value of each of the screened at least one target element detection model, and determining the amount of residual resources based on the amount of used resources and the calculated resource allowance;
and if the performance consumption evaluation value of the current target element detection model is not greater than the residual resource amount, using the current target element detection model as a target element detection model meeting the set performance condition.
As one possible implementation, each road element type corresponds to two candidate element detection models, including: a first candidate element detection model for completing a verification-type task and a second candidate element detection model for completing a discovery-type task; the element detection unit 1302 is further configured to:
if a verification type task instruction is received, using a first candidate element detection model corresponding to each road element type as a target element detection model corresponding to each road element type;
If a discovery task instruction is received, using a second candidate element detection model corresponding to each road element type as a target element detection model corresponding to each road element type;
the verification type task is a task for updating known elements of the acquisition road section, and the discovery type task is a task for detecting new elements of the acquisition road section.
As a possible implementation, the element detection unit 1302 is further configured to:
based on the element distribution area corresponding to the one road element type, respectively carrying out image cutting on each initial sample in the initial sample set to obtain a sample image set corresponding to the one road element type;
performing iterative training on a first initial element detection model corresponding to the road element type based on the sample image set to obtain a corresponding first candidate element detection model; wherein, in each iteration process, the following operations are performed:
performing element recognition on a plurality of sample images in the sample image set based on the first initial element detection model to obtain a prediction result;
and based on the prediction result, combining the real results corresponding to the sample images to obtain the accuracy of the current iteration, and adjusting the model parameters based on the accuracy of the current iteration.
As a possible implementation, the element detection unit 1302 is further configured to:
based on the element distribution area corresponding to the one road element type, respectively carrying out image cutting on each initial sample in the initial sample set to obtain a sample image set corresponding to the one road element type;
performing iterative training on a second initial element detection model corresponding to the road element type based on the sample image set to obtain a corresponding second candidate element detection model; wherein, in each iteration process, the following operations are performed:
performing element recognition on a plurality of sample images in the sample image set based on the second initial element detection model to obtain a prediction result;
based on the prediction result, combining the real results corresponding to the sample images to obtain the recall rate of the current iteration, and adjusting the model parameters based on the accuracy rate of the current iteration.
For convenience of description, the above parts are described as being functionally divided into modules (or units) respectively. Of course, the functions of each module (or unit) may be implemented in the same piece or pieces of software or hardware when implementing the present application.
The specific manner in which the respective units execute the requests in the apparatus of the above embodiment has been described in detail in the embodiment concerning the method, and will not be described in detail here.
Those skilled in the art will appreciate that the various aspects of the application may be implemented as a system, method, or program product. Accordingly, aspects of the application may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
Based on the same inventive concept, the embodiment of the application also provides electronic equipment. In one embodiment, the electronic device may be a server or a terminal device. Referring to fig. 14, which is a schematic structural diagram of one possible electronic device provided in an embodiment of the present application, in fig. 14, an electronic device 1400 includes: a processor 1410, and a memory 1420.
The memory 1420 stores a computer program executable by the processor 1410, and the processor 1410 can execute the steps of the digest generation method by executing the instructions stored in the memory 1420.
Memory 1420 may be volatile memory (RAM), such as random-access memory (RAM); the Memory 1420 may be a nonvolatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a hard disk (HDD) or a Solid State Drive (SSD); or memory 1420, is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. Memory 1420 may also be a combination of the above.
The processor 1410 may include one or more central processing units (central processing unit, CPU) or digital processing units, etc. A processor 1410 for implementing the digest generation method described above when executing a computer program stored in a memory 1420.
In some embodiments, processor 1410 and memory 1420 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The particular connection medium between the processor 1410 and the memory 1420 is not limited to the specific connection medium described above in embodiments of the present application. In the embodiment of the present application, the processor 1410 and the memory 1420 are connected by a bus, which is depicted in fig. 14 by a bold line, and the connection manner between other components is only schematically illustrated, and is not limited thereto. The buses may be divided into address buses, data buses, control buses, etc. For ease of description, only one thick line is depicted in fig. 14, but only one bus or one type of bus is not depicted.
Based on the same inventive concept, an embodiment of the present application provides a computer readable storage medium comprising a computer program for causing an electronic device to perform the steps of the above summary generation method when the computer program is run on the electronic device. In some possible embodiments, aspects of the summary generating method provided by the present application may also be implemented in the form of a program product comprising a computer program for causing an electronic device to perform the steps of the summary generating method described above, when the program product is run on the electronic device, e.g. the electronic device may perform the steps as shown in fig. 2.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (Compact Disk Read Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product of embodiments of the present application may take the form of a CD-ROM and comprise a computer program and may run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a computer program for use by or in connection with a command execution system, apparatus, or device.
The readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave in which a readable computer program is embodied. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a computer program for use by or in connection with a command execution system, apparatus, or device.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.