CN114882472A - Parking space detection method, computer readable storage medium and vehicle - Google Patents

Parking space detection method, computer readable storage medium and vehicle Download PDF

Info

Publication number
CN114882472A
CN114882472A CN202210540471.6A CN202210540471A CN114882472A CN 114882472 A CN114882472 A CN 114882472A CN 202210540471 A CN202210540471 A CN 202210540471A CN 114882472 A CN114882472 A CN 114882472A
Authority
CN
China
Prior art keywords
parking space
sample
detection model
unlabeled
space detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210540471.6A
Other languages
Chinese (zh)
Other versions
CN114882472B (en
Inventor
刘振强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Weilai Zhijia Technology Co Ltd
Original Assignee
Anhui Weilai Zhijia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui Weilai Zhijia Technology Co Ltd filed Critical Anhui Weilai Zhijia Technology Co Ltd
Priority to CN202210540471.6A priority Critical patent/CN114882472B/en
Publication of CN114882472A publication Critical patent/CN114882472A/en
Application granted granted Critical
Publication of CN114882472B publication Critical patent/CN114882472B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads
    • G06V20/586Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads of parking space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention relates to the field of automatic driving, in particular to a parking space detection method, a computer readable storage medium and a vehicle, and aims to solve the problem that the existing parking space detection model has poor identification capability on other objects similar to parking spaces in the environment. For this purpose, the parking space detection method of the invention comprises the following steps: according to the confidence level set of the non-label samples and the preset number of the parking spaces, a parking space containing weighing value corresponding to each non-label sample is determined, a difficult-to-load sample is screened from the current non-label sample subset to be screened according to the parking space containing weighing value and a parking space containing weighing threshold value, a label training sample set is expanded by the difficult-to-load sample, a parking space detection model to be trained is trained based on the expanded label training sample set, and the trained parking space detection model is obtained. The trained parking space detection model is used for carrying out parking space detection on the driving environment image to be detected, so that a parking space detection result of the driving environment image to be detected is obtained, and the accuracy of parking space detection is effectively improved.

Description

Parking space detection method, computer readable storage medium and vehicle
Technical Field
The invention relates to the field of automatic driving, and particularly provides a parking space detection method, a computer-readable storage medium and a vehicle.
Background
When a target detection model is trained in the prior art, the target detection model is usually trained based on a relatively fixed manual labeling data set, and the problem of target misjudgment easily occurs due to poor recognition capability of other objects similar to a target in a wider environment.
Taking parking space detection as an example, parking space detection is an important component of an automatic parking function in an automatic driving function of a vehicle, and features such as a vehicle line in the surrounding environment of the vehicle are generally recognized through a visual perception method to obtain parking space information. However, there are a great variety of ground draw lines in scenes around urban roads/parking lots, and in the parking space search process, currently, a visual-based parking space detection model detects a parking space in an image by using a deep neural network, which generally focuses on parking space detection in a parking space scene, uses a parking space area in a corresponding scene as a positive sample and a non-parking space area as a negative sample, and performs training on a parking space detection model after marking the positive sample and the negative sample.
Disclosure of Invention
The invention aims to solve the technical problem that after the existing parking space detection model is trained based on a relatively fixed manual labeling data set, the obtained parking space detection model has poor identification capability on other objects similar to a parking space in the environment and is easy to misjudge.
In a first aspect, the present invention provides a parking space detection method, including:
acquiring a driving environment image to be detected;
carrying out parking space detection on the driving environment image to be detected by using a pre-trained parking space detection model to obtain a parking space detection result of the driving environment image to be detected;
the parking space detection model is obtained through the following steps:
acquiring a labeled training sample set and a non-labeled sample set of a parking space scene image;
selecting part of unlabeled samples from the unlabeled sample set to construct a current unlabeled sample subset to be screened, wherein the current unlabeled sample subset to be screened comprises at least one unlabeled sample;
acquiring a parking space confidence coefficient set of each non-tag sample, determining a parking space containing weighing value corresponding to each non-tag sample according to the parking space confidence coefficient set and a preset parking space number, and screening a difficult-to-load sample from the current non-tag sample subset to be screened at least based on the parking space containing weighing value and a parking space containing weighing threshold value;
and expanding the labeled training sample set by using the difficult-to-load sample, and training the parking space detection model to be trained based on the expanded labeled training sample set to obtain the parking space detection model.
In some embodiments, the set of parking place confidences includes at least one parking place confidence, each parking place confidence corresponding to one parking place detected from the unlabeled sample; according to the parking space confidence set and the preset parking space number, determining the parking space containing weighing value corresponding to each non-label sample, including:
when the parking space confidence coefficient set comprises a parking space confidence coefficient, determining a parking space containing weighing value corresponding to the non-tag sample according to the ratio of the parking space confidence coefficient to the preset parking space number;
when the parking space confidence degree set comprises a plurality of parking space confidence degrees, the parking space confidence degrees are arranged according to the size, the parking space confidence degrees of the preset parking space number are sequentially selected from the largest parking space confidence degree, and the parking space containing weighing value corresponding to the label-free sample is determined according to the ratio of the sum of the parking space confidence degrees of the preset parking space number to the preset parking space number.
In some embodiments, the threshold value for weighing the vehicle-containing space includes a first threshold value for weighing the vehicle-containing space and a second threshold value for weighing the vehicle-containing space, where the first threshold value for weighing the vehicle-containing space is greater than the second threshold value for weighing the vehicle-containing space, and the screening of the nonnegative samples from the current subset of unlabeled samples to be screened based on at least the threshold value for weighing the vehicle-containing space and the threshold value for weighing the vehicle-containing space includes:
comparing the parking space containing weighing value corresponding to each non-tag sample in the current non-tag sample subset to be screened with the first parking space containing weighing threshold and the second parking space containing weighing threshold;
and screening the non-label sample corresponding to the parking space containing weighing value which is greater than or equal to the second parking space containing weighing threshold value which is less than or equal to the first parking space containing weighing threshold value as a difficult-to-load sample according to a comparison result.
In some embodiments, the threshold value of the measure of parking space comprises a second threshold value of the measure of parking space, and the screening of the difficult-to-negative sample from the current subset of unlabeled samples to be screened based on at least the measure of parking space and the threshold value of the measure of parking space comprises:
screening the non-label samples corresponding to the parking space containing weighing values smaller than the second parking space containing weighing threshold value to form an initial load-bearing sample set, and selecting the non-label samples from the initial load-bearing sample set as load-bearing samples according to the current iteration times.
In some embodiments, the selecting the unlabeled exemplar from the initial set of difficult examples as a difficult example according to the current iteration number comprises:
selecting from the set of initial hard-to-negative samples
Figure BDA0003647996740000031
The unlabeled exemplar of (a) is taken as a refractory exemplar, where t represents the current iteration number.
In some embodiments, the method further comprises: selecting part of unlabeled samples from the unlabeled sample set to construct an unlabeled verification sample set;
training the parking space detection model to be trained based on the extended labeled training sample set to obtain the parking space detection model, comprising:
training the parking space detection model to be trained based on the expanded labeled training sample set to obtain a preliminary parking space detection model;
detecting the non-tag verification sample set by using the preliminary parking space detection model, and determining the proportion of the samples containing the parking spaces in the non-tag verification sample set according to the detection result;
and analyzing whether an iteration stopping condition is met or not based on the sample proportion, and obtaining the parking space detection model based on the preliminary parking space detection model according to an analysis result.
In some embodiments, analyzing whether an iteration stop condition is satisfied based on the sample proportions comprises:
comparing the sample proportion with a historical sample proportion, and judging whether the sample proportion is smaller than the historical sample proportion, wherein the historical sample proportion is a sample proportion obtained by detecting the unlabeled verification sample set by the parking space detection model to be trained before training;
if so, determining that the iteration stop condition is not met; if not, determining that an iteration stop condition is met.
In some embodiments, when it is determined that the iteration stop condition is not satisfied, the obtaining the parking space detection model based on the preliminary parking space detection model according to the analysis result includes:
continuously selecting part of the unlabeled samples from the unlabeled sample set, and constructing a new unlabeled sample subset to be screened;
acquiring a new difficult-to-load sample based on the new unlabeled sample subset to be screened to continue expanding the labeled training sample set;
and continuing training the preliminary parking space detection model based on the labeled training sample set after continuing to expand until an iteration stop condition is met, so as to obtain the parking space detection model.
In a second aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for detecting a parking space is implemented.
In a third aspect, an embodiment of the present invention provides a vehicle, which includes a vehicle body, a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, implements the parking space detection method described in any one of the above.
Under the condition of adopting the technical scheme, the invention can determine the parking space containing weighing value corresponding to each non-label sample according to the confidence coefficient set and the preset parking space number of the non-label samples of the parking space scene image, screen out the difficult-to-load samples from the current non-label sample subset to be screened according to the parking space containing weighing value and the parking space containing weighing threshold value, expand the labeled training sample set by using the difficult-to-load samples, train the parking space detection model to be trained based on the expanded labeled training sample set, and obtain the trained parking space detection model. The method has the advantages that parking space detection is carried out on the driving environment image to be detected by utilizing the trained parking space detection model, the parking space detection result of the driving environment image to be detected is obtained, the method is based on the determined parking space containing weighing value and the determined parking space containing weighing threshold value, the difficultly loaded samples are automatically selected from the label-free sample set, sample marking is not needed, time and cost are saved, the labeled training sample set is expanded by utilizing the difficultly loaded samples, the identification capability of the parking space detection model on other objects similar to the parking space in the environment can be effectively improved, and further the accuracy and the detection efficiency of parking space detection can be effectively improved.
On the other hand, whether the sample proportion and the historical sample proportion of the parking space contained in the sample set meet the iteration stop condition is analyzed through label-free verification, and new difficult-to-load sample screening and parking space detection model training are alternately carried out before the iteration stop condition is met according to the analysis result, so that the model iteration efficiency is improved, and the parking space detection model with high accuracy is obtained.
Drawings
Preferred embodiments of the present invention are described below with reference to the accompanying drawings, in which:
fig. 1 is a schematic flow chart illustrating main steps of a parking space detection method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a parking space detection model training method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for determining a parking space-containing metric value corresponding to a non-tag sample according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of a method for screening a difficult-to-load sample according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of a method for screening a difficult-to-load sample according to another embodiment of the present invention;
fig. 6 is a schematic flow chart of a parking space detection model training method according to another embodiment of the present invention;
fig. 7 is a schematic flow chart of a parking space detection model training method according to a specific example of the present invention.
Detailed Description
Some embodiments of the invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and are not intended to limit the scope of the present invention.
When training the parking space detection model in the prior art, training the parking space detection model based on a relatively fixed manual labeling data set generally, and the problem of erroneous judgment easily occurs due to relatively poor recognition capability of other objects similar to the parking space in a wider environment.
In view of the above, the invention provides a parking space detection method, which determines a parking space containing weighing value corresponding to each non-tag sample according to a confidence level set and a preset parking space number of the non-tag sample, screens out a difficult-to-load sample from a current non-tag sample subset to be screened according to the parking space containing weighing value and a parking space containing weighing threshold value, expands a tag training sample set by using the difficult-to-load sample, and trains a parking space detection model to be trained based on the expanded tag training sample set to obtain a trained parking space detection model. The method has the advantages that parking space detection is carried out on the driving environment image to be detected by utilizing the trained parking space detection model, the parking space detection result of the driving environment image to be detected is obtained, the method is based on the determined parking space containing weighing value and the determined parking space containing weighing threshold value, the difficultly loaded samples are automatically selected from the label-free sample set, sample marking is not needed, time and cost are saved, the labeled training sample set is expanded by utilizing the difficultly loaded samples, the identification capability of the parking space detection model on other objects similar to the parking space in the environment can be effectively improved, and further the accuracy and the detection efficiency of parking space detection can be effectively improved.
Referring to fig. 1, fig. 1 is a schematic flow chart of main steps of a parking space detection method provided in an embodiment of the present invention, which may include:
step S11: acquiring a driving environment image to be detected;
step S12: carrying out parking space detection on the driving environment image to be detected by utilizing a pre-trained parking space detection model to obtain a parking space detection result of the driving environment image to be detected; in some embodiments, step S11 may be specifically configured to acquire the driving environment image to be detected based on a vehicle-mounted camera, a laser radar, a millimeter wave radar, or the like.
Referring to fig. 2, fig. 2 is a schematic flow chart of a parking space detection model training method according to an embodiment of the present invention, which may include:
step S21: acquiring a labeled training sample set and a non-labeled sample set of a parking space scene image;
step S22: selecting part of unlabeled samples from the unlabeled sample set to construct a current unlabeled sample subset to be screened, wherein the current unlabeled sample subset to be screened comprises at least one unlabeled sample;
step S23: acquiring a parking space confidence coefficient set of each non-tag sample, determining a parking space containing weighing value corresponding to each non-tag sample according to the parking space confidence coefficient set and the preset number of parking spaces, and screening a difficult-to-load sample from a current non-tag sample subset to be screened at least based on the parking space containing weighing value and a parking space containing weighing threshold value;
step S24: and expanding the labeled training sample set by using the difficult-to-load sample, and training the parking space detection model to be trained based on the expanded labeled training sample set to obtain the parking space detection model.
In some embodiments, the parking space scene image may include a parking space scene image including a parking space and a parking space scene image without a parking space, and step S21 may specifically be to obtain the parking space scene image including the parking space and/or the parking space scene image without the parking space and label the parking space in the parking space scene image manually or automatically, so as to obtain a labeled training sample of the parking space scene image; a labeled training sample set is constructed based on the labeled training samples, wherein the labeled training sample set may include at least one labeled training sample.
In some embodiments, the obtaining of the non-tag sample set of the parking space scene image may be to obtain a parking space scene image without a parking space and/or a parking space scene image including a parking space as a non-tag sample, and construct the non-tag sample set based on the non-tag sample; the unlabeled exemplar set can include a plurality of unlabeled exemplars. In some embodiments, the set of parking spot confidences includes at least one parking spot confidence, each parking spot confidence corresponding to a parking spot detected from the unlabeled sample.
In some embodiments, the obtaining of the parking space confidence set of each unlabeled sample in step S23 may specifically be that the parking space detection model to be trained is used to respectively detect a plurality of unlabeled samples in the unlabeled sample set, so as to obtain the parking space confidence set P of each unlabeled sample k =[q1,q2,..,q n ],P k Is the confidence set of the k-th unlabeled sample, qn is the confidence of a single parking space, and the range after the value domain normalization is [0,1 ]]。
In some embodiments, referring to fig. 3, fig. 3 is a schematic flow chart of a method for determining a parking space-containing metric value corresponding to a non-tag sample according to an embodiment of the present invention, where in step S23, the determining a parking space-containing metric value corresponding to each non-tag sample according to a parking space confidence set and a preset number of parking spaces includes:
step S31: when the parking space confidence coefficient set comprises a parking space confidence coefficient, determining a parking space containing weighing value corresponding to the non-tag sample according to the ratio of the parking space confidence coefficient to the preset number of parking spaces;
step S32: when the parking space confidence degree set comprises a plurality of parking space confidence degrees, the parking space confidence degrees are arranged according to the size, the parking space confidence degrees of the preset parking space number are sequentially selected from the maximum parking space confidence degree, and the parking space containing weighing value corresponding to the label-free sample is determined according to the ratio of the sum of the parking space confidence degrees of the preset parking space number to the preset parking space number.
Wherein, predetermine parking stall quantity and can set up as required, asIn an example, the preset parking space number is set to be N, and when the parking space confidence level set only comprises one parking space confidence level, the parking space confidence level set is P k =[q 1 ]The parking space containing quantity Prob is q 1 N; when the parking space confidence degree set comprises a plurality of parking space confidence degrees, the parking space confidence degrees can be arranged from large to small or from small to large, N parking space confidence degrees are sequentially selected from the largest parking space confidence degree, and the parking space containing weighing value corresponding to the non-label sample is determined according to the ratio of the sum of the N parking space confidence degrees to N.
The difficult negative sample can be a sample which does not contain a parking space, namely a parking space scene image corresponding to a non-parking space.
In some embodiments, the threshold value for measuring the vehicle position includes a first threshold value for measuring the vehicle position and a second threshold value for measuring the vehicle position, and the first threshold value for measuring the vehicle position is greater than the second threshold value for measuring the vehicle position.
In some embodiments, referring to fig. 4, fig. 4 is a flowchart illustrating a method for screening a difficult negative sample according to an embodiment of the present invention, and the step S23 of screening a difficult negative sample from a current unlabeled sample subset to be screened based on at least the parking space capacity value and the parking space capacity threshold value includes:
step S41: comparing the parking space containing weighing value corresponding to each non-label sample in the current non-label sample subset to be screened with a first parking space containing weighing threshold value and a second parking space containing weighing threshold value;
step S42: and screening out the non-label samples corresponding to the parking space containing weighing values which are more than or equal to the second parking space containing weighing threshold value and less than or equal to the first parking space containing weighing threshold value as the difficult-to-load samples according to the comparison result.
In other embodiments, the threshold value for the occupancy measure comprises a second threshold value for the occupancy measure.
In some embodiments, referring to fig. 5, fig. 5 is a flowchart illustrating a method for screening difficult negative samples according to another embodiment of the present invention, and the step S23 of screening difficult negative samples from the current unlabeled sample subset to be screened based on at least the parking space weighing value and the parking space weighing threshold includes:
step S51: and screening out the non-label samples with the parking space weighing values smaller than the second parking space weighing threshold value to form an initial load-bearing sample set, and selecting the non-label samples from the initial load-bearing sample set as load-bearing samples according to the current iteration times.
As an example, a selection is made from an initial set of hard-to-negative samples
Figure BDA0003647996740000081
The unlabeled exemplars of (2) are taken as the unmanageable exemplars, where t represents the current iteration number.
Wherein t is a positive integer greater than or equal to zero.
In other embodiments, the step S23 of screening the non-labeled sample subset to be screened out for the difficult-to-negative sample based on at least the parking space containing measure value and the parking space containing measure threshold value may include:
comparing the parking space containing weighing value corresponding to each non-label sample in the current non-label sample subset to be screened with a first parking space containing weighing threshold value and a second parking space containing weighing threshold value;
according to the comparison result, screening out non-label samples corresponding to the parking space containing weighing value which is greater than or equal to the second parking space containing weighing threshold value and less than or equal to the first parking space containing weighing threshold value, and taking all the non-label samples as difficult-to-load samples;
and screening out the non-label samples corresponding to the parking space containing weighing values smaller than the second parking space containing weighing threshold value to form an initial load-bearing sample set, and selecting the non-label samples from the initial load-bearing sample set as load-bearing samples according to the current iteration times.
In some embodiments, step S24 may specifically be to expand the labeled training sample set by using the hard-to-load sample, train the parking space detection model to be trained based on the expanded labeled training sample set, and use the trained parking space detection model to be trained as the parking space detection model.
In other embodiments, after the expanded labeled training sample set is used to train the parking space detection model to be trained in step S24, the trained parking space detection model to be trained may also be verified to determine whether an iteration stop condition is met, so as to obtain a parking space detection model with higher detection accuracy, which may be specifically described in the following embodiments.
The parking space detection model training method provided by the embodiment of the invention screens the difficult-to-load samples based on the determined parking space containing weighing value and the determined parking space containing weighing threshold value, automatically screens the difficult-to-load samples from the unlabeled sample set without carrying out sample marking, saves time and cost, realizes the coverage of the difficult-to-load samples in wider scenes by expanding the labeled training sample set by using the difficult-to-load samples, can effectively avoid false detection, effectively improves the identification capability of the parking space detection model on other objects similar to the parking space in the environment, and improves the detection efficiency.
Referring to fig. 6, fig. 6 is a schematic flow chart of a parking space detection model training method according to another embodiment of the present invention, which may include:
step S61: acquiring a labeled training sample set and a non-labeled sample set of a parking space scene image;
step S62: selecting part of unlabeled samples from the unlabeled sample set to construct a current unlabeled sample subset to be screened, wherein the current unlabeled sample subset to be screened comprises at least one unlabeled sample;
step S63: acquiring a parking space confidence coefficient set of each non-tag sample, determining a parking space containing weighing value corresponding to each non-tag sample according to the parking space confidence coefficient set and the preset parking space number, and screening out a difficult-to-load sample from the current non-tag sample subset to be screened at least based on the parking space containing weighing value and a parking space containing weighing threshold value;
step S64: expanding a labeled training sample set by using the difficult-to-load sample;
step S65: selecting part of unlabeled samples from the unlabeled sample set to construct an unlabeled verification sample set;
step S66: training the parking space detection model to be trained based on the expanded labeled training sample set to obtain a preliminary parking space detection model;
step S67: detecting the non-tag verification sample set by using a preliminary parking space detection model, and determining the proportion of the samples containing the parking spaces in the non-tag verification sample set according to the detection result;
step S68: and analyzing whether the iteration stop condition is met or not based on the sample proportion, and obtaining a parking space detection model based on the preliminary parking space detection model according to the analysis result.
Steps S61 to S63 may be implemented in the same manner as steps S21 to S23, and for brevity, detailed description is omitted here, and reference may be made to the above description.
Step S64 may be specifically configured to add the determined hard negative samples to the labeled training sample set to expand the labeled training sample set. In some embodiments, the number of hard negative samples used to augment the tagged training sample set accounts for [ 5%, 50% ] of the number of tagged training samples in the tagged training sample set.
In some embodiments, step S65 may be embodied as selecting a part of unlabeled exemplars from the unlabeled exemplar set to construct the unlabeled verification exemplar set, where the unlabeled verification exemplar set includes at least one unlabeled exemplar that does not belong to the subset of the unlabeled exemplars currently to be screened.
In other embodiments, step S65 may be further embodied to select a part of unlabeled samples from the unlabeled sample set except for the remaining unlabeled samples belonging to the current unlabeled sample subset to be screened to construct the unlabeled verification sample set.
In some embodiments, whether the iteration stop condition is satisfied based on the sample proportion analysis in step S68 may specifically be:
comparing the sample proportion with the historical sample proportion, and judging whether the sample proportion is smaller than the historical sample proportion, wherein the historical sample proportion is the sample proportion obtained by detecting a non-label verification sample set by the parking space detection model to be trained before training;
if so, determining that the iteration stop condition is not met; if not, determining that an iteration stop condition is met.
In some embodiments, when it is determined that the iteration stop condition is not satisfied, obtaining the parking space detection model based on the preliminary parking space detection model according to the analysis result in step S68 may include:
continuously selecting part of unlabeled samples from the unlabeled sample set, and constructing a new unlabeled sample subset to be screened;
acquiring a new difficult-to-load sample based on the new unlabeled sample subset to be screened, and continuing to expand the labeled training sample set;
and continuing training the preliminary parking space detection model based on the continuously expanded labeled training sample set until an iteration stop condition is met, so as to obtain the parking space detection model.
In some embodiments, a new unlabeled sample subset to be screened is constructed by continuously selecting part of the unlabeled samples from the unlabeled sample set, and a new unlabeled sample subset to be screened may be constructed by selecting part of the unlabeled samples from the unlabeled samples in the unlabeled sample set except the unlabeled sample subset to be screened and the unlabeled verification sample set.
In some embodiments, the initial parking space detection model is continuously trained based on the labeled training sample set after continuous expansion to obtain an initial parking space detection model after first iteration, the initial parking space detection model after first iteration can be verified based on the unlabeled verification sample set, and whether the sample proportion in the unlabeled verification sample set detected by the initial parking space detection model after first iteration is smaller than the sample proportion obtained by detecting the unlabeled verification sample set by the initial parking space detection model before first iteration is judged; if the situation that the iteration stopping condition is met is determined, the steps of constructing a new unlabeled sample subset to be screened, obtaining a new difficultly loaded sample, expanding a labeled training sample set and training a primary parking space detection model obtained after the last iteration can be executed in a circulating mode, and the primary parking space detection model after the current iteration is verified based on the unlabeled verification sample set after each iteration until the iteration stopping condition is met, so that the parking space detection model is obtained.
The parking space detection model training method provided by another embodiment of the invention can achieve the same beneficial effects as the embodiment shown in fig. 2, and meanwhile, the preliminary parking space detection model obtained after training is verified based on the unlabeled verification sample set, and the sample proportion detected based on the preliminary parking space detection model is compared with the historical sample proportion, so that whether the iteration stop condition is met is determined according to the comparison result, the iteration efficiency can be effectively improved, and the parking space detection model with higher accuracy can be obtained.
As a specific example, referring to fig. 7, fig. 7 is a schematic flow chart of a parking space detection model training method according to a specific example of the present invention.
The parking space detection model training method can be roughly divided into several stages of model reasoning, difficult-to-load sample screening, building of a non-parking space difficult-to-load sample set, model training and model updating.
Wherein, the model reasoning phase: the method comprises the steps that data are collected by vehicles, wherein the data collected by the vehicles can be used for collecting parking space scene images around the vehicles, the parking space scene images are used as label-free samples, and label-free sample sets are constructed on the basis of the label-free samples;
sampling from part of the unlabeled sample set to obtain an unlabeled sample subset to be screened;
inputting the to-be-screened non-label sample subset into the parking space detection model to obtain a detection result of each non-label sample in the to-be-screened non-label sample subset;
and (3) difficult-to-load sample screening stage: judging whether the non-tag sample contains a parking space or not according to the detection result of each non-tag sample; if so, discarding the unlabeled exemplar; if not, judging the difficult negative samples, discarding the samples which do not belong to the difficult negative samples, and using the unlabeled samples which belong to the difficult negative samples to construct a parking space-free difficult negative sample set.
And the non-label samples containing the parking spaces in the current non-label sample subset to be screened can be obtained by utilizing the parking space containing weighing value and the parking space containing weighing threshold value. Specifically, the parking space containing measurement threshold may include a first parking space containing measurement threshold, and when the parking space containing measurement value of the non-tag sample is greater than the first parking space containing measurement threshold, it is determined that a parking space is contained in the non-tag sample, and the non-tag sample is discarded.
The parking space-containing measurement threshold value can also comprise a second parking space-containing measurement threshold value, and for the rest non-tag samples in the current non-tag sample subset to be screened, which are less than or equal to the first parking space-containing measurement threshold value, the difficult-to-load samples can be judged according to the second parking space-containing measurement threshold value or the second parking space-containing measurement threshold value and the current iteration number.
A model training stage: the constructed parking-space-free difficult-to-load sample is integrated into a training data set to obtain an expanded training data set, wherein the training data set before expansion is a labeled training sample set; and inputting the expanded training data set into a parking space detection model, wherein the parking space detection model is a parking space detection model in a model reasoning stage and serves as a pre-training model.
And (3) updating the model: and updating the pre-trained parking space detection model in the model inference stage by using the obtained parking space detection model after training.
The parking space scene image may include a parking space scene image including a parking space and/or a parking space scene image without a parking space, the parking space scene image including a parking space may include features such as a parking space line, and the parking space scene image without a parking space may include non-parking space line features such as ground texture.
In some embodiments, the above stages may be executed in a loop, and the parking space detection model is continuously iteratively trained based on the new to-be-screened unlabeled sample subset until the trained parking space detection model meets the iteration stop condition.
It will be understood by those skilled in the art that all or part of the flow of the method of the embodiments described above may be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying said computer program code, media, usb disk, removable hard disk, magnetic diskette, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunication signals, software distribution media, etc.
Another aspect of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the parking space detection method according to any of the above embodiments can be implemented.
The computer readable storage medium may be a storage device formed by including various electronic devices, and optionally, the computer readable storage medium is a non-transitory computer readable storage medium in the embodiment of the present invention.
In another aspect of the present invention, there is also provided a vehicle including: the parking space detection method comprises a vehicle body, a memory and a processor, wherein a computer program is stored in the memory, and the computer program is executed by the processor to realize the parking space detection method in any one of the embodiments.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (10)

