PATENT DOCUMENT

Publication Number: US-10846515-B2
Application Number: US-201816125625-A
Country: US
Kind Code: B2

Title: Efficient face detection and tracking

Abstract:
Techniques described herein provide efficient object detection and tracking in video images, such as may be used for real-time camera control in power-limited mobile image capture devices. The techniques include performing object detection on a first subset of frames of an input video, detecting an object and object location in a first detection frame of the first subset of frames, and tracking the detected object on a second subset of frames of the input video after the first detection frame, wherein the second subset does not include frames of the first subset.

Claims:
We claim: 
     
       1. An object tracking method, comprising:
 selecting a predetermined number of non-contiguous frames of input video as a first subset for object detection; 
 performing object detection on each of the first subset of frames; 
 when an object is detected in a first selected frame, determining the object location in the respective selected frame; and 
 performing object tracking on a second subset of frames including frames between the first selected frame and the next selected frame, wherein the object detection is not performed on the second subset of frames; and 
 ending the tracking on the second subset of frames when the object is not detected for a selected number of consecutive frames of the first subset of frames after the first detection frame. 
 
     
     
       2. The method of  claim 1 , wherein the input video is divided such that the first subset of frames correspond to every Nth frame, N being a predetermined number, and the second subset of frames correspond to the remaining frames. 
     
     
       3. The method of  claim 1 , further comprising:
 ending the tracking when a tracking score for the object falls below a tracking threshold for a selected number of consecutive frames. 
 
     
     
       4. The method of  claim 3 , further comprising assigning the tracking score based on characteristics of the object detected in the first detection frame. 
     
     
       5. The method of  claim 3 , further comprising:
 determining a tracking threshold per detected object on the first subset of frames based on attributes of the respective detected object and a background of the respective object. 
 
     
     
       6. The method of  claim 1 , further comprising:
 associating IDs with detected objects of the first subset of frames; and 
 correlating objects detected in different frames of the first subset based on the IDs. 
 
     
     
       7. The method of  claim 1 , further comprising:
 determining a bounding box for the object on frames of the first subset; and 
 determining a change in the bounding box on frames of the second subset. 
 
     
     
       8. The method of  claim 1 , further comprising:
 when the object is not detected on a second detection frame of the first subset after the first detection frame, tracking the object on the second detection frame. 
 
     
     
       9. An object tracking system, comprising:
 a detector for performing object detection on a predetermined first subset of non-contiguous frames of an input video; and 
 a tracker for tracking the location of objects previous detected by the detector on a predetermined second subset of frames of the input video based on tracking thresholds adapted to each detected object; 
 wherein the second subset and first subset are mutually exclusive, the detector does not perform object detection on the second subset of frames, and the tracker stops tracking a first object when the first object is not detected for a selected number of consecutive frames of the first subset of frames. 
 
     
     
       10. The system of  claim 9 , wherein the input video is divided such that frames of the first subset includes every Nth frame of the input video, N being a predetermined number, and the remaining frames are included in the second subset. 
     
     
       11. The system of  claim 9 , wherein:
 the tracker stops tracking the object when the object is not detected for a predetermined number of consecutive frames of the first subset. 
 
     
     
       12. The system of  claim 11 , wherein:
 the detector determines a tracking threshold per detected object on the first subset frames based on attributes of the respective detected object and a background of the respective detected object. 
 
     
     
       13. The system of  claim 9 , wherein the tracker ends tracking the object when a tracking score for the object falls below a tracking threshold for the object. 
     
     
       14. The system of  claim 9 , further comprising:
 a data associater for associating IDs with detected objects of first subset frames and for correlating objects detected in different first subset frames based on the IDs. 
 
     
     
       15. The system of  claim 9 , wherein:
 the detector determines a bounding box for the object on first subset frames; and 
 the tracker determines a change in the bounding box on second subset frames. 
 
     
     
       16. The system of  claim 9 , further comprising:
 the tracker tracks a previously detected object on a detection frame when the object is not detected in the detection frame. 
 
     
     
       17. A non-transitory computer readable medium comprising instruction that when, executed by a processor, cause:
 performing object detection on a predetermined first subset of frames that are non-contiguous in an input video to detect an object and object location in a first detection frame of the first subset of frames, and not performing the object detection on other frames in the input video; and 
 tracking the detected object to update the object location on a predetermined second subset of frames of the input video after the first detection frame, wherein the first subset of frames and the second subset frames are non-overlapping; and 
 ending the tracking on the second subset of frames when the object is not detected for a selected number of consecutive frames of the first subset of frames after the first detection frame. 
 
     
     
       18. The non-transitory computer readable medium of  claim 17 , wherein the input video is divided such that the first subset of frames correspond to every Nth frame, N being a selected number, and the second subset of frames correspond to the remaining frames. 
     
     
       19. The non-transitory computer readable medium of  claim 17 , wherein the instructions further cause:
 ending the tracking when the object is not detected for a predetermined number of consecutive first subset frames after the first detection frame; and 
 ending the tracking when a tracking score for the object falls below a tracking threshold for a selected number of consecutive frames. 
 
     
     
       20. The non-transitory computer readable medium of  claim 19 , wherein the instructions further cause:
 determining a tracking threshold per detected object on the first subset frames based on attributes of the respective detected object. 
 
     
     
       21. The non-transitory computer readable medium of  claim 17 , wherein the instructions further cause:
 associating IDs with detected objects of first subset frames; and 
 correlating objects detected in different first subset frames based on the IDs. 
 
     
     
       22. The non-transitory computer readable medium of  claim 17 , wherein the instructions further cause:
 determining a bounding box for the object on first subset frames; and 
 determining a change in the bounding box on second subset frames. 
 
     
     
       23. The non-transitory computer readable medium of  claim 17 , wherein the instructions further cause:
 when the object is not detected on a second detection frame of the first subset after the first detection frame, tracking the object on the second detection frame.

