CN115439646A - Sample division method, device, equipment, storage medium and vehicle - Google Patents

Sample division method, device, equipment, storage medium and vehicle Download PDF

Info

Publication number
CN115439646A
CN115439646A CN202210971485.3A CN202210971485A CN115439646A CN 115439646 A CN115439646 A CN 115439646A CN 202210971485 A CN202210971485 A CN 202210971485A CN 115439646 A CN115439646 A CN 115439646A
Authority
CN
China
Prior art keywords
frame
anchor
anchor frame
real
positive sample
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.)
Pending
Application number
CN202210971485.3A
Other languages
Chinese (zh)
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.)
Beijing Rockwell Technology Co Ltd
Original Assignee
Beijing Rockwell 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 Beijing Rockwell Technology Co Ltd filed Critical Beijing Rockwell Technology Co Ltd
Priority to CN202210971485.3A priority Critical patent/CN115439646A/en
Publication of CN115439646A publication Critical patent/CN115439646A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/771Feature selection, e.g. selecting representative features from a multi-dimensional feature space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Abstract

The disclosure relates to a sample division method, a sample division device, equipment, a storage medium and a vehicle. The method comprises the steps of calculating the ratio of the overlapping degree and the Euclidean distance of each anchor frame in target anchor frames, calculating the sum of the mean value of the ratio and the variance of the preset threshold multiplied by the ratio, selecting the anchor frame with the ratio larger than the sum as a positive sample, realizing target detection of single-scale features and the single-scale anchor frame, completing division of the positive sample, adding the preset threshold on the basis of an original statistical mode, and adjusting a preset model, so that the sample division is more accurate, positive samples are guaranteed to be selected, the detection precision is improved, and the reliability and the stability of the target detection are improved.

Description

