CN111144494A - Object detection model training method, object detection device, object detection equipment and object detection medium - Google Patents

Object detection model training method, object detection device, object detection equipment and object detection medium Download PDF

Info

Publication number
CN111144494A
CN111144494A CN201911378418.5A CN201911378418A CN111144494A CN 111144494 A CN111144494 A CN 111144494A CN 201911378418 A CN201911378418 A CN 201911378418A CN 111144494 A CN111144494 A CN 111144494A
Authority
CN
China
Prior art keywords
object detection
training sample
image
training
scale interval
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
CN201911378418.5A
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.)
Ruimo Intelligent Technology Shenzhen Co ltd
Original Assignee
Ruimo Intelligent Technology Shenzhen 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 Ruimo Intelligent Technology Shenzhen Co ltd filed Critical Ruimo Intelligent Technology Shenzhen Co ltd
Priority to CN201911378418.5A priority Critical patent/CN111144494A/en
Publication of CN111144494A publication Critical patent/CN111144494A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/29Graphical models, e.g. Bayesian networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an object detection model training method, an object detection device, an object detection equipment and a medium. The object detection model training method comprises the following steps: obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals; adjusting the corresponding data augmentation strategy according to the scale interval; and respectively utilizing the adjusted data amplification strategies to amplify the training sample images, and utilizing the amplified training sample images to train the corresponding detection sub-modules in the initial network model according to the scale interval to obtain the object detection model. According to the method, the network complexity is not required to be increased, the data diversity is increased by adjusting the data augmentation strategy, and the detection rate of the trained object detection model can be effectively improved.

Description

Object detection model training method, object detection device, object detection equipment and object detection medium
Technical Field
The invention relates to the technical field of image processing, in particular to an object detection model training method, an object detection device, an object detection equipment and an object detection medium.
Background
The target detection is an important function in the field of computational vision, has wide research value and application value, and along with the development of deep learning, the performance of the target detection is greatly improved, so that the requirements of most scenes can be met. In the application process, the detection rate of an object of a certain scale is high, and the detection rate of objects of other scales is low, so that the effective detection of objects of any scale cannot be ensured. In order to solve the problem, the existing target detection method considers that the same semantic features are introduced into models of objects with different scales or a scheme that a complex loss function is designed to emphasize the objects with low detection rate is adopted, but the introduction of the same semantic features into the models of the objects with different scales often requires complex network design and can increase the complexity of a target detection algorithm, and the design of the complex function can emphasize the object with a certain specific scale by the target detection algorithm, which can reduce the detection rate of the objects with other scales to a certain extent.
Disclosure of Invention
The invention provides an object detection model training method, an object detection device, an object detection model training device, an object detection model detection equipment and a storage, which can effectively improve the detection rate of an object detection model obtained through training by increasing data diversity through adjusting a data amplification strategy without increasing network complexity.
In order to realize the design, the invention adopts the following technical scheme:
in a first aspect, an object detection model training method is provided, and includes:
obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals;
adjusting the corresponding data augmentation strategy according to the scale interval;
and respectively utilizing the adjusted data amplification strategies to amplify the training sample images, and utilizing the amplified training sample images to train the corresponding detection sub-modules in the initial network model according to the scale interval to obtain the object detection model.
A second aspect provides an object detection method, including:
acquiring an image to be detected;
carrying out object detection on the image to be detected; the object detection method is realized based on an object detection model, and the object detection model is obtained by adopting the object detection model training method.
A third aspect provides an object detection model training apparatus, including:
the model acquisition module is used for acquiring an initial network model, and the initial network model comprises at least two detection submodules aiming at objects in different scale intervals;
the strategy adjusting module is used for adjusting the corresponding data augmentation strategy according to the scale interval;
and the model training module is used for respectively utilizing the adjusted data augmentation strategy to augment the training sample images, and utilizing the augmented training sample images to train the corresponding detection sub-modules in the initial network model according to the scale interval to obtain the object detection model.
A fourth aspect provides an object detection model, wherein the object detection model is obtained by training using the object detection model training method described above, and the object detection model includes:
the image acquisition module is used for acquiring an image to be detected;
and the detection module comprises detection submodules corresponding to all scale intervals and is used for carrying out object detection on the image to be detected.
A fifth aspect provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the object detection model training method as described above or implementing the object detection method as described above when executing the program.
A sixth aspect provides a computer readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a processor, implement the object detection model training method as described above, or implement the object detection method as described above.
Compared with the prior art, the invention has the beneficial effects that: the detection sub-modules are added on the basis of the initial network model aiming at different scale intervals, each scale interval corresponds to one data amplification strategy and one detection sub-module, the training sample image is amplified by utilizing the adjusted data amplification strategy, the corresponding detection sub-modules in the initial network model are trained by utilizing the amplified training sample image, the object detection model is obtained, the network complexity is not required to be increased, and the detection rate of the trained object detection model can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the contents of the embodiments of the present invention and the drawings without creative efforts.
Fig. 1 is a flowchart of an object detection model training method according to an embodiment of the present invention.
Fig. 2 is a flowchart of an object detection model training method according to a second embodiment of the present invention.
Fig. 3 is a flowchart of an object detection model training method according to a third embodiment of the present invention.
Fig. 4 is a flowchart of an object detection method according to a fourth embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an object detection model training apparatus according to a fifth embodiment of the present invention.
Fig. 6 is a schematic substructure diagram of an object detection model training apparatus according to a sixth embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an object detection model according to a seventh embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a computer device according to an eighth embodiment of the present invention.
Detailed Description
In order to make the technical problems solved, the technical solutions adopted, and the technical effects achieved by the present invention clearer, the technical solutions in the embodiments of the present application are described below with reference to the drawings in the embodiments of the present application. The specific embodiments described herein are merely illustrative of some, but not all embodiments of the present application, and are intended to be used in an illustrative, rather than a restrictive, sense.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing embodiments only and is not intended to be limiting of the present application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Some example embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps in this document can be performed in parallel, concurrently or simultaneously. Further, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Example one
Referring to fig. 1, the present embodiment provides an object detection model training method, as shown in the figure, the method includes the following steps:
s101, obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals.
Obtaining an initial network model according to a predefined network structure and a training method, where the initial network model is a conventional model for detecting an object, for example, an SSD algorithm based on a VGG network structure, obtaining an initial network model based on a VGG network according to the training method of the SSD algorithm, and creating different detection sub-modules for different scale intervals in the initial network model. For the division of the scale interval, as an embodiment, the scale may be divided into three scale intervals of [0.00001,0.3), [0.3,0.6), and [0.6,1.0], and then the corresponding initial network model further includes 3 detection sub-modules respectively corresponding to the objects in the three scale intervals.
And S102, adjusting the corresponding data augmentation strategy according to the scale interval.
And performing off-line adjustment on the corresponding data amplification strategies according to different scale intervals to amplify the marked objects to the scales corresponding to the scale intervals.
And S103, respectively amplifying training sample images by using the adjusted data amplification strategies, and training corresponding detection sub-modules in the initial network model by using the amplified training sample images according to the scale interval to obtain an object detection model.
Each scale interval corresponds to a data amplification strategy and a detection submodule, and network training is carried out on the scale intervals. And for a scale interval, adjusting a data amplification strategy according to the scale interval, amplifying a training sample image by using the adjusted data amplification strategy, then training corresponding detection sub-modules in the initial network model according to the scale interval by using the amplified training sample image, and obtaining the initial network model including at least two trained detection sub-modules, namely the object detection model, after the training of the detection sub-modules corresponding to all the scale intervals is completed.
In this embodiment, detection sub-modules are added for different scale intervals on the basis of an initial network model, each scale interval corresponds to a data amplification strategy and a detection sub-module, a training sample image is amplified by using the adjusted data amplification strategy, the corresponding detection sub-modules in the initial network model are trained by using the amplified training sample image to obtain an object detection model, the initial network model is obtained by a conventional technology, then the detection sub-modules in the initial network model are trained, network complexity does not need to be increased, and the detection rate of the trained object detection model can be effectively improved.
Example two
Referring to fig. 2, the present embodiment provides an object detection model training method, as shown in the figure, the method includes the following steps:
step S201, obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals.
The scale is divided into at least two scale intervals, and a detection submodule corresponding to each scale interval is created in the initial network model obtained conventionally.
Step S202a, selecting a scale interval.
Step S202b, a training sample image is randomly selected, and the proportion of the area occupied by the marked object in the training sample image is calculated.
Randomly selecting a training sample image, obtaining the marked object in the training sample image, and calculating the proportion of the marked object in the area of the training sample image. In this embodiment, the object is labeled in a manner of a bounding box, and the upper left corner coordinate and the lower right corner coordinate of the bounding box are taken to label the object.
In some embodiments, the calculating the proportion of the area of the labeled object in the training sample image comprises:
acquiring the area of a boundary frame of the marked object and the area of a training sample image;
randomly selecting one of the marked objects as a reference object, and calculating the area of a boundary box of the reference object according to the boundary box of the reference object;
according to the formula: and calculating the proportion of the area of the marked object in the training sample image.
In the embodiment, one of the marked objects in the training sample image is randomly selected as a reference object to calculate the proportion of the area of the map, so that the diversity of sample data can be increased, and the stability of a data augmentation strategy can be improved.
Step S202c, the training sample image is augmented according to the relation between the area proportion of the occupied map and the scale interval.
Augmenting the training sample image according to the relationship between the map area ratio of the labeled object and the scale interval, in some embodiments, the step S202c includes:
if the proportion of the occupied area of the image falls on the left side of the scale interval, augmenting the training sample image in a cutting mode to increase the proportion of the occupied area of the marked object so as to reach the selected scale interval;
if the proportion of the occupied area of the image falls on the right side of the scale interval, the training sample image is augmented in a mode of zero filling at the edge of the image, so that the proportion of the occupied area of the marked object is reduced to reach the selected scale interval;
if the area proportion falls in the scale interval, randomly selecting a cutting mode or a zero filling mode to enlarge the training sample image, and ensuring that the area proportion of the marked object in the image is still in the scale interval.
Step S202d, if the image obtained by augmentation is an abnormal image, adjusting a data augmentation strategy according to the image obtained by augmentation; otherwise, the data augmentation strategy is not required to be adjusted.
Step S202e, judging whether the number of the selected training sample images reaches the preset number of images, if so, executing step S202 f; if not, the process returns to step S202 b.
Step S202f, judging whether the data augmentation strategies corresponding to all the scale intervals are adjusted completely, if not, returning to execute the step S202 a; if yes, go to step S202 g.
And step S202g, finishing the adjustment, and obtaining the data augmentation strategy corresponding to each adjusted scale interval.
In the present embodiment, the steps S202a to S202g are the embodiment step S102: according to the specific embodiment of adjusting the corresponding data amplification strategy according to the scale interval, in this embodiment, each scale interval adopts a corresponding data amplification strategy, and sample data of each scale interval can be refined, so that the adjusted data amplification strategy is more accurate.
And S203, respectively amplifying the training sample images by using the adjusted data amplification strategies, and training the corresponding detection sub-modules in the initial network model by using the amplified training sample images according to the scale interval to obtain an object detection model.
In the embodiment, detection sub-modules are added for different scale intervals, each scale interval corresponds to a data augmentation strategy and a detection sub-module, for each scale interval, one of labeled objects in a training sample image is randomly selected as a reference object to calculate the proportion of the area of a map, and the data augmentation strategy is adjusted according to the proportion of the area of the labeled sample in the randomly selected sample training image, so that the diversity of sample data can be increased, and the stability of the data augmentation strategy is improved; and the training sample images are augmented by using the adjusted data augmentation strategy, and the augmented training sample images are used for training the corresponding detection sub-modules in the initial network model, so that the obtained object detection model can more accurately detect objects with various scales, and the detection rate of the object detection model is greatly improved.
EXAMPLE III
Referring to fig. 3, the present embodiment provides an object detection model training method, as shown in the figure, the method includes the following steps:
step S301, obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals.
And S302, adjusting the corresponding data augmentation strategy according to the scale interval.
The content in this step can be referred to as step S102 in the first embodiment and steps S202a to S202g in the second embodiment, so as to obtain a more accurate data augmentation policy corresponding to each adjusted scale interval, which is not described herein again.
Step S303a, selecting a scale interval.
Step S303b, the training sample image of the labeled object is augmented by using the adjusted data augmentation strategy corresponding to the scale interval, so that the size of the labeled object is within the selected scale interval.
Step S303c, training the detection sub-module corresponding to the selected scale interval by using the augmented training sample image.
The scale of the marked object in the augmented training sample image is located in the selected scale interval, the augmented training sample image is used for training the detection sub-modules corresponding to the selected scale interval, so that the detection sub-modules obtained through training can more accurately detect the object in the scale interval, and each detection sub-module correspondingly detects the object with the scale corresponding to one scale interval, and the method is more pertinent and more accurate.
Step S303d, judging whether the detection submodules corresponding to all the scale intervals are trained, if not, returning to execute step S303 a; if yes, go to step S303 e.
And step S303e, finishing training to obtain an object detection model comprising at least two trained detection submodules aiming at the objects in the different scale intervals.
In the present embodiment, steps S303a to S303e are step S103 of the first embodiment and step S203 of the second embodiment: and respectively utilizing the adjusted data amplification strategies to amplify the training sample images, and utilizing the amplified training sample images to train the corresponding detection sub-modules in the initial network model according to the scale interval to obtain the specific embodiment of the object detection model.
In the embodiment, detection sub-modules are added for different scale intervals, each scale interval corresponds to a data amplification strategy and a detection sub-module, and the data amplification strategy is adjusted according to the map area proportion of marked samples in a randomly selected sample training image, so that the diversity of sample data can be increased, and the stability of the data amplification strategy can be improved; for each scale interval, the training sample image is augmented by the correspondingly adjusted data augmentation strategy, the augmented training sample image is used for training the detection sub-modules corresponding to the scale interval, and therefore the detection sub-modules can accurately detect the objects with the scales in the scale interval, the object detection model comprising the detection sub-modules can accurately detect the objects with various scales, and the object detection rate is greatly improved.
Example four
As shown in fig. 4, the present embodiment provides an object detection method, which includes the following steps:
and S401, acquiring an image to be detected.
S402, carrying out object detection on the image to be detected; the object detection method is realized based on an object detection model, and the object detection model is obtained by training through the object detection model training method according to any one of the first embodiment to the third embodiment.
In this embodiment, the object detection model is trained by using the object detection model training method described in the first to third embodiments, and the trained object detection model is used to detect images, so that objects of various scales can be effectively detected, and the detection rate of the objects is effectively improved. For the training method of the object detection model, reference may be made to the contents of the first to third embodiments, which are not described herein again.
EXAMPLE five
Referring to fig. 5, an object detection model training apparatus provided in this embodiment includes:
a model obtaining module 51, configured to obtain an initial network model, where the initial network model includes at least two detection sub-modules for objects in different scale intervals.
And a policy adjusting module 52, configured to adjust the corresponding data augmentation policy according to the scale interval.
And the model training module 53 is configured to augment the training sample images by using the adjusted data augmentation strategy, and train corresponding detection sub-modules in the initial network model according to the scale interval by using the augmented training sample images to obtain an object detection model.
In the embodiment, detection sub-modules are added for different scale intervals on the basis of an initial network model, each scale interval corresponds to a data amplification strategy and a detection sub-module, a training sample image is amplified by using the adjusted data amplification strategy, the corresponding detection sub-modules in the initial network model are trained by using the amplified training sample image to obtain an object detection model, the initial network model is obtained by a conventional technology, then the detection sub-modules in the initial network model are subjected to network complexity increase, and the detection rate of the trained object detection model can be effectively improved.
EXAMPLE six
As shown in fig. 6, the present embodiment provides an object detection model training apparatus, which includes:
the model obtaining module 61 is configured to obtain an initial network model, where the initial network model includes at least two detection sub-modules for objects in different scale intervals.
And a policy adjusting module 62, configured to adjust the corresponding data augmentation policy according to the scale interval.
In some embodiments, as shown in FIG. 6, the policy adjustment module 62 includes:
the first interval selecting unit 621 is configured to select a scale interval.
And a proportion calculating unit 622, configured to randomly select a training sample image, and calculate a proportion of a map area occupied by the labeled object in the training sample image.
And a first augmenting unit 623 configured to augment the training sample image according to the relationship between the map area ratio and the scale interval.
In some embodiments, the first amplification unit 623 is specifically configured to:
if the proportion of the occupied area of the image falls on the left side of the scale interval, augmenting the training sample image in a cutting mode to increase the proportion of the occupied area of the marked object so as to reach the selected scale interval;
if the proportion of the occupied area of the image falls on the right side of the scale interval, the training sample image is augmented in a mode of zero filling at the edge of the image, so that the proportion of the occupied area of the marked object is reduced to reach the selected scale interval;
if the area proportion falls in the scale interval, randomly selecting a cutting mode or a zero filling mode to enlarge the training sample image, and ensuring that the area proportion of the marked object in the image is still in the scale interval.
A policy adjustment unit 624 configured to adjust a data augmentation policy according to the augmented image if the augmented image is an abnormal image; otherwise, the data augmentation strategy is not required to be adjusted and increased;
the first determining unit 625 is configured to determine whether the number of the selected training sample images reaches a preset number of images.
The second determining unit 626 is configured to determine whether the data amplification strategies corresponding to all the scale intervals are adjusted completely.
A policy obtaining unit 627, configured to end adjustment of the data augmentation policy when the data augmentation policies corresponding to all the scale intervals are adjusted, so as to obtain the adjusted data augmentation policy corresponding to each scale interval.
And the model training module 63 is configured to augment the training sample images by using the adjusted data augmentation strategy, and train the corresponding detection sub-modules in the initial network model according to the scale interval by using the augmented training sample images to obtain an object detection model.
In some embodiments, as shown in FIG. 6, model training module 63 includes:
a second section selecting unit 631 for selecting a scale section;
a second augmenting unit 632, configured to augment the training sample image of the labeled object by using the adjusted data augmenting policy corresponding to the scale interval, so that the size of the labeled object is within the selected scale interval;
the training unit 633 is used for training the detection sub-modules corresponding to the selected scale intervals by using the augmented training sample images;
the third determining unit 634 is configured to determine whether all the detection sub-modules corresponding to the scale intervals have been trained.
The model obtaining unit 635 is configured to, when all the detection submodules corresponding to the scale intervals have been trained, end the training of the detection submodules, and obtain an object detection model including at least two trained detection submodules for objects in different scale intervals.
In summary, in this embodiment, detection sub-modules are added for different scale intervals, each scale interval corresponds to a data augmentation strategy and a detection sub-module, and the data augmentation strategy is adjusted according to the map area proportion of the labeled sample in the randomly selected sample training image, so that the diversity of sample data can be increased, and the stability of the data augmentation strategy can be improved; for each scale interval, the training sample image is augmented by the correspondingly adjusted data augmentation strategy, the augmented training sample image is used for training the detection sub-modules corresponding to the scale interval, and therefore the detection sub-modules can accurately detect the objects with the scales in the scale interval, the object detection model comprising the detection sub-modules can accurately detect the objects with various scales, and the object detection rate is greatly improved.
It should be noted that, the embodiment of the object detection model training apparatus is implemented based on the embodiment of the object detection model training method, and reference is made to the embodiment of the object detection model training method, which is not described in the apparatus.
EXAMPLE seven
As shown in fig. 7, the present embodiment provides an object detection model, which is obtained by training the object detection model training method according to any one of the first to third embodiments, and as shown in the figure, the object detection model includes:
and an image obtaining module 71, configured to obtain an image to be detected.
And the detection module 73 comprises detection submodules corresponding to all the scale intervals and is used for carrying out object detection on the image to be detected.
In this embodiment, the object detection model is trained by using the object detection model training method described in the first to third embodiments, and the trained object detection model is used to detect images, so that objects of various scales can be effectively detected, and the detection rate of the objects is effectively improved.
Example eight
In order to achieve the above object, an embodiment of the present invention further provides a computer device.
Fig. 8 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention, as shown in fig. 8, the computer device includes a processor 80, a memory 81, an input device 82, and an output device 83; the number of the processors 80 in the computer device may be one or more, and one processor 80 is taken as an example in fig. 8; the processor 80, the memory 81, the input device 82 and the output device 83 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 8.
The memory 81 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the object detection model training method or the object detection method in the embodiment of the present invention (for example, the image generation module 11, the data augmentation module 12, and the image fusion module 13 in the image optimization processing apparatus). The processor 70 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 71, namely, implements the above-mentioned object detection model training method or object detection method, the object detection model training method comprising: obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals; adjusting the corresponding data augmentation strategy according to the scale interval; and respectively utilizing the adjusted data amplification strategies to amplify the training sample images, and utilizing the amplified training sample images to train the corresponding detection sub-modules in the initial network model according to the scale interval to obtain the object detection model. The object detection method includes: acquiring an image to be detected; and inputting the detection image into an object detection model for detection, wherein the object detection model is obtained by training by adopting the object detection model training method according to any one of the first to third embodiments.
Of course, the computer device provided in the embodiments of the present invention is not limited to the method operations described above, and may also perform related operations in the object detection model training method provided in any embodiment of the present invention and perform related operations in the object detection method provided in the embodiments of the present invention.
The memory 81 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 81 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 81 may further include memory located remotely from the processor 80, which may be connected to the device/terminal/server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 82 may be used to receive input numeric or character information and generate key signal inputs relating to user settings and function controls of the computer apparatus. The output device 83 may include a display device such as a display screen.
It should be noted that the foregoing explanation of the embodiment of the image optimization processing method is also applicable to the computer device of the embodiment, and the implementation principle thereof is similar and will not be described herein again.
According to the computer equipment provided by the embodiment of the invention, the detection sub-modules are added aiming at different scale intervals, each scale interval corresponds to one data augmentation strategy and one detection sub-module, the data augmentation strategy is adjusted according to the map area proportion of the marked sample in the randomly selected sample training image, the diversity of sample data can be increased, and the stability of the data augmentation strategy is favorably improved; for each scale interval, the training sample image is augmented by the correspondingly adjusted data augmentation strategy, the augmented training sample image is used for training the detection sub-modules corresponding to the scale interval according to the scale interval, and therefore the obtained detection sub-modules can accurately detect the objects with the scales in the scale interval, an object detection model containing the detection sub-modules can accurately detect the objects with various scales, and the object detection rate is greatly improved.
Example nine
In order to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program includes program instructions, and the program instructions, when executed by a processor, implement an object detection model training method, where the object detection model training method includes: the object detection model training method comprises the following steps: obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals; adjusting the corresponding data augmentation strategy according to the scale interval; and respectively utilizing the adjusted data amplification strategy to amplify the training sample images, and utilizing the amplified training sample images to train the corresponding detection sub-modules in the initial network model to obtain an object detection model. The program instructions, when executed by the processor, further implement an object detection method as follows: acquiring an image to be detected; and inputting the detection image into an object detection model for detection, wherein the object detection model is obtained by training by adopting the object detection model training method according to any one of the first to third embodiments.
Of course, the computer-readable storage medium provided in the embodiments of the present invention has computer-executable instructions that are not limited to the method operations described above, and may also perform related operations in the object detection model training method provided in any embodiment of the present invention and perform related operations in the object detection method provided in the embodiments of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the embodiments of the present invention can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better implementation in many cases. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present invention.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
It should be noted that the foregoing is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will appreciate that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention have been described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and many other equivalent embodiments may be included without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An object detection model training method, characterized by comprising:
obtaining an initial network model, wherein the initial network model comprises at least two detection submodules aiming at objects in different scale intervals;
adjusting the corresponding data augmentation strategy according to the scale interval;
and respectively utilizing the adjusted data amplification strategies to amplify the training sample images, and utilizing the amplified training sample images to train the corresponding detection sub-modules in the initial network model according to the scale interval to obtain the object detection model.
2. The object detection model training method according to claim 1, wherein the step of respectively augmenting the training sample images by using the adjusted data augmentation strategy and training the corresponding size sub-modules in the initial network model by using the augmented training sample images according to the scale interval to obtain the object detection model comprises the steps of:
a1, selecting a scale interval;
a2, utilizing the adjusted data augmentation strategy corresponding to the scale interval to augment the training sample image of the marked object, so that the size of the marked object is in the selected scale interval;
a3, training the detection sub-modules corresponding to the selected scale intervals by using the augmented training sample image;
and A4, repeating the steps A1-A3 until all detection submodules corresponding to the scale intervals are trained, and obtaining the object detection model comprising at least two trained detection submodules aiming at the objects in different scale intervals.
3. The object detection model training method according to claim 1, wherein the adjusting the corresponding data augmentation strategy according to the scale interval comprises:
b1, selecting a scale interval;
b2, randomly selecting a training sample image, and calculating the proportion of the area of the marked object in the training sample image;
b3, augmenting a training sample image according to the relation between the area proportion of the occupied map and the scale interval;
b4, if the image obtained by the augmentation is an abnormal image, adjusting the data augmentation strategy according to the image obtained by the augmentation; otherwise, the data augmentation strategy is not required to be adjusted and increased;
b5, repeating the steps B2-B4 until the number of the selected training sample images reaches the preset number of images;
and B6, repeatedly executing the steps B1-B5 until the data amplification strategies corresponding to all the scale intervals are adjusted, and obtaining the adjusted data amplification strategies corresponding to all the scale intervals.
4. The object detection model training method according to claim 3, wherein the B3 augmenting the training sample image according to the relation between the map area ratio and the scale interval comprises:
if the proportion of the occupied area of the image falls on the left side of the scale interval, augmenting the training sample image in a cutting mode to increase the proportion of the occupied area of the marked object so as to reach the selected scale interval;
if the proportion of the occupied area of the image falls on the right side of the scale interval, the training sample image is augmented in a mode of zero filling at the edge of the image, so that the proportion of the occupied area of the marked object is reduced to reach the selected scale interval;
if the area proportion falls in the scale interval, randomly selecting a cutting mode or a zero filling mode to enlarge the training sample image, and ensuring that the area proportion of the marked object in the image is still in the scale interval.
5. The object detection model training method according to claim 4, wherein the calculating of the proportion of the area of the labeled object in the training sample image comprises:
acquiring the area of a boundary frame of the marked object and the area of a training sample image;
randomly selecting one of the marked objects as a reference object, and calculating the area of a boundary box of the reference object according to the boundary box of the reference object;
according to the formula: and calculating the proportion of the area of the marked object in the training sample image.
6. An object detection method, characterized in that the object detection method comprises:
acquiring an image to be detected;
carrying out object detection on the image to be detected; the object detection method is realized based on an object detection model, and the object detection model is obtained by training according to the object detection model training method of any one of claims 1-5.
7. An object detection model training apparatus, characterized by comprising:
the model acquisition module is used for acquiring an initial network model, and the initial network model comprises at least two detection submodules aiming at objects in different scale intervals;
the strategy adjusting module is used for adjusting the corresponding data augmentation strategy according to the scale interval;
and the model training module is used for respectively utilizing the adjusted data augmentation strategy to augment the training sample images, and utilizing the augmented training sample images to train the corresponding detection sub-modules in the initial network model according to the scale interval to obtain the object detection model.
8. An object detection model, characterized in that the object detection model is trained by the object detection model training method according to any one of claims 1 to 5, and the object detection model comprises:
the image acquisition module is used for acquiring an image to be detected;
and the detection module comprises detection submodules corresponding to all scale intervals and is used for carrying out object detection on the image to be detected.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing an object detection model training method as claimed in any one of claims 1 to 5 or an object detection method as claimed in claim 6 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program comprises program instructions which, when executed by a processor, implement the object detection model training method according to any one of claims 1 to 5, or implement the object detection method according to claim 6.
CN201911378418.5A 2019-12-27 2019-12-27 Object detection model training method, object detection device, object detection equipment and object detection medium Pending CN111144494A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911378418.5A CN111144494A (en) 2019-12-27 2019-12-27 Object detection model training method, object detection device, object detection equipment and object detection medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911378418.5A CN111144494A (en) 2019-12-27 2019-12-27 Object detection model training method, object detection device, object detection equipment and object detection medium