1. A parking space detection method is characterized by comprising the following steps:
acquiring a driving environment image to be detected;
carrying out parking space detection on the driving environment image to be detected by using a pre-trained parking space detection model to obtain a parking space detection result of the driving environment image to be detected;
the parking space detection model is obtained through the following steps:
acquiring a labeled training sample set and a non-labeled sample set of a parking space scene image;
selecting part of unlabeled samples from the unlabeled sample set to construct a current unlabeled sample subset to be screened, wherein the current unlabeled sample subset to be screened comprises at least one unlabeled sample;
acquiring a parking space confidence coefficient set of each non-tag sample, determining a parking space containing weighing value corresponding to each non-tag sample according to the parking space confidence coefficient set and a preset parking space number, and screening a difficult-to-load sample from the current non-tag sample subset to be screened at least based on the parking space containing weighing value and a parking space containing weighing threshold value;
and expanding the labeled training sample set by using the difficult-to-load sample, and training the parking space detection model to be trained based on the expanded labeled training sample set to obtain the parking space detection model.
2. The method of claim 1, wherein the set of parking space confidences includes at least one parking space confidence level, each parking space confidence level corresponding to a parking space detected from the unlabeled samples; according to the parking space confidence set and the preset parking space number, determining the parking space containing weighing value corresponding to each non-label sample, including:
when the parking space confidence coefficient set comprises a parking space confidence coefficient, determining a parking space containing weighing value corresponding to the non-tag sample according to the ratio of the parking space confidence coefficient to the preset parking space number;
and when the parking space confidence degree set comprises a plurality of parking space confidence degrees, the parking space confidence degrees are arranged according to the size, the parking space confidence degrees of the preset number of parking spaces are sequentially selected from the maximum parking space confidence degree, and the parking space containing weighing value corresponding to the non-tag sample is determined according to the ratio of the sum of the parking space confidence degrees of the preset number of parking spaces to the preset number of parking spaces.
3. The method of claim 1, wherein the threshold value for the measure of vehicle-containing space comprises a first threshold value for the measure of vehicle-containing space and a second threshold value for the measure of vehicle-containing space, the first threshold value for the measure of vehicle-containing space is greater than the second threshold value for the measure of vehicle-containing space, and the step of screening the subset of unlabeled samples to be screened for the hard negative samples based on at least the value for the measure of vehicle-containing space and the threshold value for the measure of vehicle-containing space comprises:
comparing the parking space containing weighing value corresponding to each non-tag sample in the current non-tag sample subset to be screened with the first parking space containing weighing threshold and the second parking space containing weighing threshold;
and screening the non-label sample corresponding to the parking space containing weighing value which is greater than or equal to the second parking space containing weighing threshold value which is less than or equal to the first parking space containing weighing threshold value as a difficult-to-load sample according to a comparison result.
4. The method of claim 1, wherein the threshold value for the measure of occupancy comprises a second threshold value for the measure of occupancy, and wherein the step of screening the subset of unlabeled samples to be currently screened for the hard negative sample based on at least the threshold value for the measure of occupancy and the threshold value for the measure of occupancy comprises:
screening the non-label samples corresponding to the parking space containing weighing values smaller than the second parking space containing weighing threshold value to form an initial load-bearing sample set, and selecting the non-label samples from the initial load-bearing sample set as load-bearing samples according to the current iteration times.
5. The method of claim 4, wherein selecting the unlabeled exemplar from the initial set of difficult examples as the difficult example according to the current iteration number comprises:
selecting from the set of initial hard-to-negative samples
Figure FDA0003647996730000021
The unlabeled exemplar of (a) is taken as a refractory exemplar, where t represents the current iteration number.
6. The method of claim 1, further comprising: selecting part of unlabeled samples from the unlabeled sample set to construct a unlabeled verification sample set;
training the parking space detection model to be trained based on the extended labeled training sample set to obtain the parking space detection model, comprising:
training the parking space detection model to be trained based on the expanded labeled training sample set to obtain a preliminary parking space detection model;
detecting the non-tag verification sample set by using the preliminary parking space detection model, and determining the proportion of the samples containing the parking spaces in the non-tag verification sample set according to the detection result;
and analyzing whether an iteration stopping condition is met or not based on the sample proportion, and obtaining the parking space detection model based on the preliminary parking space detection model according to an analysis result.
7. The method of claim 6, wherein analyzing whether an iteration stop condition is satisfied based on the sample proportion comprises:
comparing the sample proportion with a historical sample proportion to judge whether the sample proportion is smaller than the historical sample proportion, wherein the historical sample proportion is a sample proportion obtained by detecting the unlabeled verification sample set by the parking space detection model to be trained before training;
if so, determining that the iteration stop condition is not met; if not, determining that an iteration stop condition is met.
8. The method according to claim 6 or 7, wherein when it is determined that the iteration stop condition is not satisfied, the obtaining the parking space detection model based on the preliminary parking space detection model according to the analysis result comprises:
continuously selecting part of the unlabeled samples from the unlabeled sample set, and constructing a new unlabeled sample subset to be screened;
acquiring a new difficult-to-load sample based on the new unlabeled sample subset to be screened to continue expanding the labeled training sample set;
and continuing training the preliminary parking space detection model based on the labeled training sample set after continuing to expand until an iteration stop condition is met, so as to obtain the parking space detection model.
9. A computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method for detecting a parking space according to any one of claims 1 to 8 is implemented.
10. A vehicle comprising a vehicle body, a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the parking space detection method according to any one of claims 1 to 8.
CN202210540471.6A 2022-05-17 2022-05-17 Parking space detection method, computer readable storage medium and vehicle Active CN114882472B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210540471.6A CN114882472B (en) 2022-05-17 2022-05-17 Parking space detection method, computer readable storage medium and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210540471.6A CN114882472B (en) 2022-05-17 2022-05-17 Parking space detection method, computer readable storage medium and vehicle

Publications (2)

Publication Number Publication Date
CN114882472A true CN114882472A (en) 2022-08-09
CN114882472B CN114882472B (en) 2024-06-21

Family

ID=82674995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210540471.6A Active CN114882472B (en) 2022-05-17 2022-05-17 Parking space detection method, computer readable storage medium and vehicle

Country Status (1)

Country Link
CN (1) CN114882472B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112489676A (en) * 2020-12-15 2021-03-12 腾讯音乐娱乐科技(深圳)有限公司 Model training method, device, equipment and storage medium
CN112488237A (en) * 2020-12-07 2021-03-12 北京天融信网络安全技术有限公司 Training method and device for classification model
CN113420849A (en) * 2021-08-25 2021-09-21 深圳市信润富联数字科技有限公司 Model online incremental training method, device and medium based on active learning
WO2021218024A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Method and apparatus for training named entity recognition model, and computer device
CN113935389A (en) * 2020-06-29 2022-01-14 华为技术有限公司 Data annotation method and device, computing equipment and storage medium
CN114298176A (en) * 2021-12-16 2022-04-08 重庆大学 Method, device, medium and electronic equipment for detecting fraudulent user

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021218024A1 (en) * 2020-04-29 2021-11-04 平安科技(深圳)有限公司 Method and apparatus for training named entity recognition model, and computer device
CN113935389A (en) * 2020-06-29 2022-01-14 华为技术有限公司 Data annotation method and device, computing equipment and storage medium
CN112488237A (en) * 2020-12-07 2021-03-12 北京天融信网络安全技术有限公司 Training method and device for classification model
CN112489676A (en) * 2020-12-15 2021-03-12 腾讯音乐娱乐科技(深圳)有限公司 Model training method, device, equipment and storage medium
CN113420849A (en) * 2021-08-25 2021-09-21 深圳市信润富联数字科技有限公司 Model online incremental training method, device and medium based on active learning
CN114298176A (en) * 2021-12-16 2022-04-08 重庆大学 Method, device, medium and electronic equipment for detecting fraudulent user