Sample division method, device, equipment, storage medium and vehicle
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a vehicle for dividing a sample.
Background
With the development of economic technology and the improvement of living standard of people, the computer vision technology is widely applied to the production and the life of people, and brings endless convenience to the production and the life of people. The target detection method is a research direction of computer vision, which is developed rapidly in recent years, and has also been widely applied to aspects of our lives, such as fields of unmanned driving, medical treatment, agriculture and the like.
Under the general condition, in the field of target detection, two target detection schemes based on anchor point positioning and not based on anchor point positioning are established as main detection model construction ideas, in the target detection scheme based on anchor point positioning, a target detection task usually needs to accept or reject speed and precision, sometimes, the precision is compared, and a user is more concerned about the speed, so that a single-scale feature and a single-scale anchor frame are preferentially selected, but a statistical mode used in the existing scheme is normal distribution to divide samples, and when the single-scale feature and the single-scale anchor frame are used, the distribution is not normal distribution, so that the division of positive and negative samples of target detection is invalid.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present disclosure provides a sample division method, apparatus, device, storage medium, and vehicle to improve detection accuracy, reliability, and stability.
In a first aspect, an embodiment of the present disclosure provides a sample dividing method, including:
acquiring at least one anchor frame and at least one real frame;
calculating the overlapping degree and the Euclidean distance between each real frame and each anchor frame, and selecting at least one target anchor frame from the at least one anchor frame according to the Euclidean distance between each real frame and each anchor frame aiming at each real frame;
calculating the ratio of the overlapping degree and the Euclidean distance of each anchor frame in the target anchor frames;
calculating the sum of the mean of the ratio and a preset threshold value multiplied by the variance of the ratio;
and selecting the anchor frame with the ratio value larger than the sum value as a positive sample.
In some embodiments, calculating the euclidean distance of each real frame from each anchor frame comprises:
acquiring the central point of each real frame and the central point of each anchor frame;
and calculating the distance between the center point of each real frame and the center point of each anchor frame.
In some embodiments, the center point of the real frame is an intersection point of the diagonals of the real frame, and the center point of the anchor frame is an intersection point of the diagonals of the anchor frame.
In some embodiments, the method further comprises:
and screening the positive sample, and outputting the screened positive sample.
In some embodiments, screening the positive sample and outputting a screened positive sample comprises:
checking whether the center points of the positive samples are all inside a real frame;
if so, taking the positive sample as a screened positive sample, and outputting the screened positive sample;
if not, taking the positive sample with the central point inside the real frame as the screened positive sample, and outputting the screened positive sample.
In some embodiments, the method further comprises:
and dividing the at least one anchor frame according to the screened positive sample, and outputting other anchor frames except the screened positive sample as negative samples.
In a second aspect, an embodiment of the present disclosure provides a sample dividing apparatus, including:
the acquisition module is used for acquiring at least one anchor frame and at least one real frame;
the first selection module is used for calculating the overlapping degree and the Euclidean distance between each real frame and each anchor frame, and selecting at least one target anchor frame from the at least one anchor frame according to the Euclidean distance between each real frame and each anchor frame aiming at each real frame;
the first calculation module is used for calculating the ratio of the overlapping degree and the Euclidean distance of each anchor frame in the target anchor frames;
the second calculation module is used for calculating the sum of the mean value of the ratio and the variance of the ratio multiplied by a preset threshold value;
and the second selection module is used for selecting the anchor frame with the ratio value larger than the sum value as the positive sample.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, the computer program being executed by a processor to implement the method of the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product comprising a computer program or instructions, which when executed by a processor, implement the method of the first aspect.
In a sixth aspect, the disclosed embodiments also provide a vehicle, including: the sample dividing apparatus of the second aspect; alternatively, the electronic device of the third aspect; alternatively, a computer readable storage medium as described in the fourth aspect.
According to the sample dividing method, the sample dividing device, the sample dividing equipment, the storage medium and the vehicle, the sizes and the positions of the anchor frame and the real frame are determined by acquiring the at least one anchor frame and the at least one real frame; calculating the overlapping degree and Euclidean distance between each real frame and each anchor frame, selecting at least one target anchor frame from at least one anchor frame according to the Euclidean distance between each real frame and each anchor frame aiming at each real frame, and determining the number of the target anchor frames on a single scale; calculating the ratio of the overlapping degree and the Euclidean distance of each anchor frame in the target anchor frames, and providing a data basis for subsequently selecting a positive sample; calculating the sum of the mean value of the ratio and the variance of the ratio multiplied by a preset threshold value, and providing a basis rule for subsequent positive sample determination; selecting the anchor frame with the ratio larger than the sum as a positive sample, realizing the target detection of the single-scale characteristic and the single-scale anchor frame, completing the division of the positive sample, adding a preset threshold value on the basis of the original statistical mode for adjusting a preset model, so that the division of the sample is more accurate, the positive sample is ensured to be selected, the detection precision is improved, and the reliability and the stability of the target detection are improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the embodiments or technical solutions in the prior art description will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart of a sample division method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a real box provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a real frame and an anchor frame provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of real and anchor frame center points provided by an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a sample dividing apparatus provided in an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
The embodiment of the present disclosure provides a sample division method, which is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a sample division method provided in an embodiment of the present disclosure. The method can be executed by a sample dividing device, which can be implemented in software and/or hardware, and the sample dividing device can be configured in an electronic device, such as a server or a terminal, where the terminal specifically includes a preset model and the like, and the preset model is loaded with a program written by a user. In addition, the method can be applied to an application scenario of sample division, and it can be understood that the sample division method provided by the embodiment of the present disclosure can also be applied to other scenarios.
The following describes a sample division method shown in fig. 1, which includes the following specific steps:
s101, obtaining at least one anchor frame and at least one real frame.
The anchor boxes (anchor boxes) are predefined and the width and height of the boxes are roughly the same as the width and height of the target object in the data set according to the prior boxes set by the target object, in other words, most objects in the data set can find the anchor boxes with the same size. These borders have different aspect ratios and scales (scales) in order to cover as much as possible the aspect of the object push that may occur in the dataset. These anchor frames are usually rectangular, with squares being the special rectangle. The position of the anchor frame can reflect the approximate position of the object, the aspect ratio of the anchor frame can reflect the figure proportion of the object, and the dimension of the anchor frame can reflect the size of the object.
The real frame, also called a real-border box (gt bbox), represents a real frame that can enclose an object, including the size and position of the real frame, as shown in fig. 2, and the real frames corresponding to 3 persons are the real frame 21, the real frame 22, and the real frame 23, respectively.
The preset model obtains at least one anchor frame and at least one real frame.
Optionally, the anchor frame may be manually set, or may be obtained through learning by a convolutional neural network, specifically including a position of the anchor frame and a size of the anchor frame, and the anchor frame has two expression methods, the first expression method is to express by vertex coordinates (x 1, y 1) at the upper left corner and vertex coordinates (x 2, y 2) at the lower right corner, that is, (x 1, y1, x2, y 2); the second is represented by coordinates (x, y) of the center point of the anchor frame, the width (width, w) of the anchor frame, and the height (light, h) of the anchor frame, i.e., (x, y, w, h).
S102, calculating the overlapping degree and the Euclidean distance between each real frame and each anchor frame, and selecting at least one target anchor frame from the at least one anchor frame according to the Euclidean distance between each real frame and each anchor frame aiming at each real frame.
Overlap over Union (IoU), is a measure of the accuracy with which a corresponding object is detected in a particular data set. The IoU is a simple measurement standard, and can be used for measurement as long as the task of obtaining a prediction range (boundary boxes) in the output is achieved. This is the ratio of intersection to union, which ranges from 0 to 1000.
Euclidean distance, typically a euclidean metric, is a commonly used definition of distance, which refers to the true distance between two points in an m-dimensional space, or the natural length of a vector (i.e., the distance of the point from the origin). The euclidean distance in two and three dimensions is the actual distance between two points.
Respectively calculating the overlapping degree of each real frame and each anchor frame, taking a real frame and an anchor frame as an example, and recording the overlapping area of the real frame and the anchor frame as the intersection of the real frame and the anchor frame; the difference between the overlapping area of the real frame and the anchor frame subtracted from the total area of the real frame and the anchor frame is recorded as the union of the real frame and the anchor frame, and the overlapping degree is the ratio of the intersection to the union and generally ranges from 0 to 1000. And respectively calculating the Euclidean distance between each real frame and each anchor frame. And aiming at each real frame, selecting at least one target anchor frame from the at least one anchor frame according to the Euclidean distance between the real frame and each anchor frame.
Specifically, as shown in fig. 3, when the real frame is 31 and the anchor frames are 32, 33, 34, 35, and 36, 3 target anchor frames are selected from the at least one anchor frame according to the euclidean distance between the real frame and each anchor frame, and the selected target anchor frames are 32, 33, and 34. It can be understood that, in general, 9 target anchor frames are selected for calculation, in this embodiment, for simplicity and better expression of calculation, 3 target anchor frames are taken as an example for explanation, in other embodiments, other numbers of target anchor frames may also be used, and this embodiment is not limited specifically.
S103, calculating the ratio of the overlapping degree and the Euclidean distance of each anchor frame in the target anchor frame.
Calculating the ratio 1 of the overlapping degree and the Euclidean distance of the target anchor frame 32 and the real frame 31 in the target anchor frames 32, 33 and 34; the ratio of the overlapping degree of the target anchor frame 33 and the real frame 31 to the Euclidean distance is 2; the ratio of the overlap of the target anchor frame 34 and the real frame 31 to the euclidean distance is 3.
And S104, calculating the sum of the mean value of the ratio and the variance of the ratio multiplied by a preset threshold value.
Calculating the mean value of the ratio 1, the ratio 2 and the ratio 3, wherein the mean value = (the ratio 1+ the ratio 2+ the ratio 3) ÷ 3;
calculate the variance of the ratio 1, ratio 2, ratio 3, the variance = [ ((ratio 1-mean value) ]) 2 + (ratio 2-mean) 2 + (ratio 3-mean) 2 】÷3;
Sum = mean + preset threshold × variance.
It will be appreciated that the preset threshold may be considered an adjustment in order to ensure that positive samples are selected.
And S105, selecting the anchor frame with the ratio value larger than the sum value as a positive sample.
And comparing the ratio 1, the ratio 2 and the ratio 3 with the sum value, and selecting the anchor frame with the ratio larger than the sum value as a positive sample.
The size and the position of the anchor frame and the real frame are determined by acquiring the at least one anchor frame and the at least one real frame; calculating the overlapping degree and the Euclidean distance between each real frame and each anchor frame, selecting at least one target anchor frame from at least one anchor frame according to the Euclidean distance between each real frame and each anchor frame aiming at each real frame, and determining the number of the target anchor frames on a single scale; calculating the ratio of the overlapping degree and the Euclidean distance of each anchor frame in the target anchor frames, and providing a data basis for subsequently selecting a positive sample; calculating the sum of the mean value of the ratio and the variance of the ratio multiplied by a preset threshold value, and providing a basis rule for subsequently determining a positive sample; selecting the anchor frame with the ratio larger than the sum as a positive sample, realizing the target detection of the single-scale characteristic and the single-scale anchor frame, completing the division of the positive sample, adding a preset threshold value on the basis of the original statistical mode for adjusting a preset model, enabling the division of the sample to be more accurate, ensuring the selection of the positive sample, improving the detection precision and improving the reliability and stability of the target detection.
On the basis of the above embodiment, calculating the euclidean distance between each real frame and each anchor frame includes: acquiring the central point of each real frame and the central point of each anchor frame; and calculating the distance between the center point of each real frame and the center point of each anchor frame.
Acquiring the central point of each real frame and the central point of each anchor frame; and calculating the distance between the center point of each real frame and the center point of each anchor frame, wherein the center point of the real frame is the intersection point of the diagonal lines of the real frame, and the center point of the anchor frame is the intersection point of the diagonal lines of the anchor frame. Taking a real frame 31 as an example, the euclidean distance between the real frame 31 and each anchor frame is calculated. As shown in fig. 4, the center point O of the real frame 31, the center point a of the anchor frame 32, the center point B of the anchor frame 33, the center point C of the anchor frame 34, the center point D of the anchor frame 35, and the center point E of the anchor frame 36 are obtained, the euclidean distance OA between the real frame 31 and the anchor frame 32, the euclidean distance OB between the real frame 31 and the anchor frame 33, the euclidean distance OC between the real frame 31 and the anchor frame 34, the euclidean distance OD between the real frame 31 and the anchor frame 35, and the euclidean distance OE between the real frame 31 and the anchor frame 36 are calculated, the magnitudes of the distances OA, OB, OC, OD, and OE are compared, and the minimum 3 distances are selected as the target anchor frame. It is understood that the minimum 3 distances may be equal or different, for example, the distance may be 2cm, or 1cm, 2cm, 3cm, and the like, and the distance may also be other numbers including real numbers such as decimal, fractional, irrational, and the like, which is not limited in this embodiment.
According to the embodiment of the disclosure, through the calculation method for describing the Euclidean distance, the Euclidean distance between each real frame and each anchor frame is determined, a data base is laid for subsequent sample division, the detection precision is further improved, and the reliability and the stability are improved.
In some embodiments, the method further comprises: and screening the positive sample, and outputting the screened positive sample.
Specifically, the screening of the positive sample, and the outputting of the screened positive sample includes: checking whether the center points of the positive samples are all inside a real frame; if so, taking the positive sample as a screened positive sample, and outputting the screened positive sample; and if not, taking the positive sample with the central point inside the real frame as the screened positive sample, and outputting the screened positive sample.
Checking whether the central points of the positive samples are all inside a real frame, if so, taking the positive samples as screened positive samples and outputting the screened positive samples; and if not, taking the positive sample with the central point inside the real frame as the screened positive sample, and outputting the screened positive sample.
Specifically, if all the anchor frames 32, 33, and 34 are positive samples, it is checked whether the center points of the positive samples are all inside the real frames, and the center point C of the anchor frame 34 is not inside the real frames, so that the anchor frames 32 and 33 having the center points inside the real frames are used as the positive samples after screening, and the positive sample anchor frames 32 and 33 after screening are output.
The embodiment of the disclosure further improves the accuracy of target detection by screening and checking the positive sample.
In some embodiments, the method further comprises: and dividing the at least one anchor frame according to the screened positive sample, and outputting other anchor frames except the screened positive sample as negative samples.
And dividing the at least one anchor frame according to the screened positive sample, and removing the screened positive sample to obtain other anchor frames as negative samples.
The embodiment of the disclosure solves the problem that the existing scheme is applied to the target detection of the single-scale features and the single-scale anchor frame by dividing the positive and negative samples, and improves the detection precision to ensure that the target detection has high accuracy and good effect.
Fig. 5 is a schematic structural diagram of a sample dividing apparatus provided in an embodiment of the present disclosure. The sample dividing apparatus may be a preset model as described in the above embodiments, in which a program written by a user is installed, or may be a component or assembly in the preset model. The sample dividing apparatus provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the sample dividing method, as shown in fig. 5, the sample dividing apparatus 50 includes: an obtaining module 51, a first selecting module 52, a first calculating module 53, a second calculating module 54 and a second selecting module 55; the obtaining module 51 is configured to obtain at least one anchor frame and at least one real frame; a first selecting module 52, configured to calculate an overlapping degree and an euclidean distance between each real frame and each anchor frame, and select, for each real frame, at least one target anchor frame from the at least one anchor frame according to the euclidean distance between the real frame and each anchor frame; a first calculating module 53, configured to calculate a ratio of an overlapping degree and an euclidean distance of each of the target anchor frames; a second calculating module 54, configured to calculate a sum of the mean of the ratio and a variance of the ratio multiplied by a preset threshold; a second selection module 55, configured to select the anchor frame with the ratio greater than the sum as the positive sample.
Optionally, the first selecting module 52 is further configured to obtain a central point of each real frame and a central point of each anchor frame; and calculating the distance between the center point of each real frame and the center point of each anchor frame.
Optionally, the central point of the real frame is the intersection point of the diagonal lines of the real frame, and the central point of the anchor frame is the intersection point of the diagonal lines of the anchor frame.
Optionally, the sample dividing apparatus 50 further includes: a screening module 56; the screening module 56 is configured to screen the positive sample and output the screened positive sample.
Optionally, the screening module 56 is further configured to check whether the central points of the positive samples are all inside the real frame;
if so, taking the positive sample as a screened positive sample, and outputting the screened positive sample;
and if not, taking the positive sample with the central point inside the real frame as the screened positive sample, and outputting the screened positive sample.
Optionally, the sample dividing apparatus 50 further includes: an output module 57; the output module 57 is configured to divide the at least one anchor frame according to the screened positive sample, and output other anchor frames excluding the screened positive sample as negative samples.
The sample dividing apparatus in the embodiment shown in fig. 5 can be used to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, and are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device may be a terminal as described in the above embodiments. The electronic device provided in the embodiment of the present disclosure may execute the processing procedure provided in the embodiment of the sample division method, and as shown in fig. 6, the electronic device 60 includes: memory 61, processor 62, computer programs and communication interface 63; wherein a computer program is stored in the memory 61 and is configured to execute the sample division method as described above by the processor 62.
In addition, the embodiment of the present disclosure also provides a computer readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the sample division method described in the above embodiment.
Furthermore, the embodiments of the present disclosure also provide a computer program product, which includes a computer program or instructions, when executed by a processor, implement the sample division method as described above.
In addition, the embodiment of the present disclosure also provides a vehicle, which includes the sample dividing device as described in the above embodiment; or an electronic device as described in the above embodiments; or a computer readable storage medium as in the previous embodiments.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
acquiring at least one anchor frame and at least one real frame;
calculating the overlapping degree and Euclidean distance between each real frame and each anchor frame, and selecting at least one target anchor frame from the at least one anchor frame according to the Euclidean distance between the real frame and each anchor frame aiming at each real frame;
calculating the ratio of the overlapping degree of each anchor frame in the target anchor frames to the Euclidean distance;
calculating the sum of the mean value of the ratio and a preset threshold value multiplied by the variance of the ratio;
and selecting the anchor frame with the ratio value larger than the sum value as a positive sample.
In addition, the electronic device may also perform other steps in the sample division method as described above.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of sample division, the method comprising:
acquiring at least one anchor frame and at least one real frame;
calculating the overlapping degree and the Euclidean distance between each real frame and each anchor frame, and selecting at least one target anchor frame from the at least one anchor frame according to the Euclidean distance between each real frame and each anchor frame aiming at each real frame;
calculating the ratio of the overlapping degree of each anchor frame in the target anchor frames to the Euclidean distance;
calculating the sum of the mean value of the ratio and a preset threshold value multiplied by the variance of the ratio;
and selecting the anchor frame with the ratio value larger than the sum value as a positive sample.
2. The method of claim 1, wherein calculating the euclidean distance between each real box and each anchor box comprises:
acquiring the central point of each real frame and the central point of each anchor frame;
and calculating the distance between the center point of each real frame and the center point of each anchor frame.
3. The method of claim 2, wherein the center point of the real frame is an intersection point of the real frame diagonals, and the center point of the anchor frame is an intersection point of the anchor frame diagonals.
4. The method of claim 1, further comprising:
and screening the positive sample, and outputting the screened positive sample.
5. The method of claim 4, wherein the screening the positive sample and outputting the screened positive sample comprises:
checking whether the center points of the positive samples are all inside a real frame;
if so, taking the positive sample as a screened positive sample, and outputting the screened positive sample;
and if not, taking the positive sample with the central point inside the real frame as the screened positive sample, and outputting the screened positive sample.
6. The method of claim 4, further comprising:
and dividing the at least one anchor frame according to the screened positive sample, and outputting other anchor frames except the screened positive sample as negative samples.
7. A sample dividing apparatus, the apparatus comprising:
the acquisition module is used for acquiring at least one anchor frame and at least one real frame;
the first selection module is used for calculating the overlapping degree and the Euclidean distance between each real frame and each anchor frame, and selecting at least one target anchor frame from the at least one anchor frame according to the Euclidean distance between each real frame and each anchor frame aiming at each real frame;
the first calculation module is used for calculating the ratio of the overlapping degree and the Euclidean distance of each anchor frame in the target anchor frames;
the second calculation module is used for calculating the sum of the mean value of the ratio and the variance of the ratio multiplied by a preset threshold value;
and the second selection module is used for selecting the anchor frame with the ratio value larger than the sum value as the positive sample.
8. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
10. A vehicle, characterized by comprising: the sample dividing apparatus of claim 7; or, the electronic device of claim 8; alternatively, the computer-readable storage medium of claim 9.
CN202210971485.3A 2022-08-12 2022-08-12 Sample division method, device, equipment, storage medium and vehicle Pending CN115439646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210971485.3A CN115439646A (en) 2022-08-12 2022-08-12 Sample division method, device, equipment, storage medium and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210971485.3A CN115439646A (en) 2022-08-12 2022-08-12 Sample division method, device, equipment, storage medium and vehicle

