#include <psi_likelihood.h>
|
| Frame_likelihood (size_t width, size_t height, const boost::function2< double, const Bbox &, const Bbox & > &pairwise_box_likelihood, const boost::function1< double, const Bbox & > &noise_box_likelihood, double p_noise) |
|
double | operator() (const std::vector< Bbox > &data_boxes, const std::vector< Bbox > &model_boxes) const |
|
double | compute_visibility (const std::vector< Bbox > &all_boxes, size_t box_i) const |
|
double | p_missing (double visibility) const |
|
double | p_correspondence (size_t num_data, size_t num_noise) const |
|
std::vector< double > | get_p_missing (const std::vector< Bbox > &model) const |
|
kjb::Matrix | get_affinity (const std::vector< Bbox > &data, const std::vector< Bbox > &model) const |
|
std::vector< size_t > | get_correspondence_greedily (const kjb::Matrix &affinities) const |
|
Frame_likelihood & | dont_marginalize_noise () |
|
|
double | operator() (const std::vector< Bbox > &data_boxes, const std::vector< Bbox > &models, const kjb::Matrix &affinities, const std::vector< size_t > &correspondences, const std::vector< double > &m_p_missing) const |
|
kjb::Matrix | get_affinity (const std::vector< Bbox > &data, const std::vector< Bbox > &model, const std::vector< double > &m_p_missing) const |
|
kjb::psi::Frame_likelihood::Frame_likelihood |
( |
size_t |
width, |
|
|
size_t |
height, |
|
|
const boost::function2< double, const Bbox &, const Bbox & > & |
pairwise_box_likelihood, |
|
|
const boost::function1< double, const Bbox & > & |
noise_box_likelihood, |
|
|
double |
p_noise |
|
) |
| |
|
inline |
- Parameters
-
p_noise | bernoulli noise process |
double kjb::psi::Frame_likelihood::compute_visibility |
( |
const std::vector< Bbox > & |
all_boxes, |
|
|
size_t |
box_i |
|
) |
| const |
Find the amount of a bounding box that is visible, from zero to 1. Reduction in visibility can be the result of occlusion from other boxes in front of it, or from the box being parially (or completely) outside the view of the camera.
Currently, this occlusion approximated by discretizing the box into 64 cells, and doing a binary test on each cell to see if it's occluded. As a result, the returned values will have a resolution of 1/64, but it gives a running time of O(n) instead of O(n^2 log n) for an exact solution (and less error-prone!!).
- Parameters
-
all_boxes | The set of all bounding boxes, sorted in order of depth, with nearest first. |
i | the index of the box to find the occlusion of |
- Precondition
- all_boxes is sorted descending by depth
You'll almost never call this. This sets a little flag that lets the likelihood demo be more illustrative by allowing the correspondence matching to switch from "match" to "noise" if the match is too bad.
kjb::Matrix kjb::psi::Frame_likelihood::get_affinity |
( |
const std::vector< Bbox > & |
data, |
|
|
const std::vector< Bbox > & |
model |
|
) |
| const |
|
inline |
kjb::Matrix kjb::psi::Frame_likelihood::get_affinity |
( |
const std::vector< Bbox > & |
data, |
|
|
const std::vector< Bbox > & |
model, |
|
|
const std::vector< double > & |
m_p_missing |
|
) |
| const |
|
protected |
- Precondition
- model is sorted descending by depth
- Parameters
-
data | Data boudning boxes |
model | Bounding boxes generated by the model |
m_p_missing | Probability of each model being undetected (based on occlusion/visibility) |
std::vector< size_t > kjb::psi::Frame_likelihood::get_correspondence_greedily |
( |
const kjb::Matrix & |
affinities | ) |
const |
std::vector< double > kjb::psi::Frame_likelihood::get_p_missing |
( |
const std::vector< Bbox > & |
model | ) |
const |
Returns a vector containing the probability of each model being undetected, based on how much it is occluded by the others and whether or not it is on the screen
double kjb::psi::Frame_likelihood::operator() |
( |
const std::vector< Bbox > & |
data_boxes, |
|
|
const std::vector< Bbox > & |
model_boxes |
|
) |
| const |
|
inline |
Compare two sets of bounding boxes.
This will find a correspodence between data and model by greedilly matching data boxes to model boxes or noise.
- Precondition
- model_boxes are sorted in order of depth, with nearest first
double kjb::psi::Frame_likelihood::operator() |
( |
const std::vector< Bbox > & |
data_boxes, |
|
|
const std::vector< Bbox > & |
model_boxes, |
|
|
const kjb::Matrix & |
affinities, |
|
|
const std::vector< size_t > & |
correspondences, |
|
|
const std::vector< double > & |
m_p_missing |
|
) |
| const |
|
protected |
- Parameters
-
affinities | The affinity matrix returned by get_affinities(). |
correspondences | The correpondence map returned by get_correspondences_greedily() |
- Precondition
- model_boxes are sorted descending by depth
double kjb::psi::Frame_likelihood::p_correspondence |
( |
size_t |
num_data, |
|
|
size_t |
num_noise |
|
) |
| const |
- Parameters
-
num_data | the total number of data boxes |
num_noise | the number of data boxes assigned to noise |
- Precondition
- the correspondence is already "valid", i.e. one-to-one plus a noies bucket
double kjb::psi::Frame_likelihood::p_missing |
( |
double |
visibility | ) |
const |
|
inline |
- Parameters
-
visibility | the amount of a box's area that is visible by the camera |
The documentation for this class was generated from the following files: