Week 10 - Face detection Flashcards
How does GPS work
(american system)
Receives signals from a number of satellites
The time is takes from satellite to sensor shows the distance - locate the sensor
What is the problem with GPS
Poor or non-existent satellite visibility
- eg in valley
Multipath reflections
-signals bounce off buildings causing miscalculations
GPS spoofing
-signals are received and re-transmitted after a delay
GPS blocking
transmitted at a higher power than received to prevent them from being received
What are GPS blockers
can be bought for cars
used by delivery drivers so that their office doesn’t know they are asleep somewhere
By drivers who have trackers installed as a condition of their insurance
What is the military problems
Spoofing and Blocking are common military antics
What is the potential military solution
Visual localisation
If the drone is level and the camera is pointed directly downwards, the centre of its image shows the location of the drone
How can ORB feature detector be used for visual localisation
Used to match the drone image with the Google image (finds key points)
Produces a homography (transformation matrix), H, that maps pixels from the drone image to the Google image
maps outline and centre point
Maps centre point quite accurately
How does ORB match to google images
google ariel images are geo-referenced, so we know latitude and longitude bounds of the image
What is the common GPS error
1-2m
So do we still need GPS
Yes
Method still has problems:
- Feature detector parameters need to be tuned for different images
- Images can not always be matched
- If the aerial image covers a larger area, there are
more opportunities to find drone image features in the wrong place
- Many other difficulties:weather conditions, not being perfectly downward-facing, features changing in images, etc
What is a stump
A tree containing only a single node and two leaves
What is the Gini impurity
Gini = 1 - p(yes)² - p(no)²
How do we calculate p(yes)²
(total yes / total (yes+no))²
How do we calculate full gini impurity
Eg chest pain has yes(144) or no(159) children
within the children there is yes or no for heart disease
calculate gini impurity for heart disease individually for yes arm then no arm
then for chest pain you use these calculated values yes = 144/303 x (gini yes) + 159/303 x (gini no)
How does gini imply root node
The lowest gini impurity is placed at root node (separates patients with and without heart disease the most)
How do we then form the remaining nodes
we recalculate gini impurities again down each branch
How do we handle numerical values
sort data into ascending order
calculate the average mass between each sample
eg 1:70kg and 2:82kg -> 76kg
Calculate the gini impurity at each of these avergae weights
Eg node = Mass < 76
Again the lowest gini impurity goes at the root
What can we say about the accuracy of decision trees
Trees do not perfectly classify training data
(generally not very accurate)
it is not likely perfect in classifying new samples
What is a random forest
Lots of decision trees
How do we use bootstrapping
Create a decision tree from bootstrapped data
same as before with gini impurities
After choosing root node, what happens if we have more than 2 remaining variables
Choose at random the next 2 we want to look at
Creating a random forest
Repeatedly:
create random bootstrap
build decision tree on bootstrap using random subset of variables at each layer
How does a random forest handle a new patient (test data sample)
The data is processed by every decision tree in the random forest
a tally is kept of final decision (eg heart disease: yes or no)
The highest vote gives the result for the patient
This increases the accuracy than using a single decision tree
What is adaboost
A classifier that uses weak learners which are usually STUMPS
some stumps have more of a say than others (non uniform weights)
each stump is created based on mistakes of previous stump
How does adaboost handle samples
Each sample is given a weight to show how important it is to be correctly classified
these weights must add up to 1
(recursively)
How does adaboost work
The gini impurity is calculated for each stump
lowest gini becomes the first stump in the forest
Calculate total error for a stump
calculate amount of say based on total error
calculate new weight for sample
normalise new weights and replace old
for next stump, gini impurities recalculated using weights
How is total error for stump calculated
the sum of weights for all samples it got wrong
Eg got 1 wrong out of 8 samples: 1/8
How is amount of say for stump calculated
amount of say = 1/2 ln ( 1-total error / total error)
new weight calculation (incorrectly classified samples)
new weight = weight x e^amount of say
weight increased
new weight calculation (correctly classified samples)
new weight = weight x e^-(amount of say)
weight decreased
Adaboot - classifying an unseen sample
add up the amount of say for total stumps that say yes vs total that say no
Whichever group has the largest amount of say -> their vote wins
What are applications of face detection
focus, exposure, red eye
tracking
adult/child detection
cat and dog
locate a face for shape fitting
what are applications of face recognition (not covered)
tagging of images
What are the clues for detecting human faces - viola jones
find patterns in the blurred image
dark and light patches in horizontal and vertical patterns
-> find the basic features and relationship
eg forehead above eye nose eye etc
what was the viola jones approach
-limit to frontal upright faces
-efficient-to-compute features
-efficient image representation
-adaboost for efficient choice of features
-cascade of classifiers
what did viola jones put emphasis on
speed and rate (fast face detection)
How can dark and light patches be used for detection
sum the dark regions and sum the light regions
F = light - dark
What is the integral image
{(x,y) = Σ(a≤x) Σ(b≤y) I(a,b)
{= curly I
For pixel x,y takes the sum of all intensities a and b within the rectangle region bounded from origin to x and y
It can be calculated in one pass
wont fit into array of ubytes
How is a two rectangle intensity sum found
6 points = 6 array references
How is a three rectangle intensity sum found
8 array references
How is a four rectangle intensity sum found
9 array references
What is calculating intensity sums efficiency
very efficient
what size faces does viola jones prcoess
24x24 (small)
2, 3, 4 rectangle feature possibilities
which gives 180,000 possibilities
intensities in faces must be normalise
How do we normalise intensities in a window
x’ = (x - xbar) / σ
σ = sd
(normalise each value x)
What is xbar
mean:
xbar = 1/N Σx
-> mean of image pixels:
Ibar = 1/n Σ I(r)
The mean can be calculated from the integral image
What is variance
σ² = xbar² - 1/N Σ x²
-> σ² = Ibar² - 1/N Σ (I(r))²
The sd can be calculated from the integral image of the image squared
So how many integral images does normaisation need
two (for mean and sd)
How do we reduce how many features we need to process in viola jones
using adaboost
what needs to be considered in a whole image search
consider a range of possible scales of patches
consider all possible patch positions
note: most patches are not faces
Cascade classifier
all subwindows pass through a 10-stage cascade classifier
at each stage, evaluate and reject non faces
at each stage, add more features to look for (eg eye nose eye)
first stage throws lots away
generalising to other objects
viola jones can be generalised to more things -> door, car