Presentation is loading. Please wait.

Presentation is loading. Please wait.

By: David Gelbendorf, Hila Ben-Moshe Supervisor : Alon Zvirin 19.10.2015.

Similar presentations


Presentation on theme: "By: David Gelbendorf, Hila Ben-Moshe Supervisor : Alon Zvirin 19.10.2015."— Presentation transcript:

1 By: David Gelbendorf, Hila Ben-Moshe Supervisor : Alon Zvirin 19.10.2015

2 - GIP sensor: Today we are capable to capture 3D images - We are able to print in 3D, with the right printer - Everyone has a passport photo on he’s I.D card - Why not printing a face in 3D?

3

4  First Stage:  Developing a tool for processing a facial video and printing a 3D face automatically  Input: a 3D record of a frontal face  Output: a 3D printed model of the face  Second Stage:  Wrap the tool in a easy-to-use GUI

5 - Printing a 3D object requires: - A good 3D image, which contains all face features (eyes, nose and mouth) and with high density

6 - Printing a 3D object requires: - Smoothness and fullness - The 3D frames are not complete. Many pixels has NAN values and missing data (non-Continuity) - Choosing bounding box

7 - Printing a 3D object requires: - Transformation of the 3D GIP file to a 3D printer standard format (for instance obj, stl)

8 Recoding a video Choosing Best Frame Processing frame (creating model) Converting to STL Model ready to print

9 - How to choose a good frame? - Solution: Use Viola Jones face detection algorithm: - Use VJ for searching facial features - Use VJ for detecting movement of facial features Choosing Best Frame

10 Profile Face (no detections) True positives + False Positives (double detection of mouth and left eye) Semi-Profile Face with low detection results Choosing Best Frame

11 Double detection of mouth, no detection of left/right eye No detection of pair of eyes Perfect match (one match for each detector) Choosing Best Frame

12 Facial features detection: - Scanning each frame for a face, pair of eyes, left eye, right eye, nose and mouth - Sorted by importance : -2: Face and pair of eyes: -1: left eye, right eye, *nose -0.5: Mouth -*0.75: if found more than one nose, there will be penalty -*0.5: if found more than 2 pair of eyes - Grade: normalized to [0..1] Choosing Best Frame

13 Movement Detection: -Examining difference of VJ detections in adjacent frames (previous and next frames) : -Pair of eyes, left eye, mouth, nose -Calculating the distance of adjacent detections frames (Euclidean metric) -Calculating a grade according to the results. A perfect grade (1.00) will be achieved only if perfect match is found between previous and next frames in all examined features. Choosing Best Frame

14

15

16 - Grades examples: Choosing Best Frame 0.91 0 0 0.71 0.82

17  The chosen image is a raw 3d image, contains noise, holes and discontinuities.  Goal: automatic filtering of the image in order to create a 3D complete, continuous model Choosing Best Frame Processing Frame

18  Challenge: choosing a right bounding box for the desired model (for instance, without background)  Solution: choosing the bounding box automatically with optimization Choosing Best Frame Processing Frame

19  Bad Bounding Box (Noise is cut. Also, in the back of the head there is too much information) Choosing Best Frame Processing Frame

20  Good Bounding Box: Choosing Best Frame Processing Frame

21  Optimization of bounding box:  Specially important for Z axis (depth)  Iterative “exhaustive search” for optimal max Z:  Starting from a min size of max Z, and progressing with max of Z axis  Dividing the min – max range into levels, increasing the max Z value in each iteration  Calculating a grade for each max Z value  Searching for minimum grade  Second option: run constrained optimization to find optimal min and max value for x, y, z (6 variables) Choosing Best Frame Processing Frame

22  Searching for minimum Weighted grade according to:  Length of Contour 2D: 0.2  Length of Contour 3D: 0.2  Number of pixels: 0.3  Quadratic Shape of Contour: 0.7 Choosing Best Frame Processing Frame

23 Choosing Best Frame Processing Frame

24  Filtering:  3D filter:  A chosen filter (median, average, raw, beltrami)  Clean Margins  Remove pixels far from the median of their neighbors  Remove pixels with few neighbors  Choose K largest connectivity components  Filling Holes:  cubic interpolation of each 2D connected component Choosing Best Frame Processing Frame

25  Problem:  Dark eyebrows: risk for missing data for building the model  Solution:  Detect and fix holes in eyebrows:  Detect eyebrows area with Viola Jones algorithm (by detecting pair of eyes position).  If holes detected, try to fix by moderate filtering. Choosing Best Frame Processing Frame

26 Choosing Best Frame Processing Frame

27  Fixing Eyebrows – Examples (Detect):  Example 1 : eyebrows detection returns true negative (0% missing pixels):  Example 2: eyebrows detection returns true positive (28% missing pixels): Choosing Best Frame Processing Frame

28  Fixing Eyebrows –Repair:  Trying to moderate image filtering parameters:  Changing threshold of minimal neighbors from 4 to 2.  Iteratively compute the distance threshold between a pixel and it’s median with is neighbors. Increasing threshold until fraction of missing data <8% or after reaching maximum threshold value. Choosing Best Frame Processing Frame

29  Fixing Eyebrows – Examples ( Detect and fix ):  Example 1 : eyebrows detection returns true negative (0% missing pixels):  Example 2: eyebrows detection returns true positive (28% missing pixels):  After fixing, missing pixels fraction decreases to 5.7% Choosing Best Frame Processing Frame

30  Fixing Eyebrows – Examples:  Example 3: Final Model with and without fixing Choosing Best Frame Processing Frame

31  Fixing Eyebrows – drawbacks:  If Viola Jones algorithm fails to detect pair of eyes detection, eyebrows detection will fail as well.  Moderate filtering may result with a distorted model. Choosing Best Frame Processing Frame

32  After bounding box optimization and filtering:  The 3D model is prepared  The Contour of the model is prepared Choosing Best Frame Processing Frame

33  Face model is ready, we can transform the model into 3D STL format which is a known standard for 3D models  In the writing process, the 3D model’s points are re- arranged in triangles and their corresponding normals. Choosing Best Frame Processing FrameWriting STL file

34  Automatic bounding box may result in a cut face  Automatic filtering process (which is not configured to each face individually) may result with a less accurate model, compared to a model which was filtered manually.  Run-time of the all automatic modules may take a couple of minutes

35  Improving run-time of bottlenecks :  Run-time for calculating grade for each frame  Run-time for calculating bounding box  Run-time for writing STL modules  Improving filtering by adjusting parameters for each frame (change some parameters to be dynamic)  Building a better model from several different frames

36

37  All option can be easily operated from the GUI:  Choosing a video  First Option:  Getting a 3D model to print automatically  Second Option:  Edit parameters for each module:  Choose best frame  Choose bounding box (option for manual or automatic bounding box)  Choose file format and save the model to print  Advanced menu to change several parameters

38  Viola Jones in Matlab:  http://www.mathworks.com/help/vision/ref/visi on.cascadeobjectdetector-class.html


Download ppt "By: David Gelbendorf, Hila Ben-Moshe Supervisor : Alon Zvirin 19.10.2015."

Similar presentations


Ads by Google