Publications (1)

Publication Number Publication Date
CN111144494A true CN111144494A (en) 2020-05-12

Family

ID=70521036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911378418.5A Pending CN111144494A (en) 2019-12-27 2019-12-27 Object detection model training method, object detection device, object detection equipment and object detection medium

Country Status (1)

Country Link
CN (1) CN111144494A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111832666A (en) * 2020-09-15 2020-10-27 平安国际智慧城市科技股份有限公司 Medical image data amplification method, device, medium, and electronic apparatus
CN111897639A (en) * 2020-07-29 2020-11-06 平安科技(深圳)有限公司 Image augmentation method, image augmentation device, computer device, and storage medium
CN112084861A (en) * 2020-08-06 2020-12-15 中国科学院空天信息创新研究院 Model training method and device, electronic equipment and storage medium
CN112633392A (en) * 2020-12-29 2021-04-09 博微太赫兹信息科技有限公司 Terahertz human body security inspection image target detection model training data augmentation method
CN111783902B (en) * 2020-07-30 2023-11-07 腾讯科技(深圳)有限公司 Data augmentation, service processing method, device, computer equipment and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975755B1 (en) * 1999-11-25 2005-12-13 Canon Kabushiki Kaisha Image processing method and apparatus
WO2014008332A2 (en) * 2012-07-05 2014-01-09 Siemens Corporation System and methods for integrated and predictive analysis of molecular, imaging, and clinical data for patient-specific management of diseases
CN107871119A (en) * 2017-11-01 2018-04-03 西安电子科技大学 A kind of object detection method learnt based on object space knowledge and two-stage forecasting
CN108230323A (en) * 2018-01-30 2018-06-29 浙江大学 A kind of Lung neoplasm false positive screening technique based on convolutional neural networks
CN108334840A (en) * 2018-02-01 2018-07-27 福州大学 Pedestrian detection method based on deep neural network under traffic environment
CN108388888A (en) * 2018-03-23 2018-08-10 腾讯科技(深圳)有限公司 A kind of vehicle identification method, device and storage medium
CN109344821A (en) * 2018-08-30 2019-02-15 西安电子科技大学 Small target detecting method based on Fusion Features and deep learning
CN109359681A (en) * 2018-10-11 2019-02-19 西京学院 A kind of field crop pest and disease disasters recognition methods based on the full convolutional neural networks of improvement
CN109409198A (en) * 2018-08-31 2019-03-01 平安科技(深圳)有限公司 AU detection model training method, AU detection method, device, equipment and medium
CN109598220A (en) * 2018-11-26 2019-04-09 山东大学 A kind of demographic method based on the polynary multiple dimensioned convolution of input
CN109784194A (en) * 2018-12-20 2019-05-21 上海图森未来人工智能科技有限公司 Target detection network establishing method and training method, object detection method
CN110321813A (en) * 2019-06-18 2019-10-11 南京信息工程大学 Cross-domain pedestrian recognition methods again based on pedestrian's segmentation
WO2019196130A1 (en) * 2018-04-12 2019-10-17 广州飒特红外股份有限公司 Classifier training method and device for vehicle-mounted thermal imaging pedestrian detection
CN110517228A (en) * 2019-07-30 2019-11-29 浙江农林大学 Trunk image rapid detection method based on convolutional neural networks and transfer learning
CN110516545A (en) * 2019-07-22 2019-11-29 北京迈格威科技有限公司 Model training, image processing method and equipment, image processor and medium
CN110599445A (en) * 2019-07-24 2019-12-20 安徽南瑞继远电网技术有限公司 Target robust detection and defect identification method and device for power grid nut and pin

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6975755B1 (en) * 1999-11-25 2005-12-13 Canon Kabushiki Kaisha Image processing method and apparatus
WO2014008332A2 (en) * 2012-07-05 2014-01-09 Siemens Corporation System and methods for integrated and predictive analysis of molecular, imaging, and clinical data for patient-specific management of diseases
CN107871119A (en) * 2017-11-01 2018-04-03 西安电子科技大学 A kind of object detection method learnt based on object space knowledge and two-stage forecasting
CN108230323A (en) * 2018-01-30 2018-06-29 浙江大学 A kind of Lung neoplasm false positive screening technique based on convolutional neural networks
CN108334840A (en) * 2018-02-01 2018-07-27 福州大学 Pedestrian detection method based on deep neural network under traffic environment
CN108388888A (en) * 2018-03-23 2018-08-10 腾讯科技(深圳)有限公司 A kind of vehicle identification method, device and storage medium
WO2019196130A1 (en) * 2018-04-12 2019-10-17 广州飒特红外股份有限公司 Classifier training method and device for vehicle-mounted thermal imaging pedestrian detection
CN109344821A (en) * 2018-08-30 2019-02-15 西安电子科技大学 Small target detecting method based on Fusion Features and deep learning
CN109409198A (en) * 2018-08-31 2019-03-01 平安科技(深圳)有限公司 AU detection model training method, AU detection method, device, equipment and medium
CN109359681A (en) * 2018-10-11 2019-02-19 西京学院 A kind of field crop pest and disease disasters recognition methods based on the full convolutional neural networks of improvement
CN109598220A (en) * 2018-11-26 2019-04-09 山东大学 A kind of demographic method based on the polynary multiple dimensioned convolution of input
CN109784194A (en) * 2018-12-20 2019-05-21 上海图森未来人工智能科技有限公司 Target detection network establishing method and training method, object detection method
CN110321813A (en) * 2019-06-18 2019-10-11 南京信息工程大学 Cross-domain pedestrian recognition methods again based on pedestrian's segmentation
CN110516545A (en) * 2019-07-22 2019-11-29 北京迈格威科技有限公司 Model training, image processing method and equipment, image processor and medium
CN110599445A (en) * 2019-07-24 2019-12-20 安徽南瑞继远电网技术有限公司 Target robust detection and defect identification method and device for power grid nut and pin
CN110517228A (en) * 2019-07-30 2019-11-29 浙江农林大学 Trunk image rapid detection method based on convolutional neural networks and transfer learning

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897639A (en) * 2020-07-29 2020-11-06 平安科技(深圳)有限公司 Image augmentation method, image augmentation device, computer device, and storage medium
CN111783902B (en) * 2020-07-30 2023-11-07 腾讯科技(深圳)有限公司 Data augmentation, service processing method, device, computer equipment and storage medium
CN112084861A (en) * 2020-08-06 2020-12-15 中国科学院空天信息创新研究院 Model training method and device, electronic equipment and storage medium
CN111832666A (en) * 2020-09-15 2020-10-27 平安国际智慧城市科技股份有限公司 Medical image data amplification method, device, medium, and electronic apparatus
WO2022057306A1 (en) * 2020-09-15 2022-03-24 平安国际智慧城市科技股份有限公司 Medical image data amplification method, apparatus, computer device, and medium
CN112633392A (en) * 2020-12-29 2021-04-09 博微太赫兹信息科技有限公司 Terahertz human body security inspection image target detection model training data augmentation method