Publications (1)

Publication Number Publication Date
CN115439646A true CN115439646A (en) 2022-12-06

Family

ID=84242212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210971485.3A Pending CN115439646A (en) 2022-08-12 2022-08-12 Sample division method, device, equipment, storage medium and vehicle

Country Status (1)

Country Link
CN (1) CN115439646A (en)

Similar Documents

Publication Publication Date Title
CN108960090B (en) Video image processing method and device, computer readable medium and electronic equipment
CN112598762B (en) Three-dimensional lane line information generation method, device, electronic device, and medium
CN110276346B (en) Target area recognition model training method, device and computer readable storage medium
US8204714B2 (en) Method and computer program product for finding statistical bounds, corresponding parameter corners, and a probability density function of a performance target for a circuit
CN113607185B (en) Lane line information display method, lane line information display device, electronic device, and computer-readable medium
CN113793356B (en) Lane line detection method and device
CN112150490A (en) Image detection method, image detection device, electronic equipment and computer readable medium
CN112183627A (en) Method for generating predicted density map network and vehicle annual inspection mark number detection method
CN110657760B (en) Method and device for measuring space area based on artificial intelligence and storage medium
CN113781478A (en) Oil tank image detection method, oil tank image detection device, electronic equipment and computer readable medium
US20230384085A1 (en) Phase unwrapping method based on multi-view constraints of light field and related components
CN115439646A (en) Sample division method, device, equipment, storage medium and vehicle
CN112150491A (en) Image detection method, image detection device, electronic equipment and computer readable medium
CN110852242A (en) Watermark identification method, device, equipment and storage medium based on multi-scale network
CN111680754B (en) Image classification method, device, electronic equipment and computer readable storage medium
CN115471477A (en) Scanning data denoising method, scanning device, scanning equipment and medium
CN114241044A (en) Loop detection method, device, electronic equipment and computer readable medium
CN110634159A (en) Target detection method and device
CN111582456B (en) Method, apparatus, device and medium for generating network model information
CN112597788A (en) Target measuring method, target measuring device, electronic apparatus, and computer-readable medium
CN114387498A (en) Target detection method and device, electronic equipment and storage medium
CN114399555B (en) Data online calibration method and device, electronic equipment and computer readable medium
CN113642510A (en) Target detection method, device, equipment and computer readable medium
CN111726476A (en) Image processing method, device, equipment and computer readable medium
CN113538558B (en) Volume measurement optimization method, system, equipment and storage medium based on IR diagram

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