CN110059746A - A kind of method, electronic equipment and storage medium creating target detection model - Google Patents
A kind of method, electronic equipment and storage medium creating target detection model Download PDFInfo
- Publication number
- CN110059746A CN110059746A CN201910314249.2A CN201910314249A CN110059746A CN 110059746 A CN110059746 A CN 110059746A CN 201910314249 A CN201910314249 A CN 201910314249A CN 110059746 A CN110059746 A CN 110059746A
- Authority
- CN
- China
- Prior art keywords
- image
- image data
- data
- detection model
- target detection
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/19—Recognition using electronic means
- G06V30/192—Recognition using electronic means using simultaneous comparisons or correlations of the image signals with a plurality of references
- G06V30/194—References adjustable by an adaptive method, e.g. learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V2201/00—Indexing scheme relating to image or video recognition or understanding
- G06V2201/07—Target detection
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Databases & Information Systems (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
The present embodiments relate to detection fields, disclose a kind of method, electronic equipment and storage medium for creating target detection model.In the section Example of the application, the method for creation target detection model includes: to obtain the first image data of area to be tested, and the second image data prestored;According to the first image data and the second image data, determine referring to data;It is the corresponding target detection model of the second image data referring to data, or, the corresponding training data of the second image data;According to referring to data, the target detection model of area to be tested is determined.In the realization, the accuracy rate of target detection model can be improved.
Description
Technical field
The present embodiments relate to detection field, in particular to a kind of method for creating target detection model, electronic equipment
And storage medium.
Background technique
In Intelligent cargo cabinet, fish eye lens is usually used.Fish eye lens is that, focal length bigger than standard lens visual angle is shorter
A kind of special lens use fish eye lens as visual sensor, can acquire the picture of the Intelligent cargo cabinet of identification to be detected.Make
When carrying out target detection with fish eye images of the deep learning algorithm of target detection to Intelligent cargo cabinet, need to acquire a large amount of number of mark
According to come the training that carries out corresponding target detection model.
However, it is found by the inventors that at least there are the following problems in the prior art: in the actual application of Intelligent cargo cabinet, having
It is likely encountered following problems:
1, there is deviation in fish-eye placement position, leads to the round effective coverage of the commodity image of collected counter
Not in the picture between position;
2, fish eye lens, which is not focused, causes to acquire picture blur;
3, light environment changes in the counter as caused by counter actual placement position.
The shooting environmental of Intelligent cargo cabinet when the above problem will lead to the shooting environmental of Intelligent cargo cabinet and acquire training data
It has differences, and the accuracy rate of deep learning algorithm of target detection and training data have much relations, when acquisition training data
When shooting environmental when shooting environmental and detection differs greatly, this will will affect the accuracy rate of algorithm.
It should be noted that information is only used for reinforcing the reason to the background of the disclosure disclosed in above-mentioned background technology part
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
Embodiment of the present invention is designed to provide a kind of method, electronic equipment and storage for creating target detection model
Medium makes it possible to improve the accuracy rate of target detection model.
In order to solve the above technical problems, embodiments of the present invention provide a kind of method for creating target detection model,
The following steps are included: obtaining the first image data of area to be tested, and the second image data prestored;According to the first image
Data and the second image data are determined referring to data;It is the corresponding target detection model of the second image data referring to data, or,
The corresponding training data of second image data;According to referring to data, the target detection model of area to be tested is determined.
Embodiments of the present invention additionally provide a kind of electronic equipment, comprising: at least one processor;And at least
The memory of one processor communication connection;Wherein, memory is stored with the instruction that can be executed by least one processor, instruction
It is executed by least one processor, so that at least one processor is able to carry out the creation target inspection referred to such as above embodiment
The method for surveying model.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, calculate
The method for the creation target detection model that above embodiment refers to is realized when machine program is executed by processor.
Embodiment of the present invention in terms of existing technologies, is based on the first image data and the second image data, to select
It selects referring to data, and according to the target detection model for determining area to be tested referring to data of selection, it is contemplated that area to be tested
Shooting environmental and the second image data shooting environmental between difference problem, avoid the difference due to shooting environmental cause to
The problem of the accuracy rate deficiency of the target detection model of detection zone.
In addition, determining referring to data according to the first image data and the second image data, specifically including: judging the first figure
As the characteristics of image of data and the characteristics of image of the second image data whether there is difference;If it is determined that being, it is determined that referring to data
For the corresponding training data of the second image data;If it is determined that not being, it is determined that reference data are the corresponding mesh of the second image data
Mark detection model.
In addition, being the corresponding training data of the second image data referring to data;According to referring to data, area to be tested is determined
Target detection model, specifically include: according to the characteristics of image of the first image data, adjusting the corresponding training of the second image data
Data obtain the corresponding training data of the first image data;Based on the corresponding training data of the first image data, to original object
Detection model is trained, and obtains the target detection model of area to be tested.In the realization, it is more to reduce artificial acquisition, mark
The workload of training data under environment.
In addition, according to the characteristics of image of the first image data, the corresponding training data of the second image data of adjustment obtains the
The corresponding training data of one image data, specifically includes: each width instruction in the corresponding training data of the second image data of adjustment
Practice image, so that the characteristics of image of training image adjusted is identical as the characteristics of image of the first image data;After adjustment
Training image, determine the corresponding training data of the first image data.In the realization, reduce the difference of shooting environmental to detection
Recognition accuracy bring influences.
In addition, according to the characteristics of image of the first image data, the corresponding training data of the second image data of adjustment obtains the
The corresponding training data of one image data, specifically includes: determining the characteristics of image for needing to adjust;It is corresponding to adjust the second image data
Training data in each width training image so that characteristics of image and the first figure that the needs of training image adjusted adjust
As the characteristics of image that the needs of data adjust is identical;According to training image adjusted, the training number of the first image data is determined
According to.In the realization, it is possible to reduce to the modification amount of training image, and then reduce the data processing intensity of electronic equipment.
In addition, determining the characteristics of image for needing to adjust, specifically include: for each characteristics of image, carrying out respectively following
Operation: the difference of the characteristics of image of the first image data and the characteristics of image of the second image data is determined;Judge whether difference is big
In the corresponding threshold value of characteristics of image, however, it is determined that be the characteristics of image for adjusting characteristics of image as needs.
In addition, being trained, obtaining to original object detection model being based on the corresponding training data of the first image data
After the target detection model of area to be tested, the method for creation target detection model further include: save the first image data
To image data base;The corresponding training data of first image data is saved to tranining database;By the target of area to be tested
Detection model is saved as the corresponding target detection model of the first image data to model database.In the realization, realize
The automatic expansion of each database.
In addition, being the corresponding target detection model of the second image data referring to data;According to referring to data, determine to be detected
The target detection model in region, specifically includes: by the corresponding target detection model of the second image data, as area to be tested
Target detection model.In the realization, reduce the time of the target detection model of electronic equipment training area to be tested.
In addition, characteristics of image includes at least any one in image center location, image definition and brightness of image.
In addition, obtaining the second image data prestored, specifically include: by the first image data respectively and in image data base
The M third image data prestored is compared, and the determining and the smallest third image data of the first image data difference, M is big
In 1 positive integer;By the smallest third image data of difference, as the second image data.In the realization, needs are reduced again
Original object detection model is trained to obtain the probability of the target detection model of area to be tested.
In addition, the first image data is compared with the M third image data prestored in image data base respectively, really
The fixed and the smallest third image data of the first image data difference, specifically includes: for each third image data, carrying out respectively
It operates below: the characteristics of image of third image data being compared with the characteristics of image of the first image data, determines third figure
The characteristics of image being had differences as data and the first image data;Existed according to each third image data and the first image data
The number of the characteristics of image of difference determines the smallest third image data of difference.
In addition, the first image data is compared with the M third image data prestored in image data base respectively, really
The fixed and the smallest third image data of the first image data difference, specifically includes: for each third image data, carrying out respectively
It operates below: the characteristics of image of third image data being compared with the characteristics of image of the first image data, determines third figure
As the difference of each characteristics of image of data and the first image data;According to each of third image data and the first image data
The difference of characteristics of image determines the smallest third image data of difference.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys
The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove
Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the flow chart of the method for the creation target detection model of first embodiment of the invention;
Fig. 2 is the flow chart of the method for the creation target detection model of second embodiment of the present invention;
Fig. 3 is the structural schematic diagram of the electronic equipment of third embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention
Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention
In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details
And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
The first embodiment of the present invention is related to a kind of method for creating target detection model, it is applied to carry out target
The electronic equipment of detection, for example, Intelligent cargo cabinet etc..As shown in Figure 1, the method for the creation target detection model includes:
Step 101: obtaining the first image data of area to be tested.
Specifically, electronic equipment shoots the first image of the area to be tested by imaging sensor, according to the first figure
Picture determines the first image data.
It should be noted that it will be understood by those skilled in the art that the first image data may include the first image, it can also
To include the characteristics of image of the first image, present embodiment does not limit the particular content of the first image data.
In one example, electronic equipment is Intelligent cargo cabinet, then area to be tested is that the flake installed in Intelligent cargo cabinet is taken the photograph
As the shooting area of head.
Step 102: obtaining the second image data prestored.
Specifically, the second image data is previously stored in electronic equipment, the shooting environmental of the second image data and
The shooting environmental of one image data may be identical, it is also possible to not identical.
It should be noted that it will be understood by those skilled in the art that the second image data can be by electronics in practical application
Equipment shooting obtains, and can also be obtained by shooting with other electronic equipments of the electronic equipment same type.
For example, the first image data is the image that the fish-eye camera installed in No.1 Intelligent cargo cabinet is shot at environment A,
Second image data can be the image that the fish-eye camera installed in No. two Intelligent cargo cabinets is shot at environment B, be also possible to
The image that the fish-eye camera installed in No.1 Intelligent cargo cabinet is shot at environment B.Wherein, No.1 Intelligent cargo cabinet and No. two intelligence
The structure of counter is identical.
Step 103: according to the first image data and the second image data, determining referring to data.
Specifically, being the corresponding target detection model of the second image data referring to data, or, the second image data is corresponding
Training data.
In one example, electronic equipment judges the characteristics of image of the first image data and the image spy of the second image data
Sign whether there is difference;If it is determined that being, it is determined that reference data are the corresponding training data of the second image data;If it is determined that not
It is, it is determined that reference data are the corresponding target detection model of the second image data.
In one example, electronic equipment determines the characteristics of image of the first image data and the image spy of the second image data
The method that sign whether there is difference are as follows: be directed to each characteristics of image, electronic equipment judges the characteristics of image of the first image data
Whether it is greater than the corresponding threshold value of the image data with the difference of the characteristics of image of the second image data, however, it is determined that be, it is determined that
The characteristics of image of first image data and the characteristics of image of the second image data have differences, otherwise, it is determined that the first figure
As difference is not present in the characteristics of image of data and the characteristics of image of the second image data.
For example, characteristics of image includes image center location, image definition and brightness of image.Electronic equipment is directed to each figure
As feature is compared respectively.Electronic equipment is round by the image center location of the second image data and the image of the first image data
Heart position is compared, if the difference of the image center location of the two is greater than the corresponding threshold value of image center location, then it is assumed that the
The image center location of one image data and the second image data has differences, and RES_D is labeled as TRUE, otherwise it is assumed that not
It has differences, RES_D is labeled as FALSE.Electronic equipment is by the image definition of the second image data and the first image data
Image definition be compared, if the difference of the image definition of the two be greater than the corresponding threshold value of image definition, then it is assumed that
The image definition of first image data and the second image data has differences, and RES_S is labeled as TRUE, otherwise it is assumed that not
It has differences, RES_S is labeled as FALSE.Electronic equipment is by the brightness of image of the second image data and the first image data
Brightness of image is compared, if the difference of the brightness of image of the two is greater than the corresponding threshold value of brightness of image, then it is assumed that the first image
The brightness of image of data and the second image data has differences, and RES_B is labeled as TRUE, otherwise it is assumed that difference is not present, it will
RES_B is labeled as FALSE.Wherein, RES_D is the corresponding label of image center location, and TRUE indicates first event (the image center of circle
Position has differences) it sets up, RES_S is the corresponding label of image definition, and RES_B is the corresponding label of brightness of image, TRUE
Expression has differences, and FALSE indicates that difference is not present.Electronic equipment is if it is determined that RES_D, RES_S and RES_B are marked as
Difference is not present in the characteristics of image of FALSE, the then characteristics of image and the second image data that illustrate the first image data, however, it is determined that
Any one in RES_D, RES_S and RES_B is marked as TRUE, then it is assumed that the characteristics of image of the first image data and the second figure
As the characteristics of image of data has differences.
Step 104: according to referring to data, determining the target detection model of area to be tested.
It, can be according to obtaining target detection model referring to data specifically, electronic equipment is determined referring to after data.
Below to according to referring to data, the method for determining the target detection model of area to be tested is illustrated.
It in the first instance, is the corresponding training data of the second image data referring to data.Electronic equipment is according to first
The characteristics of image of image data, the corresponding training data of the second image data of adjustment, obtains the corresponding training of the first image data
Data;Based on the corresponding training data of the first image data, original object detection model is trained, area to be tested is obtained
Target detection model.Wherein, original object detection model refers to the target detection model without any training.
It should be noted that original object detection model can be faster region convolutional neural networks (faster
Region Convolutional Neural Networks, faster R-CNN) model, it is also possible to other models, this reality
Apply the structure that mode does not limit original object detection model.
It is noted that characteristics of image of the electronic equipment according to the first image data, to stored in electronic equipment
Training data is expanded, and obtains the corresponding training data of the first image data to get to the corresponding shooting of the first image data
Training data under environment, without being manually acquired, marking to the training data under the corresponding shooting environmental of the first image data
Note, reduce manually acquire, mark it is multi-environment under training data workload.
It is noted that electronic equipment is based on training data adjusted, original object detection model is trained,
The target detection model for being suitble to the corresponding shooting environmental of the first image data is obtained, reduces the different of shooting environmental and detection is known
Other accuracy rate bring influences.
In one example, electronic equipment is after obtaining the target detection model of area to be tested, by the first picture number
According to preservation to image data base;The corresponding training data of first image data is saved to tranining database;By area to be tested
Target detection model save to model database as the corresponding target detection model of the first image data.
It is noted that training data and first image of the electronic equipment to the first image data, the first image data
The corresponding target detection model of data is saved, and the automatic expansion of each database is realized.
The adjustment mode of the corresponding training data of the second image data is illustrated below.
Mode 1: electronic equipment adjusts each width training image in the corresponding training data of the second image data, so as to adjust
The characteristics of image of training image after whole is identical as the characteristics of image of the first image data;According to training image adjusted, really
The fixed corresponding training data of first image data.
For example, characteristics of image includes image center location, image definition and brightness of image.Electronic equipment determines the first figure
As the offset of the image center location of the image center location and the second image data of data, offset include offset distance and
Deviation angle.Electronic equipment moves in the corresponding training data of the second image data according to the offset of image center location
The effective coverage of training image.Electronic equipment is clear according to the image definition of the first image data and the image of the second image data
The difference of clear degree carries out blurring mapping to training image.Electronic equipment is according to the brightness of image and the second figure of the first image data
As the difference of the brightness of image of data, the brightness of image of adjusting training image.
Mode 2: the characteristics of image for needing to adjust is determined;Adjust each width in the corresponding training data of the second image data
Training image, so that the figure that the needs of characteristics of image and the first image data that the needs of training image adjusted adjust adjust
As feature is identical;According to training image adjusted, the training data of the first image data is determined.
Specifically, electronic equipment is directed to each characteristics of image, performs the following operation respectively: determining the first image data
Characteristics of image and the second image data characteristics of image difference;Judge whether difference is greater than the corresponding threshold value of characteristics of image,
If it is determined that being the characteristics of image for adjusting characteristics of image as needs.
For example, characteristics of image includes image center location, image definition and brightness of image.Electronic equipment determines the first figure
As the offset of the image center location of the image center location and the second image data of data, the inclined of image center location is judged
Whether shifting amount is greater than the corresponding threshold value of image center location, however, it is determined that be, according to the offset of center location, mobile second image
The effective coverage of training image in the corresponding training data of data, otherwise, the not effective coverage of adjusting training image.Electronics is set
The difference of the image definition of the standby image definition for determining the first image data and the second image data, judges image definition
Whether difference is greater than the corresponding threshold value of image definition, however, it is determined that is, according to the image definition of the first image data and second
The difference of the image definition of image data carries out blurring mapping to training image, and otherwise, the image of adjusting training image is not clear
Clear degree.Electronic equipment determines the difference of the brightness of image of the first image data and the brightness of image of the second image data, judges to scheme
Whether the difference of image brightness is greater than the corresponding threshold value of brightness of image, however, it is determined that be, according to the brightness of image of the first image data and
The difference of the brightness of image of second image data, the brightness of image of adjusting training image, otherwise, the not image of adjusting training data
Brightness.
It is noted that electronic equipment only adjusts the figure for being greater than the corresponding threshold value of characteristics of image to the difference of training image
As feature, it is possible to reduce to the modification amount of training image, and then reduce the data processing intensity of electronic equipment.
It is the corresponding target detection model of the second image data referring to data in second example.Electronic equipment is by
The corresponding target detection model of two image datas, the target detection model as area to be tested.
Specifically, due to the characteristics of image and the first image data of the second image data characteristics of image difference compared with
It is small, therefore the corresponding shooting environmental of the first image data shooting environmental corresponding with the second image data is similar, the second image data
Corresponding target detection model under the corresponding shooting environmental of the first image data in use, error is smaller, therefore, electronic equipment
It can be used using the corresponding target detection model of the second image data as the target detection model of area to be tested.
It is noted that using the corresponding target detection model of the second image data as the target detection of area to be tested
Model reduces the time of the target detection model of electronic equipment training area to be tested.
It should be noted that the above is only limit for example, not constituting to technical solution of the present invention.
Compared with prior art, the method for the creation target detection model provided in present embodiment, the first image data
It is able to reflect the shooting environmental of current area to be tested, the second image data is able to reflect the corresponding training of the second image data
Data and the corresponding shooting environmental of the corresponding target detection model of the second image data, therefore, based on the first image data and the
Two image datas carry out, and select suitably to ensure that referring to data and determine area to be tested referring to data according to selection
Target detection model accuracy rate, avoid the difference due to shooting environmental from leading to the standard of target detection model of area to be tested
The problem of true rate deficiency.
Second embodiment of the present invention is related to a kind of method for creating target detection model, and present embodiment is to first
The further refinement of embodiment specifically illustrates the process for obtaining the second image data.
Specifically, as shown in Fig. 2, in the present embodiment, including step 201 to step 204, wherein step 201,
Step 203, step 204 are roughly the same with step 101, step 103 and the step 104 in first embodiment respectively, herein not
It repeats again.Difference is mainly introduced below:
Step 201: obtaining the first image data of area to be tested.
Step 202: the first image data is compared with the M third image data prestored in image data base respectively
Compared with the determining and the smallest third image data of the first image data difference, by the smallest third image data of difference, as second
Image data.
Specifically, the M third image data prestored in the image data base of electronic equipment, M is just whole greater than 1
The characteristics of image of number, any two third image data is different.
In one example, the corresponding training data of the second image data is stored in tranining database, the second image
The corresponding target detection model of data is stored in model database.
In one example, electronic equipment is Intelligent cargo cabinet, target detection mould of the Intelligent cargo cabinet in creation area to be tested
Before type, for a kind of shooting environmental, perform the following operation: one group of acquisition sky cabinet (what commodity dead beat lets alone) photo of acquisition is made
For the third image data of the Intelligent cargo cabinet of the shooting environmental, which is saved to image data base, is labeled as
Standard picture 0;The artificial acquisition mark that electronic equipment obtains the Intelligent cargo cabinet for putting real goods under the shooting environmental is a large amount of
Training data, be labeled as training data 0, be saved in tranining database.The mesh that electronic equipment will be trained based on training data 0
Mark detection model is denoted as model 0, is saved in model database.Electronic equipment is directed to different shooting environmentals, in execution
Operation is stated, to establish image data base, tranining database and model database.
The determining method with the smallest third image data of the first image data difference is illustrated below.
Method 1: electronic equipment is directed to each third image data, performs the following operation respectively: by third image data
Characteristics of image is compared with the characteristics of image of the first image data, and it is poor to determine that third image data and the first image data exist
Different characteristics of image.Electronic equipment is in the characteristics of image for determining that each third image data and the first image data have differences
Afterwards, the number for the characteristics of image being had differences according to each third image data and the first image data, determines that difference is the smallest
Third image data.
In one example, the least third image data of the number for the characteristics of image being had differences with the first image data
Number be equal to 1, by the least third image data of the number for the characteristics of image being had differences with the first image data, as difference
Different the smallest third image data.
It is assumed that characteristics of image includes image center location, image definition and brightness of image, it include 3 in image data base
A third image data, it is poor that the image definition and brightness of image of first third image data and the first image data exist
Different, the brightness of image of second third image data and the first image data has differences, third third image data and the
Image center location, image definition and the brightness of image of one image data have differences, then it is assumed that second third picture number
According to being the smallest third image data of difference.
In one example, the least third image data of the number for the characteristics of image being had differences with the first image data
Number be greater than 1, then a third image data can be selected, as the second picture number according to pre-set screening rule
According to.
It is assumed that characteristics of image includes feature A, feature B and feature C, by the image having differences with the first image data spy
For the least third image data of the number of sign as candidate image data, pre-set screening rule may is that electronic equipment
Whether the characteristics of image for judging that candidate image data and the first image data have differences is identical, however, it is determined that be, it will be with the first figure
As the smallest candidate image data of the difference of the characteristics of image having differences of data are as the second image data;Otherwise, electric
Sub- equipment carries out first time delete operation: deleting the candidate that A is characterized with the characteristics of image of the first image data having differences
Image data, if the number of remaining candidate image data is equal to 1 after first time delete operation, after first time delete operation
Remaining candidate image data as the second image data, if after first time delete operation remaining candidate image data number
Greater than 1, the characteristics of image that remaining candidate image data and the first image data have differences after first time delete operation is judged
It is whether identical, however, it is determined that be, by the smallest candidate image of difference of the characteristics of image having differences with the first image data
Data are as the second image data;Otherwise, electronic equipment carries out second of delete operation: deleting the presence with the first image data
The characteristics of image of difference is characterized the candidate image data of B, if remaining candidate image data is a after second of delete operation
Number is equal to 1, then using candidate image data remaining after second of delete operation as the second image data, if second is deleted behaviour
The number of remaining candidate image data is greater than 1 after work, according to by the smallest candidate of difference of the feature C with the first image data
Image data is as the second image data.
It should be noted that it will be understood by those skilled in the art that pre-set screening rule can be according to practical feelings
Condition setting, by way of example only, present embodiment does not limit the specific rules in pre-set screening rule to present embodiment.
It should be noted that it will be understood by those skilled in the art that the corresponding threshold value of image center location, image definition
Corresponding threshold value and the corresponding threshold value of brightness of image can according to need setting, and present embodiment does not limit its specific value.
Method 2: electronic equipment is directed to each third image data, performs the following operation respectively: by third image data
Characteristics of image is compared with the characteristics of image of the first image data, determines each of third image data and the first image data
The difference of characteristics of image;According to the difference of each characteristics of image of third image data and the first image data, determine difference most
Small third image data.
In one example, characteristics of image includes image center location, image definition and brightness of image, image center of circle position
The difference ratio coefficient u set, the difference ratio coefficient of image definition are v, and the difference ratio coefficient of brightness of image is w.Image
In database include 3 third image datas, electronic equipment for each third image data carry out aforesaid operations when, for
Each characteristics of image is compared respectively.Electronic equipment is by the image center location of third image data and the first image data
Image center location is compared, and determines the difference of the image center location of the two;By the image definition of third image data
It is compared with the image definition of the first image data, determines the difference of the image definition of the two;By third image data
Brightness of image be compared with the brightness of image of the first image data, determine both brightness of image difference.It is assumed that electronics
Equipment is learnt after above-mentioned comparison: the difference of the image center location of first third image data and the first image data
For a1, the difference of image definition is b1, and the difference of brightness of image is c1, second third image data and the first image data
The difference of image center location be a2, the difference of image definition is b2, and the difference of brightness of image is c2, third third figure
As the difference of data and the image center location of the first image data is a3, the difference of image definition is b3, brightness of image
Difference is c3, then electronic equipment determines that the difference of first third image data and the first image data is T1=a1*u+b1*v+
The difference of c1+w, second third image data and the first image data is T2=a2*u+b2*v+c2+w, third third figure
As the difference of data and the first image data is T3=a3*u+b3*v+c3+w.Electronic equipment compares the size of T1, T2 and T3, will
The corresponding third image data of the smallest numerical value is as the smallest third image data of difference.
It should be noted that it will be understood by those skilled in the art that in practical application, the corresponding threshold value of each characteristics of image
It can according to need setting, present embodiment does not limit its specific value.
It should be noted that it will be understood by those skilled in the art that can also be marked according to other judgements in practical application
Standard, determining with the smallest third image data of the first image data difference, it is the smallest by that present embodiment does not limit determining difference
The method of three image datas.
It should be noted that it will be understood by those skilled in the art that characteristics of image may include image circle in practical application
Any one in heart position, image definition and brightness of image or any combination also may include other features.
In one example, the first image data is fish eye images.Electronic equipment determines the first image data and third figure
As the method for the difference of the image center location of data is as follows: electronic equipment determines first by the scaling method of fish eye images
The central coordinate of circle of the effective coverage of the central coordinate of circle and third image data of the effective coverage of image data.According to the first figure
As the central coordinate of circle of the effective coverage of the central coordinate of circle and third image data of the effective coverage of data, two central coordinate of circle are determined
The distance between two central coordinate of circle the angle of line, sat according to the distance between two central coordinate of circle and two centers of circle
The angle of line between mark determines the offset in the image center of circle of the first image data and third image data, by the first image
The offset in the image center of circle of data and third image data, the image center of circle as the first image data and third image data
The difference of position.
In one example, electronic equipment determines the image clearly of the first image data by Laplce's variance algorithm
The image definition of degree and third image data.
In one example, electronic equipment is by the sum of the gray scale of pixel each in the first image data, divided by the first image
Total number of pixels of data, obtains the brightness of image of the first image data, by the gray scale of pixel each in third image data
With divided by total number of pixels of third image data, obtain the brightness of image of third image data.
It should be noted that it will be understood by those skilled in the art that the mode of above-mentioned determining characteristics of image is only for example
It is bright, in practical application, the characteristics of image of image data can also be determined using other modes.
In one example, electronic equipment is Intelligent cargo cabinet, and area to be tested is the bat of the fish-eye camera of Intelligent cargo cabinet
Region is taken the photograph, the first image data is the image data shot when not placing object in Intelligent cargo cabinet under current environment, each third
Image data is to shoot when not placing object in Intelligent cargo cabinet under the sampling environment of the corresponding training data of third image data
Image data.
It is noted that the image data under a variety of shooting environmentals, training data and target detection model is stored in advance,
The shooting environmental probability similar with the shooting environmental of pre-stored image data of area to be tested can be improved, reduce and need
Re -training original object detection model is to obtain the probability of the target detection model of area to be tested.
Step 203: according to the first image data and the second image data, determining referring to data.
Step 204: according to referring to data, determining the target detection model of area to be tested.
It should be noted that the above is only limit for example, not constituting to technical solution of the present invention.
Compared with prior art, the method for the creation target detection model provided in present embodiment, the first image data
It is able to reflect the shooting environmental of current area to be tested, the second image data is able to reflect the corresponding training of the second image data
Data and the corresponding shooting environmental of the corresponding target detection model of the second image data, therefore, based on the first image data and the
Two image datas carry out, and select suitably to ensure that referring to data and determine area to be tested referring to data according to selection
Target detection model accuracy rate, avoid the difference due to shooting environmental from leading to the standard of target detection model of area to be tested
The problem of true rate deficiency.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or
Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection scope of this patent
It is interior;To adding inessential modification in algorithm or in process or introducing inessential design, but its algorithm is not changed
Core design with process is all in the protection scope of the patent.
Third embodiment of the present invention is related to a kind of electronic equipment, as shown in Figure 3, comprising: at least one processor;With
And the memory being connect at least one processor communication;Wherein, memory is stored with and can be executed by least one processor
Instruction, instruction is executed by least one processor, so that at least one processor is able to carry out as above embodiment refers to
The method for creating target detection model.
The electronic equipment includes: one or more processors 301 and memory 302, with a processor 301 in Fig. 3
For.Processor 301, memory 302 can be connected by bus or other modes, in Fig. 3 for being connected by bus.
Memory 302 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software program, non-volatile
Property computer executable program and module.Non-volatile software journey of the processor 301 by operation storage in the memory 302
Sequence, instruction and module realize above-mentioned creation target detection thereby executing the various function application and data processing of equipment
The method of model.
Memory 302 may include storing program area and storage data area, wherein storing program area can store operation system
Application program required for system, at least one function;It storage data area can the Save option list etc..In addition, memory 302 can be with
It can also include nonvolatile memory, for example, at least disk memory, a flash memory including high-speed random access memory
Device or other non-volatile solid state memory parts.In some embodiments, it includes relative to processing that memory 302 is optional
The remotely located memory of device 301, these remote memories can pass through network connection to external equipment.The example of above-mentioned network
Including but not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more module stores in the memory 302, when being executed by one or more processor 301, holds
The method of creation target detection model in the above-mentioned any means embodiment of row.
The said goods can be performed the application embodiment provided by method, have the corresponding functional module of execution method and
Beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to method provided by the application embodiment.
4th embodiment of the invention is related to a kind of computer readable storage medium, is stored with computer program.It calculates
Machine program realizes above method embodiment when being executed by processor.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with
Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make
It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes each embodiment method of the application
All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention,
And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.
Claims (14)
1. a kind of method for creating target detection model characterized by comprising
Obtain the first image data of area to be tested, and the second image data prestored;
According to the first image data and second image data, determine referring to data;Described referring to data is described the
The corresponding target detection model of two image datas, or, the corresponding training data of second image data;
According to described referring to data, the target detection model of the area to be tested is determined.
2. the method for creation target detection model according to claim 1, which is characterized in that described according to first figure
As data and second image data, determines referring to data, specifically includes:
Whether the described image feature of the described image feature and second image data that judge the first image data deposits
In difference;
If it is determined that being, it is determined that the reference data are the corresponding training data of second image data;
If it is determined that not being, it is determined that the reference data are the corresponding target detection model of second image data.
3. the method for creation target detection model according to claim 2, which is characterized in that the reference data are described
The corresponding training data of second image data;
It is described according to described referring to data, determine the target detection model of the area to be tested, specifically include:
According to the characteristics of image of the first image data, the corresponding training data of second image data is adjusted, institute is obtained
State the corresponding training data of the first image data;
Based on the corresponding training data of the first image data, original object detection model is trained, obtain it is described to
The target detection model of detection zone.
4. the method for creation target detection model according to claim 3, which is characterized in that described according to first figure
As the characteristics of image of data, the corresponding training data of second image data is adjusted, it is corresponding to obtain the first image data
Training data, specifically include:
Each width training image in the corresponding training data of second image data is adjusted, so that training image adjusted
Characteristics of image it is identical as the characteristics of image of the first image data;
According to training image adjusted, the corresponding training data of the first image data is determined.
5. the method for creation target detection model according to claim 3, which is characterized in that described according to first figure
As the characteristics of image of data, the corresponding training data of second image data is adjusted, it is corresponding to obtain the first image data
Training data, specifically include:
Determine the characteristics of image for needing to adjust;
Each width training image in the corresponding training data of second image data is adjusted, so that training image adjusted
The characteristics of image of needs adjustment of characteristics of image and the first image data of needs adjustment it is identical;
According to the training image adjusted, the training data of the first image data is determined.
6. the method for creation target detection model according to claim 5, which is characterized in that the determining needs adjusted
Characteristics of image specifically includes:
For each characteristics of image, perform the following operation respectively: determine the described image features of the first image data with
The difference of the described image feature of second image data;Judge whether the difference is greater than the corresponding threshold of described image feature
Value, however, it is determined that be the characteristics of image for adjusting described image feature as needs.
7. the method for creation target detection model according to claim 3, which is characterized in that be based on described first described
The corresponding training data of image data, is trained original object detection model, obtains the target inspection of the area to be tested
It surveys after model, the method for the creation target detection model further include:
The first image data are saved to described image database;
The corresponding training data of the first image data is saved to tranining database;
The target detection model of the area to be tested is protected as the corresponding target detection model of the first image data
It deposits to model database.
8. the method for creation target detection model according to claim 2, which is characterized in that the reference data are described
The corresponding target detection model of second image data;
It is described according to described referring to data, determine the target detection model of the area to be tested, specifically include:
Target detection model by the corresponding target detection model of second image data, as the area to be tested.
9. the method for creation target detection model according to any one of claim 2 to 8, which is characterized in that the figure
As feature includes at least any one in image center location, image definition and brightness of image.
10. the method for creation target detection model according to claim 1, which is characterized in that obtain the second figure prestored
As data, specifically include:
The first image data are compared with the M third image data prestored in image data base respectively, determine with
The smallest third image data of the first image data difference, M are the positive integer greater than 1;
By the smallest third image data of the difference, as second image data.
11. the method for creation target detection model according to claim 10, which is characterized in that described by first figure
It is determining with the first image data as data are compared with the M third image data prestored in image data base respectively
The smallest third image data of difference, specifically includes:
For each third image data, perform the following operation respectively: by the characteristics of image of the third image data with
The characteristics of image of the first image data is compared, and determines that the third image data and the first image data exist
The characteristics of image of difference;
According to the number for the characteristics of image that each third image data and the first image data have differences, institute is determined
State the smallest third image data of difference.
12. the method for creation target detection model according to claim 10, which is characterized in that described by first figure
It is determining with the first image data as data are compared with the M third image data prestored in image data base respectively
The smallest third image data of difference, specifically includes:
For each third image data, perform the following operation respectively: by the characteristics of image of the third image data with
The characteristics of image of the first image data is compared, and determines the every of the third image data and the first image data
The difference of a characteristics of image;
According to the difference of each characteristics of image of the third image data and the first image data, the difference is determined most
Small third image data.
13. a kind of electronic equipment characterized by comprising at least one processor;And
The memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory
The instruction that a processor executes, described instruction is executed by least one described processor, so that at least one described processor energy
Enough methods for executing the creation target detection model as described in any one of claims 1 to 12.
14. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program is located
The method that reason device realizes creation target detection model described in any one of claims 1 to 12 when executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910314249.2A CN110059746A (en) | 2019-04-18 | 2019-04-18 | A kind of method, electronic equipment and storage medium creating target detection model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910314249.2A CN110059746A (en) | 2019-04-18 | 2019-04-18 | A kind of method, electronic equipment and storage medium creating target detection model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110059746A true CN110059746A (en) | 2019-07-26 |
Family
ID=67319547
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910314249.2A Pending CN110059746A (en) | 2019-04-18 | 2019-04-18 | A kind of method, electronic equipment and storage medium creating target detection model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110059746A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114972303A (en) * | 2022-06-16 | 2022-08-30 | 平安科技(深圳)有限公司 | Image acquisition method and device, electronic equipment and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521840A (en) * | 2011-11-18 | 2012-06-27 | 深圳市宝捷信科技有限公司 | Moving target tracking method, system and terminal |
CN103258216A (en) * | 2013-05-15 | 2013-08-21 | 中国科学院自动化研究所 | Regional deformation target detection method and system based on online learning |
CN105184213A (en) * | 2014-06-12 | 2015-12-23 | 松下知识产权经营株式会社 | Image Recognition Method And Camera System |
CN106447701A (en) * | 2015-08-05 | 2017-02-22 | 佳能株式会社 | Methods and devices for image similarity determining, object detecting and object tracking |
CN107256561A (en) * | 2017-04-28 | 2017-10-17 | 纳恩博(北京)科技有限公司 | Method for tracking target and device |
CN107463946A (en) * | 2017-07-12 | 2017-12-12 | 浙江大学 | A kind of type of merchandize detection method of combination template matches and deep learning |
CN107644234A (en) * | 2017-10-12 | 2018-01-30 | 成都思晗科技股份有限公司 | A kind of insulator of transmission line of electricity comes off defect inspection method |
CN107680091A (en) * | 2017-10-12 | 2018-02-09 | 成都思晗科技股份有限公司 | A kind of stockbridge damper of transmission line of electricity comes off defect inspection method |
CN108183916A (en) * | 2018-01-15 | 2018-06-19 | 华北电力科学研究院有限责任公司 | A kind of network attack detecting method and device based on log analysis |
CN109189548A (en) * | 2018-08-01 | 2019-01-11 | 平安科技(深圳)有限公司 | Resource regulating method, device, computer equipment and computer readable storage medium |
CN109461168A (en) * | 2018-10-15 | 2019-03-12 | 腾讯科技(深圳)有限公司 | The recognition methods of target object and device, storage medium, electronic device |
CN109492522A (en) * | 2018-09-17 | 2019-03-19 | 中国科学院自动化研究所 | Specific objective detection model training program, equipment and computer readable storage medium |
-
2019
- 2019-04-18 CN CN201910314249.2A patent/CN110059746A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521840A (en) * | 2011-11-18 | 2012-06-27 | 深圳市宝捷信科技有限公司 | Moving target tracking method, system and terminal |
CN103258216A (en) * | 2013-05-15 | 2013-08-21 | 中国科学院自动化研究所 | Regional deformation target detection method and system based on online learning |
CN105184213A (en) * | 2014-06-12 | 2015-12-23 | 松下知识产权经营株式会社 | Image Recognition Method And Camera System |
CN106447701A (en) * | 2015-08-05 | 2017-02-22 | 佳能株式会社 | Methods and devices for image similarity determining, object detecting and object tracking |
CN107256561A (en) * | 2017-04-28 | 2017-10-17 | 纳恩博(北京)科技有限公司 | Method for tracking target and device |
CN107463946A (en) * | 2017-07-12 | 2017-12-12 | 浙江大学 | A kind of type of merchandize detection method of combination template matches and deep learning |
CN107644234A (en) * | 2017-10-12 | 2018-01-30 | 成都思晗科技股份有限公司 | A kind of insulator of transmission line of electricity comes off defect inspection method |
CN107680091A (en) * | 2017-10-12 | 2018-02-09 | 成都思晗科技股份有限公司 | A kind of stockbridge damper of transmission line of electricity comes off defect inspection method |
CN108183916A (en) * | 2018-01-15 | 2018-06-19 | 华北电力科学研究院有限责任公司 | A kind of network attack detecting method and device based on log analysis |
CN109189548A (en) * | 2018-08-01 | 2019-01-11 | 平安科技(深圳)有限公司 | Resource regulating method, device, computer equipment and computer readable storage medium |
CN109492522A (en) * | 2018-09-17 | 2019-03-19 | 中国科学院自动化研究所 | Specific objective detection model training program, equipment and computer readable storage medium |
CN109461168A (en) * | 2018-10-15 | 2019-03-12 | 腾讯科技(深圳)有限公司 | The recognition methods of target object and device, storage medium, electronic device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114972303A (en) * | 2022-06-16 | 2022-08-30 | 平安科技(深圳)有限公司 | Image acquisition method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021000664A1 (en) | Method, system, and device for automatic calibration of differences in cross-modal target detection | |
CN109376667A (en) | Object detection method, device and electronic equipment | |
Tseng et al. | Automatic measurement of the body length of harvested fish using convolutional neural networks | |
CN109389618B (en) | Foreground and background detection method | |
CN109410316A (en) | Method, tracking, relevant apparatus and the storage medium of the three-dimensional reconstruction of object | |
CN109472193A (en) | Method for detecting human face and device | |
CN108537115B (en) | Image recognition method and device and electronic equipment | |
CN109116129B (en) | Terminal detection method, detection device, system and storage medium | |
CN111666800A (en) | Pedestrian re-recognition model training method and pedestrian re-recognition method | |
CN109635740A (en) | Video object detection method, device and image processing equipment | |
JP7092615B2 (en) | Shadow detector, shadow detection method, shadow detection program, learning device, learning method, and learning program | |
CN109819176A (en) | A kind of image pickup method, system, device, electronic equipment and storage medium | |
CN108876806A (en) | Method for tracking target and system, storage medium and equipment based on big data analysis | |
CN110910445A (en) | Object size detection method and device, detection equipment and storage medium | |
CN108847031A (en) | Traffic behavior monitoring method, device, computer equipment and storage medium | |
Ren et al. | Environment influences on uncertainty of object detection for automated driving systems | |
CN110059746A (en) | A kind of method, electronic equipment and storage medium creating target detection model | |
CN113505643A (en) | Violation target detection method and related device | |
CN110334703B (en) | Ship detection and identification method in day and night image | |
CN110751163B (en) | Target positioning method and device, computer readable storage medium and electronic equipment | |
CN111738043A (en) | Pedestrian re-identification method and device | |
CN116612272A (en) | Intelligent digital detection system for image processing and detection method thereof | |
CN113808117B (en) | Lamp detection method, device, equipment and storage medium | |
CN115965934A (en) | Parking space detection method and device | |
CN115984712A (en) | Multi-scale feature-based remote sensing image small target detection method and system |
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 |