Similar Documents

Publication Publication Date Title
CN111144494A (en) Object detection model training method, object detection device, object detection equipment and object detection medium
CN109118542B (en) Calibration method, device, equipment and storage medium between laser radar and camera
AU2017232186B2 (en) Fast and robust image alignment for burst mode
CN113920307A (en) Model training method, device, equipment, storage medium and image detection method
CN107944324A (en) A kind of Quick Response Code distortion correction method and device
CN113313083B (en) Text detection method and device
CN114187459A (en) Training method and device of target detection model, electronic equipment and storage medium
CN113657274B (en) Table generation method and device, electronic equipment and storage medium
CN111310746A (en) Text line detection method, model training method, device, server and medium
CN111105452A (en) High-low resolution fusion stereo matching method based on binocular vision
CN111144215B (en) Image processing method, device, electronic equipment and storage medium
CN113205041A (en) Structured information extraction method, device, equipment and storage medium
CN110633717A (en) Training method and device for target detection model
CN116245193A (en) Training method and device of target detection model, electronic equipment and medium
CN109871249B (en) Remote desktop operation method and device, readable storage medium and terminal equipment
CN113516697B (en) Image registration method, device, electronic equipment and computer readable storage medium
CN114581732A (en) Image processing and model training method, device, equipment and storage medium
CN113901998A (en) Model training method, device, equipment, storage medium and detection method
CN113269280A (en) Text detection method and device, electronic equipment and computer readable storage medium
CN111932198A (en) File auditing method and related product
CN115187995B (en) Document correction method, device, electronic equipment and storage medium
CN114511862B (en) Form identification method and device and electronic equipment
CN114119990B (en) Method, apparatus and computer program product for image feature point matching
CN113807407B (en) Target detection model training method, model performance detection method and device
CN115410133A (en) Video dense prediction method and device

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