Also Published As

Publication number Publication date
CN114882472B (en) 2024-06-21

Similar Documents

Publication Publication Date Title
US9547866B2 (en) Methods and apparatus to estimate demography based on aerial images
CN101975940B (en) Segmentation combination-based adaptive constant false alarm rate target detection method for SAR image
CN112668594B (en) Unsupervised image target detection method based on antagonism domain adaptation
CN104424466A (en) Object detection method, object detection device and image pickup device
CN111881757B (en) Pedestrian re-identification method, device, equipment and medium
CN110940971B (en) Radar target point trace recording method and device and storage medium
CN107590486B (en) Moving object identification method and system, and bicycle flow statistical method and equipment
CN115116012B (en) Method and system for detecting parking state of vehicle parking space based on target detection algorithm
CN113312508A (en) Vehicle image retrieval method and device
KR20230057646A (en) Multi-level transition region-based domain adaptive object detection apparatus and method
CN115861738A (en) Category semantic information guided remote sensing target detection active sampling method
CN113255580A (en) Method and device for identifying sprinkled objects and vehicle sprinkling and leaking
CN101996312A (en) Method and device for tracking targets
CN111027601B (en) Plane detection method and device based on laser sensor
CN114882472A (en) Parking space detection method, computer readable storage medium and vehicle
CN111444816A (en) Multi-scale dense pedestrian detection method based on fast RCNN
CN114648683B (en) Neural network performance improving method and device based on uncertainty analysis
CN109686110A (en) Parking stall sky expires condition discrimination method and apparatus
CN110942073A (en) Container trailer number identification method and device and computer equipment
CN112651996B (en) Target detection tracking method, device, electronic equipment and storage medium
Amarasooriya et al. Implementation of Smart Parking System Using Image Processing
CN111488927B (en) Classification threshold determining method, device, electronic equipment and storage medium
CN111723719B (en) Video target detection method, system and device based on category external memory
CN111488771B (en) OCR hooking method, device and equipment
CN116012598A (en) Image recognition method, device, equipment and medium based on Bayesian linearity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant