CN109949359A - A kind of method and apparatus carrying out target detection based on SSD model - Google Patents
A kind of method and apparatus carrying out target detection based on SSD model Download PDFInfo
- Publication number
- CN109949359A CN109949359A CN201910114491.5A CN201910114491A CN109949359A CN 109949359 A CN109949359 A CN 109949359A CN 201910114491 A CN201910114491 A CN 201910114491A CN 109949359 A CN109949359 A CN 109949359A
- Authority
- CN
- China
- Prior art keywords
- size
- items
- images
- block diagram
- target
- 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
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a kind of method and apparatus that target detection is carried out based on SSD model, the commodity of Small object can be directed to, block diagram size corresponding with target image size in the commodity image is matched, obtains classification belonging to each target and position in the commodity image using the corresponding block diagram.This method comprises: obtaining images of items;Target detection is carried out to the images of items by the SSD model constructed in advance, obtain classification belonging to each target and position in the images of items, wherein, it constructs in SSD model process, according in training sample in images of items target picture size, determine in the SSD model of the building for detecting the size of the block diagram of objective attribute target attribute in images of items.
Description
Technical field
The present invention relates to artificial intelligence technologys, more particularly to a kind of more box detector SSD models of single-shot that are based on to carry out targets
The method and apparatus of detection.
Background technique
In the prior art, artificial intelligence technology is increasingly close to people's lives, for people's lives bring it is many just
Benefit, such as unmanned supermarket or a kind of automatic vending machine of human-computer interaction type all do not need manually to carry out barcode scanning checkout to commodity,
User only needs in supermarket or opens the counter of the automatic vending machine, manual picking commodities, using being attached on commodity
RFID label tag is bought, and unmanned supermarket or the automatic retail machine can be determined whether according to the RFID signal detected
Commodity take out, and determine whether to generate buying behavior.
But it is above-mentioned to be bought using the RFID label tag being attached on commodity, there is following defect:
On the one hand, each commodity require to stick RFID label tag, and the price of each commodity is determined according to the RFID label tag,
A large amount of manpowers are consumed, the cost of commodity is added somewhat to;
On the other hand, after due to needing to detect the RFID label tag on each commodity, can determine the commodity whether by with
Family is taken out, if the commodity that user takes are more, it is easy to block the RFID label tag on the commodity of part, cause the leakage to commodity
Inspection, brings economic loss to businessman.
Summary of the invention
The present invention provides one kind and carries out object detection method and equipment based on SSD model, can be directed to the commodity of Small object,
Block diagram size corresponding with target image size in the commodity image is matched, obtains the commodity using the corresponding block diagram
Classification belonging to each target and position in image.
In a first aspect, the present invention provides a kind of method for carrying out target detection based on SSD model, this method comprises:
Obtain images of items;
Target detection is carried out to the images of items by the SSD model constructed in advance, is obtained every in the images of items
Classification belonging to a target and position, wherein in building SSD model process, according to target in images of items in training sample
Picture size determines in the SSD model of the building for detecting the size of the block diagram of objective attribute target attribute in images of items.
A kind of method carrying out target detection based on SSD model provided by the invention, sets to unmanned supermarket or automatic retail
It is standby that a kind of new method is provided, target identification is carried out based on end article of the SSD target detection model to purchase, is belonged to based on commodity
Small target deteection carries out Small object using with the matched block diagram for detecting objective attribute target attribute in images of items of the Small object
Detection identification, on the one hand, human resources are saved, do not need to stick RFID label tag to commodity, marketing method is more flexible and convenient,
On the other hand, it can be avoided recall rate caused by excessively blocking RFID label tag because of commodity to decline, reduce the economic loss of businessman.
As an alternative embodiment, the SSD model includes at least one characteristic image layer, each characteristic image
Layer is for detecting the objective attribute target attribute of images of items by the corresponding block diagram of this feature image layer, wherein different characteristic image layers
Size range belonging to the size of corresponding block diagram is different.
As an alternative embodiment, building SSD model process is according to target in images of items in training sample
Picture size determines in the SSD model constructed in advance for detecting the size of the block diagram of objective attribute target attribute in images of items, packet
It includes:
The size for initializing the different corresponding block diagrams of characteristic image layer makes the different corresponding block diagrams of characteristic image layer
Size range belonging to size is different;
It is screened in the corresponding block diagram of each characteristic image layer using training sample, the target with images of items in training sample
The block diagram that picture size matches, the training sample include the target image size of images of items and images of items.
As an alternative embodiment, the target image size of images of items passes through such as lower section in the training sample
Formula obtains:
According to the identification information of each target image of images of items in training sample, the size of each target image is determined
Range;
According to the size range of each target image, the target image size of images of items is determined.
As an alternative embodiment, the SSD model constructed in advance includes back-end network extras, after described
End network extras includes single order convolutional network layer and at least one CFE after the single order convolutional network layer, described
CFE is used to carry out convolution algorithm to the data of input simultaneously respectively using the convolution kernel having a size of K × 1 and 1 × K, and the K is positive
Integer.
As an alternative embodiment, the back-end network extras further includes at least one Second Order Convolution network
Layer, at least one described CFE between the Second Order Convolution network layer and at least one described Second Order Convolution network layer, or
Person, at least one described CFE are located at after single order convolutional network layer, and at least one described CFE and at least one described second order
Convolutional network layer cross-distribution.
As an alternative embodiment, screened in the corresponding block diagram of each characteristic image layer using training sample, with
The block diagram that the target image size of images of items matches in training sample, comprising:
Using the corresponding block diagram of each characteristic image layer, the images of items in training sample is traversed;
It determines in the corresponding block diagram of each characteristic image layer, the target image size phase with images of items in training sample
The deviation between block diagram matched;
Filter out block diagram of each characteristic image layer large deviations within the scope of predetermined deviation.
As an alternative embodiment, being repaired by the ratio to the corresponding block diagram length and width of the characteristic image layer
Change, increases the quantity of the corresponding block diagram of the characteristic image layer.
Second aspect, the present invention provide a kind of equipment for carrying out target detection based on SSD model, which includes: processing
Device and memory, wherein the memory is stored with program code, when said program code is executed by the processor,
So that the processor is for executing following steps:
Obtain images of items;
Target detection is carried out to the images of items by the SSD model constructed in advance, is obtained every in the images of items
Classification belonging to a target and position, wherein in building SSD model process, according to target in images of items in training sample
Picture size determines in the SSD model of the building for detecting the size of the block diagram of objective attribute target attribute in images of items.
As an alternative embodiment, the SSD model includes at least one characteristic image layer, each characteristic image
Layer is for detecting the objective attribute target attribute of images of items by the corresponding block diagram of this feature image layer, wherein different characteristic image layers
Size range belonging to the size of corresponding block diagram is different.
As an alternative embodiment, the processor is used for:
The size for initializing the different corresponding block diagrams of characteristic image layer makes the different corresponding block diagrams of characteristic image layer
Size range belonging to size is different;
It is screened in the corresponding block diagram of each characteristic image layer using training sample, the target with images of items in training sample
The block diagram that picture size matches, the training sample include the target image size of images of items and images of items.
As an alternative embodiment, the target image size of images of items passes through such as lower section in the training sample
Formula obtains:
According to the identification information of each target image of images of items in training sample, the size of each target image is determined
Range;
According to the size range of each target image, the target image size of images of items is determined.
As an alternative embodiment, the SSD model constructed in advance includes back-end network extras, after described
End network extras includes single order convolutional network layer and at least one CFE after the single order convolutional network layer, described
CFE is used to carry out convolution algorithm to the data of input simultaneously respectively using the convolution kernel having a size of K × 1 and 1 × K, and the K is positive
Integer.
As an alternative embodiment, the back-end network extras further includes at least one Second Order Convolution network
Layer, at least one described CFE between the Second Order Convolution network layer and at least one described Second Order Convolution network layer, or
Person, at least one described CFE are located at after single order convolutional network layer, and at least one described CFE and at least one described second order
Convolutional network layer cross-distribution.
As an alternative embodiment, the processor is used for:
Using the corresponding block diagram of each characteristic image layer, the images of items in training sample is traversed;
It determines in the corresponding block diagram of each characteristic image layer, the target image size phase with images of items in training sample
The deviation between block diagram matched;
Filter out block diagram of each characteristic image layer large deviations within the scope of predetermined deviation.
As an alternative embodiment, the processor is used for:
It is modified by the ratio to the corresponding block diagram length and width of the characteristic image layer, it is right to increase the characteristic image layer
The quantity for the block diagram answered.
The third aspect, the present invention provide a kind of equipment for carrying out target detection based on SSD model, which includes obtaining figure
As module, module of target detection, in which:
Image module is obtained, for obtaining images of items;
Module of target detection carries out target detection to the images of items for the SSD model by constructing in advance, obtains
Classification belonging to each target and position in the images of items, wherein in building SSD model process, according in training sample
The picture size of target in images of items determines in the SSD model of the building for detecting objective attribute target attribute in images of items
The size of block diagram.
As an alternative embodiment, the SSD model includes at least one characteristic image layer, each characteristic image
Layer is for detecting the objective attribute target attribute of images of items by the corresponding block diagram of this feature image layer, wherein different characteristic image layers
Size range belonging to the size of corresponding block diagram is different.
As an alternative embodiment, the module of target detection is specifically used for:
The size for initializing the different corresponding block diagrams of characteristic image layer makes the different corresponding block diagrams of characteristic image layer
Size range belonging to size is different;
It is screened in the corresponding block diagram of each characteristic image layer using training sample, the target with images of items in training sample
The block diagram that picture size matches, the training sample include the target image size of images of items and images of items.
As an alternative embodiment, the target image size of images of items passes through such as lower section in the training sample
Formula obtains:
According to the identification information of each target image of images of items in training sample, the size of each target image is determined
Range;
According to the size range of each target image, the target image size of images of items is determined.
As an alternative embodiment, the SSD model constructed in advance includes back-end network extras, after described
End network extras includes single order convolutional network layer and at least one CFE after the single order convolutional network layer, described
CFE is used to carry out convolution algorithm to the data of input simultaneously respectively using the convolution kernel having a size of K × 1 and 1 × K, and the K is positive
Integer.
As an alternative embodiment, the back-end network extras further includes at least one Second Order Convolution network
Layer, at least one described CFE between the Second Order Convolution network layer and at least one described Second Order Convolution network layer, or
Person, at least one described CFE are located at after single order convolutional network layer, and at least one described CFE and at least one described second order
Convolutional network layer cross-distribution.
As an alternative embodiment, the module of target detection is specifically used for:
Using the corresponding block diagram of each characteristic image layer, the images of items in training sample is traversed;
It determines in the corresponding block diagram of each characteristic image layer, the target image size phase with images of items in training sample
The deviation between block diagram matched;
Filter out block diagram of each characteristic image layer large deviations within the scope of predetermined deviation.
As an alternative embodiment, the module of target detection is specifically used for:
It is modified by the ratio to the corresponding block diagram length and width of the characteristic image layer, it is right to increase the characteristic image layer
The quantity for the block diagram answered.
Fourth aspect, the present invention provide a kind of computer storage medium, are stored thereon with computer program, which is located
Manage the step of realizing first aspect the method when unit executes.
In addition, second aspect technical effect brought by any implementation into fourth aspect can be found in first aspect
Technical effect brought by middle difference implementation, details are not described herein again.
Detailed description of the invention
Fig. 1 is SSD model structure schematic diagram provided in an embodiment of the present invention.
Fig. 2 is the method flow diagram provided in an embodiment of the present invention that target detection is carried out based on SSD model.
Fig. 3 is CFE module diagram provided in an embodiment of the present invention.
Fig. 4 is CFE module provided in an embodiment of the present invention in one of SSD model position view.
Fig. 5 is another position view of the CFE module provided in an embodiment of the present invention in SSD model.
Fig. 6 is a kind of equipment drawing that target detection is carried out based on SSD model provided in an embodiment of the present invention.
Fig. 7 is another equipment drawing that target detection is carried out based on SSD model provided in an embodiment of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into
It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall within the protection scope of the present invention.
Embodiment one
SSD model is a target detection model, can carry out detection identification, example to multiple targets in input picture
Such as, image is opened to SSD mode input one, includes multiple targets in described image, by SSD model to multiple in described image
After target is identified, the classification of each target position in the picture and each target in described image is exported.The present invention is real
Applying SSD model in example is the model that a kind of pair of target is detected, the SSD model and traditional SSD constructed in advance in this implementation
The basic structure of model is consistent, and all includes front network backbone and back-end network extra.
As shown in Figure 1, from left to right successively including multiple volumes in the schematic network structure of SSD target detection model
Product network layer, image 101 are the images inputted in SSD model, which is 300 × 300, pass through single order convolutional network layer
The image of 102 pairs of inputs carries out feature extraction, and single order convolutional network layer 102 is the convolutional network layer of VGG-16 model, second order volume
Product network layer 103 is the convolutional network layer having a size of 3 × 3 × 1024, and three rank convolutional network layers 104 are having a size of 1 × 1 × 1024
Convolutional network layer, be connected to quadravalence convolutional network layer 105, five rank convolutional network layers 106, six rank convolutional network layers again later
107, seven 108 4 convolutional network layer of rank convolutional network layer, it is special that this four convolutional network layers are located at SSD prototype network back-end image
Layer is levied, SSD model is by single order convolutional network layer 102, three rank convolutional network layers 104, quadravalence convolutional network layer 105, five rank convolution
Network layer 106, six rank convolutional network layers 107, seven rank convolutional network layers 108 all connect last detection layers 109 and do classification recurrence,
Export classification and position belonging to target in described image.Wherein, in single order convolutional network layer 102, three rank convolutional network layers
104, quadravalence convolutional network layer 105, five rank convolutional network layers 106, six rank convolutional network layers 107, on seven rank convolutional network layers 108
Fixation and recognition all is carried out to the target in image using anchor point anchor, the convolution different according to the size of convolutional network layer
The size range of the corresponding anchor of network layer is different, the frame of the objective attribute target attribute in the anchor, that is, embodiment of the present invention
Figure.SSD model is by the anchor in the different sizes of various sizes of convolutional network layer choosing, different proportion to the image of input
In target detected, the result that different size convolution network layers export all is connected last detection layers and handled, is obtained
Classification belonging to target and position into described image.
Traditional SSD model is poor to the identification of small size target, therefore the embodiment of the invention provides one kind to be based on SSD
The method that model carries out target detection, can effectively detect Small object, since the image of commodity generally belongs to small mesh
Logo image, therefore, method provided by the invention can be applied to automatic retail units or unmanned supermarket, to the quotient of user's purchase
Product carry out target detection.
As shown in Fig. 2, the specific implementation step of this method is as follows:
Step 201: obtaining images of items.
The present embodiment is applied to automatic retail units, and the automatic retail for capableing of manual picking commodities mainly for user is set
Standby, it is following any for obtaining the mode of images of items:
1) after user has selected all commodity manually, all commodity are put into detection zone, to all commodity of detection zone
It takes pictures, obtains the image comprising all commodity;
2) it after determining the manual picking commodities of user, takes pictures to the commodity in user hand, obtaining one includes the quotient
The image of product.
In any of the above-described kind of mode, it is determined whether take pictures to commodity, can be and determined whether pair according to user's instruction
Commodity are taken pictures, and are also possible to carry out once photo taking to commodity at interval of setting time, be can wrap in the images of items of acquisition
Containing a commodity image, more than one piece commodity image also may include.
Step 202: target detection being carried out to the images of items by the SSD model constructed in advance, obtains the article
Classification belonging to each target and position in image, wherein in building SSD model process, according to images of items in training sample
The picture size of middle target determines in the SSD model of the building for detecting the ruler of the block diagram of objective attribute target attribute in images of items
It is very little.
The SSD model includes at least one characteristic image layer, and each characteristic image layer is used to pass through this feature image layer
The objective attribute target attribute of corresponding block diagram detection images of items, wherein belonging to the size of the different corresponding block diagrams of characteristic image layer
Size range is different.
In the SSD model constructed in advance, the size and the convolutional network of the characteristic image layer of any convolutional network layer output
The size of layer is consistent, according to the size for each convolutional network layer for including in the SSD model constructed in advance from single order convolution
Network layer, Second Order Convolution network layer are until seven rank convolutional network layers are gradually reduced, then each characteristic pattern of each convolutional network layer output
As the size of layer is gradually reduced, also, size range belonging to the size of the corresponding block diagram of each characteristic image layer be divided into it is multiple etc.
Grade, from single order convolutional network layer up to the corresponding block diagram size of characteristic image layer of the corresponding output of seven rank convolutional network layers is by each etc.
The sequence of grade is sequentially reduced, it is seen then that the size of the corresponding block diagram of larger-size characteristic image layer is less than the lesser feature of size
The size of the corresponding block diagram of image layer.
Specifically, defining institute in the SSD model constructed in advance according to the size of characteristic image layer each in SSD model
There is the size range of block diagram, when the network structure determination in SSD model, i.e., when the size of each characteristic image layer determines, each
The size range of corresponding all block diagrams determines that on characteristic image layer.As shown in figure 1, the size of convolutional network layer 104 be 1 ×
1 × 1024, the size of convolutional network layer 106 is 1 × 1 × 512, wherein the size of convolutional network layer and the convolutional network layer are defeated
The size of characteristic image layer out is all block diagrams and convolution on characteristic image layer the same, that convolutional network layer 104 exports
All block diagrams on characteristic image layer that network layer 106 exports are compared, and the size range of block diagram is smaller and quantity is more, according to
SSD model itself the characteristics of it is found that this can be completely covered after arranging in all block diagram sequences in any feature image layer
Characteristic image.
The spy can be completely covered in all block diagrams in the size determination of characteristic image layer and guarantee this feature image layer
Under the premise of levying image, the Aspect Ratio of the block diagram of corresponding same size on same characteristic image layer can also be adjusted
It is whole, for example, the size of characteristic image layer is 512 × 512, in this feature image layer the block diagram of corresponding same size be 10 ×
10, then the characteristic image layer can be just completely covered by least needing 52 10 × 10 block diagrams, if in this feature image layer
The block diagram of corresponding same size is 5 × 10, then the feature can be just completely covered by least needing 103 5 × 10 block diagrams
Image layer, it is seen that after being adjusted to the ratio of same size block diagram corresponding on same characteristic layer, in this feature image layer
The quantity of block diagram increased.Therefore it can pass through the ratio of the length and width of the block diagram of same size on the same characteristic image layer of modification
Example, adds somewhat to the block diagram quantity on characteristic image layer.
The present embodiment is during constructing SSD model, to all for detecting the block diagram of objective attribute target attribute in images of items
Size screened, the purpose of screening is to enable the size of the block diagram filtered out and target various sizes of in target image
It is matched, can not only filter out the target of larger size, the target of smaller size can also be filtered out, specifically screened
Journey is as follows:
The size for initializing the different corresponding block diagrams of characteristic image layer makes the different corresponding block diagrams of characteristic image layer
Size range belonging to size is different;
Wherein, the size range is divided into multiple grades according to the size grades of each characteristic image layer, by single order convolution net
The characteristic image layer of network layers output is used as the first estate, the characteristic image layer that Second Order Convolution network layer exports as the second grade,
The characteristic image layer of three rank convolutional network layers output is as the tertiary gradient, until the characteristic image that last convolutional network layer exports
Layer is used as last grade, then size range belonging to the size of the corresponding block diagram of characteristic image layer at different levels is from the first estate to highest
Grade is increasing.
It is screened in the corresponding block diagram of each characteristic image layer using training sample, the target with images of items in training sample
The block diagram that picture size matches, the training sample include the target image size of images of items and images of items.
The target image for obtaining images of items in the training sample can be obtained by individual neural network model CNN
It takes, the optional following any model of the neural network model:
R-CNN model;Fast R-CNN model;SSD model.
Specifically, the target image size of images of items obtains in the following way in the training sample:
According to the identification information of each target image of images of items in training sample, the size of each target image is determined
Range;According to the size range of each target image, the target image size of images of items is determined.
Above-mentioned identification information includes the dimension information of each target image in above-mentioned images of items, can be believed according to the size
Breath, obtains the size range of each target, according to the size range and actual demand of each target, selects suitably sized work
For the target image size of images of items.
Specifically, being screened in the corresponding block diagram of each characteristic image layer using training sample, with article figure in training sample
The block diagram that the target image size of picture matches, comprising:
Using the corresponding block diagram of each characteristic image layer, the images of items in training sample is traversed;
It determines in the corresponding block diagram of each characteristic image layer, the target image size phase with images of items in training sample
The deviation between block diagram matched;
Filter out block diagram of each characteristic image layer large deviations within the scope of predetermined deviation.
In the present embodiment, the block diagram of pre-set all sizes can be trained, by each characteristic image
The block diagram of all sizes on layer is matched with the target image in the images of items, and Automatic sieve selects matching result one
Determine size of the size of the block diagram of deviation range as the block diagram determined in the SSD model constructed in advance.
As an alternative embodiment, can also be to the size of all block diagrams in the SSD model constructed in advance
And/or the ratio of size carries out manual modification, the size or dimension scale of common block diagram is preset, from common block diagram
The size or dimension scale for meeting target image block diagram in current input image are chosen in size or dimension scale.
In order to keep the abstracting power of convolutional network layer stronger, the SSD model packet constructed in advance described in the embodiment of the present invention
Include front network backbone, the front network backbone includes single order convolutional network layer and is located at the single order convolution net
At least one CFE after network layers, the CFE are used for using the convolution kernel having a size of K × 1 and 1 × K respectively simultaneously to input
Data carry out convolution algorithm, and the K is positive integer.
As shown in figure 3, the CFE includes two similar branches, the output for the upper one layer of previous connecting with CFE is logical
Road number is 1024, and left branch learns more non-linear relations and expansion using the convolution kernel of the convolution kernel size for connection 1 × 1 of size k × k
Big acceptance region, the k are positive integer, i.e., the convolution kernel of size k × k is resolved into convolution kernel and size k × 1 of 1 × k of size
Convolution kernel, it is ensured that expand acceptance region while keep infer the time, right branch using size k × 1 convolution kernel and size 1 ×
The convolution kernel of k, the first convolution network layer 301, the second convolution network layer 302, third convolutional network layer 303, Volume Four product in Fig. 3
Network layer 304 is increased convolutional network layer, and the first convolution network layer 301, the second convolution network layer 302, third convolution net
Network layers 303, the input channel of Volume Four product network layer 304 are 512, and output channel is 512, using k × 1 or the volume of 1 × k
Product core carries out convolution algorithm, can extract more characteristic informations in the images of items, i.e. characteristic information is more various, improves
The ability to express of network in the pre-set SSD model.
The SSD model constructed in advance includes back-end network extras, and the back-end network extras includes single order volume
Product network layer and at least one CFE after the single order convolutional network layer.
As shown in figure 4, the back-end network 401 includes single order convolutional network layer 402, Second Order Convolution network layer 403, CFE
Module 404 is located between single order convolutional network layer 402 and Second Order Convolution network layer 403, wherein in single order convolutional network layer 402
A CFE module is at least connected between Second Order Convolution network layer 403.
The back-end network extras further includes at least one Second Order Convolution network layer, at least one described CFE is located at institute
It states between Second Order Convolution network layer and at least one described Second Order Convolution network layer, alternatively, at least one described CFE is located at single order
After convolutional network layer, and at least one described CFE and at least one described Second Order Convolution network layer cross-distribution.
As shown in figure 5, the back-end network 501 includes single order convolutional network layer 502, Second Order Convolution network layer 503, three ranks
Convolutional network layer 504, CFE module 505 are located between single order convolutional network layer 502 and Second Order Convolution network layer 503, CFE module
506 between Second Order Convolution network layer 503 and three rank convolutional network layers 504.
Embodiment two
Based on identical inventive concept, the embodiment of the present invention two additionally provides a kind of based on SSD model progress target detection
Equipment, be the equipment in the method in the embodiment of the present invention due to the equipment, and the principle that solves the problems, such as of the equipment with
This method is similar, therefore the implementation of the equipment may refer to the implementation of method, and overlaps will not be repeated.
As shown in fig. 6, the equipment includes: processor 600 and memory 601, wherein the memory is stored with program
Code, when said program code is executed by the processor, so that the processor is for executing following steps:
Obtain images of items;
Target detection is carried out to the images of items by the SSD model constructed in advance, is obtained every in the images of items
Classification belonging to a target and position, wherein in building SSD model process, according to target in images of items in training sample
Picture size determines in the SSD model of the building for detecting the size of the block diagram of objective attribute target attribute in images of items.
As an alternative embodiment, the SSD model includes at least one characteristic image layer, each characteristic image
Layer is for detecting the objective attribute target attribute of images of items by the corresponding block diagram of this feature image layer, wherein different characteristic image layers
Size range belonging to the size of corresponding block diagram is different.
As an alternative embodiment, the processor is used for:
The size for initializing the different corresponding block diagrams of characteristic image layer makes the different corresponding block diagrams of characteristic image layer
Size range belonging to size is different;
It is screened in the corresponding block diagram of each characteristic image layer using training sample, the target with images of items in training sample
The block diagram that picture size matches, the training sample include the target image size of images of items and images of items.
As an alternative embodiment, the target image size of images of items passes through such as lower section in the training sample
Formula obtains:
According to the identification information of each target image of images of items in training sample, the size of each target image is determined
Range;
According to the size range of each target image, the target image size of images of items is determined.
As an alternative embodiment, the SSD model constructed in advance includes back-end network extras, after described
End network extras includes single order convolutional network layer and at least one CFE after the single order convolutional network layer, described
CFE is used to carry out convolution algorithm to the data of input simultaneously respectively using the convolution kernel having a size of K × 1 and 1 × K, and the K is positive
Integer.
As an alternative embodiment, the back-end network extras further includes at least one Second Order Convolution network
Layer, at least one described CFE between the Second Order Convolution network layer and at least one described Second Order Convolution network layer, or
Person, at least one described CFE are located at after single order convolutional network layer, and at least one described CFE and at least one described second order
Convolutional network layer cross-distribution.
As an alternative embodiment, the processor is used for:
Using the corresponding block diagram of each characteristic image layer, the images of items in training sample is traversed;
It determines in the corresponding block diagram of each characteristic image layer, the target image size phase with images of items in training sample
The deviation between block diagram matched;
Filter out block diagram of each characteristic image layer large deviations within the scope of predetermined deviation.
As an alternative embodiment, the processor is used for:
It is modified by the ratio to the corresponding block diagram length and width of the characteristic image layer, it is right to increase the characteristic image layer
The quantity for the block diagram answered.
Embodiment three
Based on identical inventive concept, the embodiment of the present invention three additionally provides a kind of based on SSD model progress target detection
Equipment, be the equipment in the method in the embodiment of the present invention due to the equipment, and the principle that solves the problems, such as of the equipment with
This method is similar, therefore the implementation of the equipment may refer to the implementation of method, and overlaps will not be repeated.
As shown in fig. 7, the equipment includes obtaining image module 700, module of target detection 701, in which:
Image module 700 is obtained, for obtaining images of items;
Module of target detection 701 carries out target detection to the images of items for the SSD model by constructing in advance,
Obtain classification belonging to each target and position in the images of items, wherein in building SSD model process, according to training sample
In this in images of items target picture size, determine in the SSD model of the building for detecting target category in images of items
The size of the block diagram of property.
As an alternative embodiment, the SSD model includes at least one characteristic image layer, each characteristic image
Layer is for detecting the objective attribute target attribute of images of items by the corresponding block diagram of this feature image layer, wherein different characteristic image layers
Size range belonging to the size of corresponding block diagram is different.
As an alternative embodiment, the module of target detection 701 is specifically used for:
The size for initializing the different corresponding block diagrams of characteristic image layer makes the different corresponding block diagrams of characteristic image layer
Size range belonging to size is different;
It is screened in the corresponding block diagram of each characteristic image layer using training sample, the target with images of items in training sample
The block diagram that picture size matches, the training sample include the target image size of images of items and images of items.
As an alternative embodiment, the target image size of images of items passes through such as lower section in the training sample
Formula obtains:
According to the identification information of each target image of images of items in training sample, the size of each target image is determined
Range;
According to the size range of each target image, the target image size of images of items is determined.
As an alternative embodiment, the SSD model constructed in advance includes back-end network extras, after described
End network extras includes single order convolutional network layer and at least one CFE after the single order convolutional network layer, described
CFE is used to carry out convolution algorithm to the data of input simultaneously respectively using the convolution kernel having a size of K × 1 and 1 × K, and the K is positive
Integer.
As an alternative embodiment, the back-end network extras further includes at least one Second Order Convolution network
Layer, at least one described CFE between the Second Order Convolution network layer and at least one described Second Order Convolution network layer, or
Person, at least one described CFE are located at after single order convolutional network layer, and at least one described CFE and at least one described second order
Convolutional network layer cross-distribution.
As an alternative embodiment, the module of target detection 701 is specifically used for:
Using the corresponding block diagram of each characteristic image layer, the images of items in training sample is traversed;
It determines in the corresponding block diagram of each characteristic image layer, the target image size phase with images of items in training sample
The deviation between block diagram matched;
Filter out block diagram of each characteristic image layer large deviations within the scope of predetermined deviation.
As an alternative embodiment, the module of target detection 701 is specifically used for:
It is modified by the ratio to the corresponding block diagram length and width of the characteristic image layer, it is right to increase the characteristic image layer
The quantity for the block diagram answered.
Example IV
Based on identical inventive concept, the embodiment of the present invention four additionally provides a kind of computer storage medium, stores thereon
There is computer program, for realizing following steps when which is executed by processor:
Obtain images of items;
Target detection is carried out to the images of items by the SSD model constructed in advance, is obtained every in the images of items
Classification belonging to a target and position, wherein in building SSD model process, according to target in images of items in training sample
Picture size determines in the SSD model of the building for detecting the size of the block diagram of objective attribute target attribute in images of items.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The shape for the computer program product implemented in usable storage medium (including but not limited to magnetic disk storage and optical memory etc.)
Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The equipment for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of equipment, the commander equipment realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of method for carrying out target detection based on the more box detector SSD models of single-shot, which is characterized in that this method comprises:
Obtain images of items;
Target detection is carried out to the images of items by the SSD model constructed in advance, obtains each mesh in the images of items
Mark belonging to classification and position, wherein building SSD model process in, according in training sample in images of items target image
Size determines in the SSD model of the building for detecting the size of the block diagram of objective attribute target attribute in images of items.
2. the method according to claim 1, wherein the SSD model includes at least one characteristic image layer, often
A characteristic image layer is used to detect the objective attribute target attribute of images of items by the corresponding block diagram of this feature image layer, wherein different
Size range belonging to the size of the corresponding block diagram of characteristic image layer is different.
3. the method according to claim 1, wherein building SSD model process is according to article figure in training sample
The picture size of target as in determines in the SSD model constructed in advance for detecting the frame of objective attribute target attribute in images of items
The size of figure, comprising:
The size for initializing the different corresponding block diagrams of characteristic image layer makes the size of the different corresponding block diagrams of characteristic image layer
Affiliated size range is different;
It is screened in the corresponding block diagram of each characteristic image layer using training sample, the target image with images of items in training sample
The block diagram that size matches, the training sample include the target image size of images of items and images of items.
4. according to the method described in claim 3, it is characterized in that, in the training sample images of items target image size
It obtains in the following way:
According to the identification information of each target image of images of items in training sample, the size model of each target image is determined
It encloses;
According to the size range of each target image, the target image size of images of items is determined.
5. the method according to claim 1, wherein the SSD model constructed in advance includes back-end network
Extras, the back-end network extras include single order convolutional network layer and after the single order convolutional network layer at least
One CFE, the CFE are used to carry out convolution fortune to the data of input simultaneously respectively using the convolution kernel having a size of K × 1 and 1 × K
It calculates, the K is positive integer.
6. according to the method described in claim 5, it is characterized in that, the back-end network extras further includes at least one second order
Convolutional network layer, at least one described CFE are located at the Second Order Convolution network layer and at least one described Second Order Convolution network layer
Between, alternatively, at least one described CFE is located at after single order convolutional network layer, and at least one described CFE and described at least one
A Second Order Convolution network layer cross-distribution.
7. according to the method described in claim 3, it is characterized in that, corresponding using each characteristic image layer of training sample screening
In block diagram, the block diagram that matches with the target image size of images of items in training sample, comprising:
Using the corresponding block diagram of each characteristic image layer, the images of items in training sample is traversed;
It determines in the corresponding block diagram of each characteristic image layer, matches with the target image size of images of items in training sample
Deviation between block diagram;
Filter out block diagram of each characteristic image layer large deviations within the scope of predetermined deviation.
8. according to the method described in claim 2, it is characterized in that, by the corresponding block diagram length and width of the characteristic image layer
Ratio is modified, and the quantity of the corresponding block diagram of the characteristic image layer is increased.
9. a kind of equipment for carrying out target detection based on SSD model, which is characterized in that the equipment includes: processor and storage
Device, wherein the memory is stored with program code, when said program code is executed by the processor, so that the place
Manage the step of device requires 1~8 any the method for perform claim.
10. a kind of computer storage medium, is stored thereon with computer program, which is characterized in that the program is executed by processor
The step of Shi Shixian such as claim 1~9 any the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910114491.5A CN109949359A (en) | 2019-02-14 | 2019-02-14 | A kind of method and apparatus carrying out target detection based on SSD model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910114491.5A CN109949359A (en) | 2019-02-14 | 2019-02-14 | A kind of method and apparatus carrying out target detection based on SSD model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109949359A true CN109949359A (en) | 2019-06-28 |
Family
ID=67007597
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910114491.5A Pending CN109949359A (en) | 2019-02-14 | 2019-02-14 | A kind of method and apparatus carrying out target detection based on SSD model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109949359A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170090925A1 (en) * | 2015-09-25 | 2017-03-30 | Richard B. O'connor | Instruction and Logic for Interrupt and Exception Handling |
CN107665336A (en) * | 2017-09-20 | 2018-02-06 | 厦门理工学院 | Multi-target detection method based on Faster RCNN in intelligent refrigerator |
CN108235816A (en) * | 2018-01-10 | 2018-06-29 | 深圳前海达闼云端智能科技有限公司 | Image recognition method, system, electronic device and computer program product |
CN108345879A (en) * | 2018-04-20 | 2018-07-31 | 杭州深合智能科技有限公司 | Freight detection device and its detection method |
CN108520273A (en) * | 2018-03-26 | 2018-09-11 | 天津大学 | A kind of quick detection recognition method of dense small item based on target detection |
-
2019
- 2019-02-14 CN CN201910114491.5A patent/CN109949359A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170090925A1 (en) * | 2015-09-25 | 2017-03-30 | Richard B. O'connor | Instruction and Logic for Interrupt and Exception Handling |
CN107665336A (en) * | 2017-09-20 | 2018-02-06 | 厦门理工学院 | Multi-target detection method based on Faster RCNN in intelligent refrigerator |
CN108235816A (en) * | 2018-01-10 | 2018-06-29 | 深圳前海达闼云端智能科技有限公司 | Image recognition method, system, electronic device and computer program product |
CN108520273A (en) * | 2018-03-26 | 2018-09-11 | 天津大学 | A kind of quick detection recognition method of dense small item based on target detection |
CN108345879A (en) * | 2018-04-20 | 2018-07-31 | 杭州深合智能科技有限公司 | Freight detection device and its detection method |
Non-Patent Citations (1)
Title |
---|
QIJIE ZHAO等: ""CFENet: An Accurate and Efficient Single-Shot Object Detector for Autonomous Driving"", 《ARXIV》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109840502A (en) | A kind of method and apparatus carrying out target detection based on SSD model | |
CN108960119B (en) | Commodity recognition algorithm for multi-angle video fusion of unmanned sales counter | |
CN107527337B (en) | A kind of the video object removal altering detecting method based on deep learning | |
CN106952402A (en) | A kind of data processing method and device | |
CN108229379A (en) | Image-recognizing method, device, computer equipment and storage medium | |
CN109919211A (en) | Commodity recognition method, device, system and computer-readable medium | |
CN108665441A (en) | A kind of Near-duplicate image detection method and device, electronic equipment | |
CN107767590A (en) | Automatic identification commercialization bar code electronic scale and Automatic identification method | |
CN108875934A (en) | A kind of training method of neural network, device, system and storage medium | |
CN109086811A (en) | Multi-tag image classification method, device and electronic equipment | |
CN104933428B (en) | A kind of face identification method and device based on tensor description | |
CN109670546B (en) | Commodity matching and quantity regression recognition algorithm based on preset template | |
CN108256404A (en) | Pedestrian detection method and device | |
CN109754009A (en) | Item identification method, device, vending system and storage medium | |
CN109145766A (en) | Model training method, device, recognition methods, electronic equipment and storage medium | |
CN108875932A (en) | Image-recognizing method, device and system and storage medium | |
CN109977983A (en) | Obtain the method and device of training image | |
CN110232404A (en) | A kind of recognition methods of industrial products surface blemish and device based on machine learning | |
CN109271935A (en) | The matching method of article and electronic tag, apparatus and system | |
CN109117897A (en) | Image processing method, device and readable storage medium storing program for executing based on convolutional neural networks | |
CN108960719A (en) | Selection method and apparatus and computer readable storage medium | |
CN109871821A (en) | The pedestrian of adaptive network recognition methods, device, equipment and storage medium again | |
CN110019917A (en) | Commodity search method, device and electronic equipment | |
CN110197561A (en) | A kind of commodity recognition method, apparatus and system | |
CN107516246A (en) | Determination method, determining device, medium and the electronic equipment of user type |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190628 |
|
RJ01 | Rejection of invention patent application after publication |