A kind of object detection method and system
Technical field
The application relates to technical field of video monitoring, particularly relates to a kind of object detection method and system.
Background technology
Linkage phase unit, is generally made up of two or more cameras.By machinery and vision alignment, it is possible to accurately calculate the position between any two camera and towards relativeness.By being fixed on by camera on the The Cloud Terrace controlled by motor, it is possible to achieve selected a certain region in a certain camera view, rotate other cameras so that they are towards the function of this selection area.We claim this function for linkage.Due to the calibration in advance of the geometrical relationship between camera, so this linkage process can be automatically obtained.
In field of video monitoring, based on this technology, a kind of common application is rifle ball linkage surveillance camera.As its name suggests, this equipment is made up of two kinds of monitoring cameras: gunlock and ball machine.The feature of gunlock is: camera perspective is generally relatively wide, and therefore the object definition in picture is generally relatively low (pixel quantity shared by unit object is few), towards just fixing after installation.The feature of ball machine is: camera perspective is generally narrower, and therefore the object definition in picture is compared with high (pixel quantity shared by unit object is many), can pass through control motor, control camera towards.By the phase machine set technology that links, it is possible to learn from other's strong points to offset one's weaknesses, what solution gunlock was seen does not extensively but see the clear narrow problem but seen seen with ball machine.A kind of common use sight is: by a certain region of the selected gunlock picture of user, pass through linkage technique so that ball machine, towards selected areas, obtains the high definition picture of selected areas.
Based on linkage phase unit, in conjunction with the target detection technique based on machine learning, it is possible to achieve a kind of completely automatic target high-definition image captures video monitoring system.Aiming at of this technology: the specific objective (such as people, car etc.) in a certain camera view in detection linkage phase unit automatically, controls, according to testing result, the target that other camera shot detection arrive.Obviously, for rifle ball linkage surveillance camera, a kind of more valuable linkage phase crew qiting is: use a wide angle camera for target detection, uses one or more focal length (narrow angle) camera for target high definition snapshot.
This kind of system it is critical only that whether Automatic Targets can find accurately, position target.But, even if using the currently best target detection technique based on machine learning, it is also difficult to obtain a detector that under any circumstance can work very well.Therefore, in real world applications, owing to detector is general not, and then cause Detection accuracy, finally make this kind of automatic target capturing system be difficult to extensive use.
Prior art deficiency is in that:
The accuracy rate of linkage phase unit detection target is relatively low at present.
Summary of the invention
The embodiment of the present application proposes a kind of object detection method and system, to solve the technical problem that in prior art, the accuracy rate of linkage phase unit detection target is relatively low.
First aspect, the embodiment of the present application provides a kind of object detection method, comprises the steps:
Wide angle camera is utilized to obtain the video image of monitoring scene;
Utilize the first video frame images that described wide angle camera is obtained by the detection model that training in advance obtains to carry out target detection, obtain the first testing result;
According to described first testing result scheduling focal length camera, the target detected is shot;
Utilize the second video frame images that described focal length camera is obtained by the detection model that described training in advance obtains to carry out target detection, obtain the second testing result;
Described detection model is updated according to described second testing result.
Alternatively, farther include:
According to described second testing result, described first testing result is verified;
Display and/or the content of storage is determined according to the result.
Optionally, described according to the result determine display and/or storage content, particularly as follows:
If the first testing result is wrong described in empirical tests, filter the part of error detection in described first testing result, show and/or store described first video frame images, described second video frame images and described second testing result;And/or,
If the first testing result is errorless described in empirical tests, show and/or store described first video frame images and described second testing result.
Optionally, the detection model that described training in advance obtains is specially degree of depth convolutional neural networks DeepCNNs model, utilizes the detection model that described training in advance obtains to carry out target detection, particularly as follows:
Determine image to be detected;
Utilize the convolution kernel that training in advance obtains to carry out convolutional calculation with described image to be detected, obtain characteristic image;
Utilizing sliding window that the feature of each window area is classified on described characteristic image, export the target information of described image to be detected, described target information includes target position and objective attribute target attribute probability.
Optionally, described target is specifically people or vehicle.
Second aspect, the embodiment of the present application provides a kind of object detection system, including: linkage phase unit, first detection module, scheduler module, the second detection module and object detector, described linkage phase unit includes wide angle camera and focal length camera, the detection model that described object detector includes on-line study module and training in advance obtains
Described wide angle camera, for obtaining the video image of monitoring scene;
Described first detection module, for utilizing the video frame images that described wide angle camera is obtained by the detection model that described training in advance obtains to carry out target detection, obtains the first testing result;
Described scheduler module, shoots the target detected for dispatching described focal length camera according to described first testing result;
Described second detection module, for utilizing the video frame images that described focal length camera is obtained by the detection model that described training in advance obtains to carry out target detection, obtains the second testing result;
Described on-line study module, for updating described detection model according to described second testing result.
Optionally, farther include:
Authentication module, for being verified described first testing result according to described second testing result;
Determine module, for determining display and/or the content of storage according to the result.
Optionally, determine that if module is wrong specifically for the first testing result described in empirical tests described, filter the part of error detection in described first testing result, it is determined that the content of display and/or storage is described first video frame images, described second video frame images and described second testing result;And/or, if the first testing result is errorless described in empirical tests, it is determined that the content of display and/or storage is described first video frame images and described second testing result.
Optionally, farther include:
Monitored picture display terminal, for showing according to the display content that the result is determined, and/or,
Supervising data storage system, for storing the storage content determined according to the result.
Optionally, the detection model that described training in advance obtains is specially degree of depth convolutional neural networks DeepCNNs model, described first detection module and/or described second detection module and specifically includes:
Determine unit, for determining image to be detected;
Convolution unit, for utilizing the convolution kernel that training in advance obtains to carry out convolutional calculation with described image to be detected, obtains characteristic image;
Taxon, for utilizing sliding window that the feature of each window area is classified on described characteristic image, exports the target information of described image to be detected, and described target information includes target position and objective attribute target attribute probability.
Have the beneficial effect that:
The object detection method provided due to the embodiment of the present application and system, the wide angle camera utilizing linkage phase unit gets the video image of monitoring scene, utilize the detection model that training in advance obtains that the picture of wide angle camera is carried out target detection, after the target detected is shot by scheduling focal length camera, utilize the detection model that training in advance obtains that the picture of focal length camera is carried out target detection again, detection model is updated according to testing result, by the detection again in focal length camera view, detection model is updated, and then promote the testing result of wide angle camera, improve the accuracy rate of detection.
Accompanying drawing explanation
The specific embodiment of the application is described below with reference to accompanying drawings, wherein:
Fig. 1 illustrates the schematic flow sheet that in the embodiment of the present application one, object detection method is implemented;
Fig. 2 illustrates target detection process schematic in the embodiment of the present application two;
Fig. 3 illustrates the structural representation one of object detection system in the embodiment of the present application three;
Fig. 4 illustrates the structural representation two of object detection system in the embodiment of the present application three;
Fig. 5 illustrates the structural representation three of object detection system in the embodiment of the present application three;
Fig. 6 illustrates object detection system implementation process schematic diagram in the embodiment of the present application four.
Detailed description of the invention
Technical scheme and advantage in order to make the application are clearly understood, below in conjunction with accompanying drawing, the exemplary embodiment of the application is described in more detail, obviously, described embodiment is only a part of embodiment of the application, rather than all embodiments is exhaustive.And when not conflicting, the embodiment in this explanation and the feature in embodiment can be combined with each other.
Inventor note that in invention process
The core reasons causing verification and measurement ratio low are in that, any detector based on machine learning method, are required for being obtained by training on the training data.So the performance of final detector, depend critically upon training data.Due to training data be difficult to cover all situations in final application scenarios (as: camera put towards, highly, definition of the size of target, the light conditions of picture, picture etc. in picture), it is desirable to training under any circumstance all optimum object detector is unusual suffering.
Additionally, the height of target detection accuracy rate and the target shared most rare very big relation of pixel in picture.For same object, when shared pixel is bigger in picture for it, use currently best detection technique can reach high accuracy rate.But when in picture, shared pixel is less for it, the accuracy rate of detection can be greatly lowered.Under monitoring scene, in most cases, target shared pixel in picture is only small.To detect artificial example, in a monitoring scene having actual application value (as hanging on the monitoring camera on square), even if using high definition camera (HD/1080P), a upright human body, long side direction is generally less than 100 pixels, and the long limit of face is less than 10 pixels.In this case, even for Face datection the most ripe in Current vision detection technique, accuracy rate is also extremely low.
For above-mentioned deficiency, the embodiment of the present application proposes a kind of object detection method and system, utilize the vision-based detection feature that accuracy rate is higher when object is clear, not only detecting on Radix Rumicis (low clear) picture of novelty, again detect on focal length (high definition) picture, thus realizing the real full-automatic linkage phase machine monitoring system used simultaneously.
For the ease of the enforcement of the application, below in conjunction with specific embodiment, the proposed object detection method of the application and system are illustrated.
Embodiment one,
Fig. 1 illustrates the schematic flow sheet that in the embodiment of the present application one, object detection method is implemented, as it can be seen, described object detection method may include steps of:
Step 101, utilize wide angle camera obtain monitoring scene video image;
Step 102, utilize the first video frame images that described wide angle camera is obtained by the detection model that training in advance obtains to carry out target detection, obtain the first testing result;
Step 103, according to described first testing result scheduling focal length camera the target detected is shot;
Step 104, utilize the second video frame images that described focal length camera is obtained by the detection model that described training in advance obtains to carry out target detection, obtain the second testing result;
Step 105, according to described second testing result update described detection model.
When being embodied as, described wide angle camera can be that camera lens (wide-angle lens) has very broad visual angle, can hold more scenery scope in limited distance.Weigh camera Radix Rumicis parameter be usually minimum focus, the focal length of general wide-angle lens is between 24mm~35mm, and the Radix Rumicis of the more little camera of minimum focus is more wide, be suitable for clap big scene landscape and up to building etc..Focal length camera is then the camera having telephoto lens, and the focal length of telephoto lens is typically between 80mm~300mm, it is possible to be clearly captured out scenery farther out.
The phase unit that links described in the embodiment of the present application can be made up of two or more cameras, such as: can be made up of a wide angle camera and a focal length camera, can also be made up of a wide angle camera and multiple focal length camera, by machinery and vision alignment after can accurately calculate the position between any two camera and towards relativeness.By camera being fixed on the The Cloud Terrace controlled by motor, it is possible to achieve selected a certain region in a certain camera view, rotate other cameras so that they are towards the function of this selection area, this function can be called linkage by the embodiment of the present application.
The embodiment of the present application utilize wide angle camera obtain the video image of monitoring scene, and utilize the first video frame images that described wide angle camera is obtained by the detection model that training in advance obtains to carry out target detection, dispatch the focal length camera target to detecting again to shoot, the second video frame images that described focal length camera is obtained by the detection model that described training in advance obtains is utilized to carry out target detection, described detection model is updated according to testing result, so that the Detection results of described model is more preferably, accuracy rate is higher, owing to the embodiment of the present application adds on the existing basis that wide angle camera picture carries out target detection, focal length camera view is carried out secondary target detection, realize the feedback to detection model, and then improve the accuracy rate of the target detection of follow-up wide angle camera.
Relatively greatly but precision is not as high to the picture scope obtained due to wide angle camera, and when carrying out target detection it is possible that some error detection situations, therefore, the embodiment of the present application can also be implemented in the following way.
In enforcement, described obtain the second testing result after, described method may further include:
According to described second testing result, described first testing result is verified;
Display and/or the content of storage is determined according to the result.
When being embodied as, owing to focal length camera has the characteristic that the image quality of acquisition is higher, therefore, the false detection rate that the picture of focal length camera carries out target detection is non-normally low, after the picture of focal length camera can be carried out secondary target detection by the embodiment of the present application, according to described second testing result, described first testing result being verified, determining the content of display or the content of storage according to the result, thus reaching the purpose confirming, verifying.
In enforcement, described according to the result determine display and/or storage content, be specifically as follows:
If the first testing result is wrong described in empirical tests, filter the part of error detection in described first testing result, show and/or store described first video frame images, described second video frame images and described second testing result;
And/or,
If the first testing result is errorless described in empirical tests, show and/or store described first video frame images and described second testing result.
When being embodied as, after assuming wide angle camera picture is carried out target detection, described first testing result includes tri-people of A, B, C, after tri-people of A, B, C are carried out high accuracy shooting by recycling focal length camera respectively, the second testing result that detection obtains is two people of A, B, and C is only humanoid vertical board or other analog, now, described first testing result is wrong to utilize the second testing result may determine that, described C is error detection part.Now, the embodiment of the present application can filter the part (i.e. the relevant information of C) of error detection in described first testing result, the picture of display or storage wide angle camera is (namely, first video frame images), the picture of focal length camera (namely, second video frame images) and the object detection results (that is, the second testing result) of focal length camera.
If each target in described first testing result is after described second testing result checking, it is detection correctly, accurately, such as: target location is correct and target is strictly people, so, it is believed that described first testing result is errorless, now can show or store the picture of described wide angle camera (namely, first video frame images) and focal length camera object detection results (namely, second testing result), can not show or store the picture (that is, the second video frame images) of described focal length camera.
In enforcement, the detection model that described training in advance obtains is specially degree of depth convolutional neural networks (DeepCNNs, DeepConvolutionalNeuralNetwork) model, utilizes the detection model that described training in advance obtains to carry out target detection, is specifically as follows:
Determine image to be detected;
Utilize the convolution kernel that training in advance obtains to carry out convolutional calculation with described image to be detected, obtain characteristic image;
Utilizing sliding window that the feature of each window area is classified on described characteristic image, export the target information of described image to be detected, described target information includes target position and objective attribute target attribute probability.
In prior art, CNN is a kind of deep neural network with convolutional coding structure, generally can there be input layer, convolutional layer (conv), pond layer (pooling), full articulamentum and output layer (grader), described convolutional layer and pond layer generally can have several, output layer and grader, generally can adopt softmax to return.
Described first video frame images can be defined as image to be detected by the embodiment of the present application, then utilize the convolution kernel that training in advance obtains to carry out convolutional calculation with described image to be detected, obtain characteristic image;Utilizing sliding window that the feature of each window area is classified on described characteristic image, export the target information of described image to be detected, described target information includes target position and objective attribute target attribute probability, i.e. the first testing result.
Described second video frame images can also be defined as image to be detected by the embodiment of the present application, then utilize the convolution kernel that training in advance obtains to carry out convolutional calculation with described image to be detected, obtain characteristic image;Utilizing sliding window that the feature of each window area is classified on described characteristic image, export the target information of described image to be detected, described target information includes target position and objective attribute target attribute probability, i.e. the second testing result.
Wherein, convolution kernel, sliding window all can obtain according to great amount of samples (various target samples, various sizes etc.) training in advance, and concrete training process can adopt existing techniques in realizing, and the application does not repeat at this.
The embodiment of the present application utilizes the degree of depth convolutional neural networks model of degree of depth learning art, realizes the detection of target by the automatically study of machine, and detection speed is fast, without manual operation, very convenient.
In enforcement, described target is specifically as follows people or vehicle.
When being embodied as, described target can be the object such as people, vehicle, the embodiment of the present application can gather the sample of the objects such as a large amount of people, vehicle in advance, then model training is carried out, obtain detection model, then have only to the video frame images by wide angle camera or focal length camera obtain and be input in described detection model, can quickly detect the objects such as the people in described video frame images, vehicle.
In the embodiment of the present application, the testing result again on focal length picture has at least following 2 effects:
(1) as confirming, the error detection in Radix Rumicis detection is filtered so that the detection of mistake is not displayed or is not preserved.
(2) as feedback, confirming that result returns to detector, use online learning art, update detection model so that the testing result of wide angle camera steps up.
Embodiment two,
Fig. 2 illustrates target detection process schematic in the embodiment of the present application two, as it can be seen, described target detection process may include steps of:
Step 201, from wide angle camera obtain present frame;
Step 202, described wide angle camera present frame is carried out target detection;
Step 203, retrieval result based on wide angle camera present frame, dispatch focal length camera so that it is towards detected target;
Step 204, treat focal length camera rotate complete, obtain focal length camera present frame;
Step 205, described focal length camera present frame is carried out target detection;
Step 206, the testing result of focal length camera present frame is fed back to object detector;
Object detector, based on feedback, using the corresponding region of focal length camera present frame as positive example/negative example, by on-line study technology, updates detection model;
Step 207, by the testing result of focal length camera present frame, and the wide angle camera current frame image of correspondence, focal length camera current frame image, pass to monitored picture display terminal and supervising data storage system;
Display and the picture of storage focal length camera is decided whether according to testing result.
The embodiment of the present application carries out secondary target detection on focal length camera, and using testing result as the confirmation of a target detection on wide angle camera, thus help the operations such as follow-up display and storage;And the feedback as object detector, by utilizing on-line study to update detection model, so that testing result is constantly improved, improve Detection accuracy.
Embodiment three,
Based on same inventive concept, additionally providing a kind of object detection system in the embodiment of the present application, owing to the principle of these equipment solution problem is similar to a kind of object detection method, therefore the enforcement of these equipment may refer to the enforcement of method, repeats part and repeats no more.
Fig. 3 illustrates the structural representation one of object detection system in the embodiment of the present application three, as shown in the figure, described object detection system may include that linkage phase unit 301, first detection module 302, scheduler module the 303, second detection module 304 and object detector 305, described linkage phase unit includes wide angle camera 3011 and focal length camera 3012, the detection model 3052 that described object detector includes on-line study module 3051 and training in advance obtains
Described wide angle camera, for obtaining the video image of monitoring scene;
Described first detection module, for utilizing the video frame images that described wide angle camera is obtained by the detection model that described training in advance obtains to carry out target detection, obtains the first testing result;
Described scheduler module, shoots the target detected for dispatching described focal length camera according to described first testing result;
Described second detection module, for utilizing the video frame images that described focal length camera is obtained by the detection model that described training in advance obtains to carry out target detection, obtains the second testing result;
Described on-line study module, for updating described detection model according to described second testing result.
Due to the object detection system that the embodiment of the present application provides, the wide angle camera of linkage phase unit obtains the video image of monitoring scene, described first detection module utilizes the detection model that training in advance obtains that the picture of wide angle camera is carried out target detection, after the target detected is shot by described scheduler module scheduling focal length camera, the picture of focal length camera is carried out target detection by detection model that described second detection module utilizes training in advance to obtain again, described on-line study module updates detection model according to testing result, by the detection again in focal length camera view, detection model is updated, and then promote the testing result of wide angle camera, improve the accuracy rate of detection.
Fig. 4 illustrates the structural representation two of object detection system in the embodiment of the present application three, as it can be seen, described object detection system may further include:
Authentication module 306, for described obtain the second testing result after, according to described second testing result, described first testing result is verified;
Determine module 307, for determining display and/or the content of storage according to the result.
In enforcement, described, to determine that if module specifically may be used for the first testing result described in empirical tests wrong, filter the part of error detection in described first testing result, it is determined that the content of display and/or storage is described first video frame images, described second video frame images and described second testing result;And/or, if the first testing result is errorless described in empirical tests, it is determined that the content of display and/or storage is described first video frame images and described second testing result.
Fig. 5 illustrates the structural representation three of object detection system in the embodiment of the present application three, as it can be seen, described object detection system may further include:
Picture display terminal 308, for showing according to the display content that the result is determined, and/or,
Data-storage system 309, for storing the storage content determined according to the result.
In enforcement, the detection model that described training in advance obtains is specially degree of depth convolutional neural networks DeepCNNs model, described first detection module and/or described second detection module and specifically may include that
Determine unit, for determining image to be detected;
Convolution unit, for utilizing the convolution kernel that training in advance obtains to carry out convolutional calculation with described image to be detected, obtains characteristic image;
Taxon, for utilizing sliding window that the feature of each window area is classified on described characteristic image, exports the target information of described image to be detected, and described target information includes target position and objective attribute target attribute probability.
For convenience of description, each several part of apparatus described above is divided into various module or unit to be respectively described with function.Certainly, the function of each module or unit can be realized in same or multiple softwares or hardware when implementing the application.
Embodiment four,
Fig. 6 illustrates object detection system implementation process schematic diagram in the embodiment of the present application four, as it can be seen, the implementation process of described object detection system can be:
1) first detection module obtains present frame from wide angle camera;
2) first detection module detects target on wide angle camera present frame;
3) scheduler module is based on the testing result of wide angle camera present frame, dispatches focal length camera so that it is towards the target detected;
4) treating that focal length camera rotates complete, the second detection module obtains focal length camera present frame;
5) described second detection module detects target on focal length camera present frame;
6.1) testing result of focal length camera present frame is fed back to object detector;
6.2) testing result of focal length camera present frame and the wide angle camera two field picture of correspondence, focal length camera two field picture are passed to monitored picture display terminal and supervising data storage system.
Those skilled in the art are it should be appreciated that embodiments herein can be provided as method, system or computer program.Therefore, the application can adopt the form of complete hardware embodiment, complete software implementation or the embodiment in conjunction with software and hardware aspect.And, the application can adopt the form at one or more upper computer programs implemented of computer-usable storage medium (including but not limited to disk memory, CD-ROM, optical memory etc.) wherein including computer usable program code.
The application describes with reference to flow chart and/or the block diagram according to the method for the embodiment of the present application, equipment (system) and computer program.It should be understood that can by the combination of the flow process in each flow process in computer program instructions flowchart and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can be provided to produce a machine to the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device so that the instruction performed by the processor of computer or other programmable data processing device is produced for realizing the device of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide in the computer-readable memory that computer or other programmable data processing device work in a specific way, the instruction making to be stored in this computer-readable memory produces to include the manufacture of command device, and this command device realizes the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices provides for realizing the step of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although having been described for the preferred embodiment of the application, but those skilled in the art are once know basic creative concept, then these embodiments can be made other change and amendment.So, claims are intended to be construed to include preferred embodiment and fall into all changes and the amendment of the application scope.