Description:
BACKGROUND 
     The present disclosure relates to techniques for video image analysis. 
     Cameras have become virtually ubiquitous on mobile electronics devices such as cell phones. Images and video captured by a camera can be generally improved by understanding the contents of a scene being captured by the camera. For example, detection of an object such as a face may allow for control of a camera parameters, such as focus distance and white balance, based on location, movement, and lighting conditions of the detected object. However, reliable object detection techniques are often a compute intensive, power-hungry, and offline processes. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  depicts a system according to an aspect of the present disclosure. 
         FIG. 2  depicts an image analysis system according to an aspect of the present disclosure. 
         FIG. 3  depicts an image analysis system according to an aspect of the present disclosure. 
         FIG. 4  depicts a method according to an aspect of the present disclosure. 
         FIG. 5  depicts an aspect of the present disclosure as applied to an example video sequence of images with moving face objects. 
         FIG. 6  depicts an example dataset for tracking termination. 
         FIG. 7  depicts an example dataset for tracking termination. 
     
    
    
     DETAILED DESCRIPTION 
     Techniques described herein provide efficient and accurate object detection in video images, such as may be used for real-time camera control in power-limited mobile image capture devices. The techniques include performing object detection on a first subset of frames of an input video, detecting an object and object location in a first detection frame of the first subset of frames, and tracking the detected object on a second subset of frames of the input video after the first detection frame, wherein the second subset and the first subset are non-overlapping. In an aspect, the input video may be divided such that a first subset frame occurs every Nth frame, N being a predetermined number, and the remaining frames are second subset frames. In another aspect, track may be ended when either the object is not detected for a predetermined number of consecutive first subset frames after the first detection frame or a tracking score for the object falls below a tracking threshold. Object detection may include determining a location and other attributes of detected objects, while tracking may include determining changes in the location or the other attributes of previously detected objects. 
       FIG. 1  depicts a system  100  in which aspects of the present disclosure find application. The system  100  may include a camera  102 , an image analysis unit  108 , and a camera controller  110 . The camera  102  may capture video images  106  of a scene which may contain objects  104 . 1  and  104 . 2  such as faces. The camera  102  may provide the captured images as video  106  data stream to the image analysis unit  108 , which may analyze images in the video  106 , and detect predetermined object(s) from within its content. The camera controller  110  may respond to data output from of the image analysis unit  108  to control the camera  102 . In an aspect of the present disclosure, the image analysis unit  108  may detect objects  104 . 1 ,  104 . 2  from within captured video  106 , and identify location(s) of the detected objects. In an aspect, the image analysis unit  108  may assign attributes to object data. For example, in an aspect where the detected objects are human facts, the attribute data may identify motion characteristics of the facts, lighting of the faces, pose or angle of the faces relative to the camera, eye location, and an indication the face&#39;s state (e.g., whether eyes on the face are closed or blinking, whether the face is smiling, etc.). The camera controller  110  may use image analysis results, such as object attributes, to control camera capture parameters, such focus distance or capture times for other images. 
       FIG. 2  depicts an image analysis system  200  according to an aspect of the present disclosure. The image analysis system  200  may find application as the image analysis unit  108  of  FIG. 1 . The image analysis system  200  may include an object detection unit  220 , and an object tracking unit  240 . In an aspect, the object detection unit  220  may process a subset of frames (called, “detection frames,” for convenience) of input video  206  and identify predetermined types of objects (e.g., human faces, human bodies, etc.) from within their content. The object tracking unit  240  may respond to data from the object detection unit  240  indicating detection of the object(s) and may track the detected objects in other frames of the input video  206 . The object tracking unit  240  may output data identifying location(s) of the tracked objects within the input video. 
     Processes performed by the image analysis system  200  may to conserve processing resources and reduce latency as compared to known techniques for image processing. Object detection  220  may require more processing resources including electric power as well as longer latency as compared to object tracking  240 . Hence, by operating the object detection unit  220  only intermittently on a subset of frames from the input video  206 , the processing resources and latency required are reduced as compared to an alternative design that detects objects from all frames of an input video. Operations performed by the object tracking unit  240  are expected to have lower complexity and lower latency as compared to object detection unit  220  and, thus, the image analysis system  200  may provide location data for all frames of an input video sequence  206  without incurring processing costs that would be required to detect objects in all such frames. For example, object tracking unit  240  may require only 10% of the resources and 10% of the latency to process a frame as compared to object detection unit  220 . By operating such an example detection unit only intermittently, power consumption and latency may be reduced by 65%, for example. 
     Improved temporal stability of detected objects may be an additional benefit from the combined used of detection and tracking techniques. By combining tracking and detection techniques, a determination for the existence of an object in any particular frame may be more reliable than, for example, running only object detection unit  220  on every frame to determine which objects exist in each frame may be less reliable than a combination of detection and tracking. If the determination of which objects exist were presented visually, temporal object instability may cause flickering where objects are determined to exist, not exist, and exist again in rapid succession, for example due to the limitations of performing object detection only without object tracking. 
     In an aspect, a predetermined subset of 1/N frames are used by object detection unit, where N is a predetermined integer constant. For example, object detection unit  220  may process a fixed cadence of input video frames, such as one out of every three sequential frames (when N=3). Object detection unit  220  may identify objects and their locations, and may distinguish between objects, for example by assigning unique identifier to each object detected within image content. The identifier can be used to determine if an object detected in one detection frame is the same object as an object detected in a different detection frame. Hence, an object ID may be used to determine if a face detected in one frame is the same as a face detected in another frame. Object tracking unit  240  may track the objects previously detected by the object detection unit  220 . As depicted in  FIG. 2 , object tracking may operate on any frames of input video  206 . Object tracking unit  240  may receive an indication of the objects identified in a detection frame from object detection unit  220 , and then track changes to those objects in subsequent frames. 
     In other aspects of this disclosure, the system  200  may also find application in other contexts, such as to facilitate automated image or video editing applications. The principles of the present disclosure find application in motion picture data of natural image sources (e.g., image data captured by a camera or other image sensor). They also find application with synthetically-generated video, for example, graphics data generated by computer applications, computer animation systems, or video editors. 
     In an aspect, the object detection  220  and object tracking  240  may identify a location for each object in a frame. In an alternate aspect, detection and tracking may identify only the existence and identity (and ID or signature) of objects in a frame. 
     In an aspect, the image analysis system  200  may include a data association unit  260  that assigned identifiers to detected objects over periods longer than the period between detection frames. Data association unit  260  may respond to location data output by the object tracking unit  240  and/or the object detection unit  220  and assign identifiers based on correlations between the locations. Alternatively, the data association unit  260  may assign identifiers to location data output from the object tracking unit based on location data and tracking scores assigned to the location data (described herein). 
     In another aspect, data association unit  260  may also determine additional attributes of objects not provided by detection unity  220  or tracking unity  240 , for example by analysis of object images. For example, data association unit  260  may identify attributes such as lighting, face pose, etc., of the objects located by object detection unit  220  on detection frames. Optional data association unit  260  may associate attributes of objects determined on a detection frame with the tracked objects on non-detection frames. Data association unit  260  may thus provide object attributes  215  on both detection frames and non-detection frames. 
     In an aspect, object tracking unit  240  may track changes to detected objects only on non-detection frames. In another aspect, object tracking unit  240  may also track objects on detection frames. 
       FIG. 3  depicts a method  300  according to an aspect of the present disclosure. The method  300  may identify object(s) from within captured video data and output data identifying their spatial location(s) in the data. The method  300  may start by detecting objects on a first frame, designated as a detection frame (box  310 ). Detected objects may be tracked (box  315 ) for one or more frames that follows the detection frame using identifications of the objects in the detection frame as location references. When the objects&#39; locations are identified in the tracking frames, the method  300  may output location data (box  320 ) representing the objects&#39; location(s) within each tracking frame. As discussed, the detection frames may be some predetermined subset of the overall number of frames in the input video sequence. Thus, if the detection frames are selected to be 1/N th  of the input video sequence, the boxes  315  and  320  may be performed N−1 times each time a detection frame is processed in box  310 . For example, detection may be performed on one out of every five frames, while tracking is performed on the remaining four out of five frames. 
     In an aspect, the method  300  may compare data of objects detected in a present iteration of boxes  310 - 320  and object(s) detected in a prior iteration of the boxes  310 - 320  and determine if there is correlation between the objects detected and tracked in the two iterations (box  325 ). If correlation is detected between objects in the two iterations, then the method  300  may assign a common ID to the object in the new iteration (box  330 ). If no correlation is detected for a detected/tracked object in the present iteration, that object may be assigned a new ID (box  335 ). 
     In another aspect, an object may be terminated based on detection results on detection frames. Results of object detection (box  310 ) from consecutive iterations may be compared to each other to determine when objects from a prior iteration no longer are detected (box  340 ). If so, the method  300  may increment a count variable for the object (shown as a “missing count” value in  FIG. 3 ), and the method  300  may determine whether the missing count value for that object exceeds a predetermined detection threshold (box  345 ). If the missing count value exceeds the predetermined detection threshold, then the method  300  may indicate that tracking for the object is terminated (box  350 ). This predetermined threshold for an object missing for consecutive detection frames is called “M” herein. Termination of tracking for a given object may include generating output data indicating that an ID that formerly was assigned to the object instance is de-allocated. 
     In another aspect, an object may be terminated based on tracking results on tracking frames. A tracking score may be determined for each object tracked (box  355 ). If the tracking score does not exceed a tracking threshold (box  360 ), that object may be terminated (box  350 ). In some aspects, the tracking threshold may be predetermined for all objects. In other aspects, tracking score threshold may vary per object. In some aspects (not depicted), tracking may not be terminated for an object until the tracking score for the object does not exceed the tracking threshold for the object for a predetermined number of consecutive frames. For objects detected in box  310 , a tracking threshold may be determined (box  370 ), for example, based on attributes of the object, attributes of the background of the object, and/or lighting of the scene captured in the image containing the object. 
     In some situations, a global threshold for multiple objects won&#39;t work for terminating tracking due to variations in object attributes and variations in scene characteristics. Additionally, the tracking threshold may vary over time as object attributes and scene characteristics vary over time, and a new tracking threshold may be determined again on every detection frame even for objects that persist between detection frames. 
       FIG. 4  depicts an image analysis system  400  according to an aspect of the present disclosure. In an aspect, system  400  may provide example additional details of the image analysis system  200  of  FIG. 2 . System  400  includes input video  402 , object detection unit  420 , object tracking unit  440 , data association unit  460 , and object attributes  415 . Object detection unit  420  includes a detection neural network  422 , detection weights  424  for controlling and training the detection neural network  422 , a frame memory  426 , and image cropping unit  428 . Object tracking unit  440  includes a tracking neural network  442  and tracking weights  444  for controlling and training of the tracking neural network  442 . Data association unit  460  includes object analysis unit  462  and a control unit  464 . 
     A detection neural network  422  may be run on a subset of frames of input video  402 . These detection frames may be stored in a frame memory buffer  426 , and detection unit  422  may detect the location of objects, such as faces, in the detection frames. A location of a detected object may be indicated, for example, by a bounding box within the frame of video, or by an indication of the shape of an object and the location of the shape within the frame of video. Cropping unit  428  may crop the detection frame stored the frame memory  426  based on the locations of objects determined by detection neural network  422 . Cropped object images may be provided to object tracking unit  440  and tracking neural network  442  and object analysis unit  462 . Tracking neural network  442  may track changes in a detected object&#39;s location based on a current frame and the object image from a previous detection frame to determine a new location and a tracking score. 
     Object analysis unit  462  may determine attributes of an object other than location on detection frame, for example by analyzing object images provided by cropping unit  428 . Object attributes determined by the object analysis unit  462  may include, for example: lighting of the faces, pose or angle of the faces relative to the camera, eye location, and in indication of if eyes on the face are closed or blinking. The control unit  464  may integrate data across frames. The control unit  464  may determine if object detected by object detection unit  420  in a first detection frame are the same objects that are detected in another detection frame. The control unit  464  may also associate object attributes determined by object analysis unit  462  on detection frames with objects tracked by object tracking unit  440  on non-detection frames. Object attributes  415  may be provided for objects in all frames, whether detection frames or non-detection frames. 
     In an aspect, the control unit  464  may use results from object tracking unit for objects in detection frames that are not detected but are tracked. If control unit  464  determines that an object has not been detected for a predetermined number M of consecutive detection frames (for example, not detected for M*N consecutive frames of input video  402 , where N is the periodicity of input video frames that are detection frames), control unit  464  may determine that an object has disappeared and to terminate tracking of that object. Similarly, if control unit  464  determines that a tracking score falls below predetermined tracking score threshold, the control unit  464  may determine that an object has disappeared and to terminate tracking of that object. Termination of tracking or disappearance of an object may be communicated to the consumer of object attributes  415 . 
     In an aspect, the detection weight  424  and/or tracking weights  444  may be pre-trained prior to starting analysis of input video  402 . In another aspect, detection weight  424  and/or tracking weights  444  may instead or additionally be trained during processing of input video  402 . 
       FIG. 5  depicts an aspect of the present disclosure as applied to an example video sequence  500  of images with moving face objects. Video sequence  500  includes frames  501 - 505  containing face objects. In this example application of system  200  of  FIG. 2  to the video sequence  500 , every other frame may be a detection frame (N=2). Hence, object detection unit  220  may operate on frames  501 ,  503 , and  505 , while object tracking unit  240  may operate on frames in between detection frames, including frames  502  and  504 . Video sequence  500  starts with two face objects in frame  501 , which may be detected detection unit  220 , and optional data association unit may associate an ID with each detected face. In  FIG. 5 , detection is indicated by the box surrounding the face, and associated ID number is indicated under each detected face image. The tracking unit may operate on the next frame,  502 , as it is not a member of the detection subset of frames. Faces with IDs  1  and  2  may be successfully tracked in frames  502 . A third face, the frowning face, appears in frame  502 , but since it was not detected in a previous detection frame, it is not tracked in frame  502 . In the second detection frame  503 , all three faces are detected, and IDs are associated with each. In tracking frame  504 , face object with ID  2  has become partially obscured, and hence may not be tracked even though a portion of the object is present in frame  504 . For the third detection frame  505 , only the face with ID  3  is detected. The face with ID  2  has disappeared, while the face with ID  1  may still be partially present but has changed sufficiently to not be detected. Objects may fail to be detected on detection frames and may fail to be tracked on tracking frames when the objects, for example, disappear from a frame, become partially obscured as they enter or exit the frame, become partially obscured by other objects in the frame, or the object may still be fully visible in the frame but change visually in some way. 
       FIGS. 6 and 7  and depict an example dataset for tracking termination. In  FIG. 6 , four objects (IDs=1, 2, 3, 4) are tracked over a series of frames. In this example, the number of tracking frames between detection frames is N=3, and tracking is stopped when an object is missing for M=3 consecutive detection frames after first being detected. The series of frames include detection frames  1  to  5  interleaved with three tracking frames between neighboring detection frames. Successfully detection or tracking is indicated by a check mark, while failed detection or tracking is indicated by an X. For example, all four objects (IDs  1 - 4 ) are detected on detection frame  1 , and objects with IDs  2  and  3  are not detected on detection frame  2 . 
     In the case of object ID  1 , it is detected and tracked on all frames depicted, and hence tracking of object one is never terminated. Tracking of object  3  is terminated on detection frame  4  because detection frame  4  is the M=3rd detection frame in a row for which object ID  3  was not detected. In contrast to object ID  3 , object ID  2  tracking is not terminated. Object ID  2  is not detected in detection frames  2 ,  3 , and  5  after being detected in detection frame  1 , but detection frames  3  and  5  are not consecutive so tracking is not terminated at detection frame  5 . 
     Object  4  tracking is terminated when tracking fails. Tracking may fail for example as an object becomes obscured or leaves the image frame. As further shown in  FIG. 7 , object ID  4  tracking fails in tracking frame  2 . 2 , which may be between detection frames  2  and  3 . 
     The foregoing discussion has described operation of the aspects of the present disclosure in the context digital image analysis. Commonly, these components are provided as electronic devices. Digital image analyzers or controllers can be embodied in integrated circuits, such as application specific integrated circuits, field programmable gate arrays and/or digital signal processors. Alternatively, they can be embodied in computer programs that execute on camera devices, personal computers, notebook computers, tablet computers, smartphones, or computer servers, and they also can be packaged in consumer software applications such as video games, media players, media editors, and the like. Such computer programs typically are stored in physical storage media such as electronic-, magnetic- and/or optically-based storage devices, where they are read by a processor and executed. And, of course, these components may be provided as hybrid systems that distribute functionality across dedicated hardware components and programmed general-purpose processors, as desired.

Metadata:
Filing Date: 20180907
Publication Date: 20201124
Grant Date: 20201124
Priority Date: 20180907
Inventors: DEHGHAN, AFSHIN
YANG, YANG
TANG, FENG
HO, KELSEY Y.
Assignee: APPLE INC
CPC Classifications: [{"code": "H04N23/611", "inventive": true, "first": false, "tree": "[]"}, {"code": "H04N23/611", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06V40/173", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06V10/62", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06V40/167", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06V40/167", "inventive": true, "first": true, "tree": "[]"}, {"code": "G06T2207/20084", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T7/248", "inventive": true, "first": true, "tree": "[]"}, {"code": "G06T2207/30201", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T2207/20081", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T2207/10016", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T2207/20132", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T7/248", "inventive": true, "first": false, "tree": "[]"}, {"code": "G06T2207/30196", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T2207/30242", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T2207/20021", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T2207/10016", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06K9/00261", "inventive": true, "first": true, "tree": "[]"}, {"code": "G06T2207/30201", "inventive": false, "first": false, "tree": "[]"}, {"code": "G06T7/248", "inventive": true, "first": false, "tree": "[]"}, {"code": "H04N5/23219", "inventive": true, "first": false, "tree": "[]"}]
Family ID: 69720934