![]() |
DeepSight SDK
3.0.0
DeepSight SDK - crowd face analysis
|
DeepSight SDK aggregator class. More...
Public Member Functions | |
| Aggregator () | |
| ds::Aggregator constructor. | |
| ~Aggregator () noexcept | |
| ds::Aggregator destructor. | |
| Aggregator (Aggregator &&aggregator) noexcept | |
| ds::Aggregator move constructor. | |
| Aggregator & | operator= (Aggregator &&aggregator) noexcept |
| ds::Aggregator move assignment operator. | |
| void | newDetections (const std::vector< ds::Person > &people) |
| Adds new detections to the current state of aggregations. More... | |
| std::vector< ds::AggregatedPerson > | getFinalizedAggregations (bool clean=true) |
| Get people whose aggregation is finalized. More... | |
| std::vector< ds::AggregatedPerson > | getOngoingAggregations () const |
| Get people whose aggregation is still ongoing. More... | |
| std::vector< ds::AggregatedPerson > | getAllAggregations () const |
| Get all aggregations, ongoing and finalized. More... | |
| void | cleanFinalizedAggregations () noexcept |
| Deletes all the finalized aggregations from the internal state. | |
| void | cleanAll () noexcept |
| Deletes ongoing and finalized aggregations from the internal state. More... | |
Static Public Member Functions | |
| static std::vector< ds::AggregatedPerson > | aggregateOffline (const std::vector< ds::Person > &people) |
| Aggregates all the people in the input vector. More... | |
DeepSight SDK aggregator class.
The ds::Aggregator class aggregates all information retrieved at each frame for each unique person. This means that for all ds::Person detections with the same id, the ds::Aggregator class produces one single ds::AggregatedPerson object with the aggregated values for age, gender, and so on. The aggregation algorithm takes into account the conditions for calculating the best possible value for each estimated feature, like age, gender and so on. It also performs filtering in case a detection has a too short duration and therefore considered as a false positive.
|
static |
Aggregates all the people in the input vector.
| people | The vector of new detections to aggregate. |
Assuming that all the ds::Person detections for each person are collected in a vector, this functions performs the aggregation in a stateless fashion, that is, without requiring to construct a ds::Aggregator object. This is equivalent to:
Example usage:
|
noexcept |
Deletes ongoing and finalized aggregations from the internal state.
| std::vector< ds::AggregatedPerson > ds::Aggregator::getAllAggregations | ( | ) | const |
Get all aggregations, ongoing and finalized.
This function returns all aggregations, ongoing and finalized. Aggregated people who have a too short detection duration are considered false positives and are filtered out.
Example usage:
| std::vector< ds::AggregatedPerson > ds::Aggregator::getFinalizedAggregations | ( | bool | clean = true | ) |
Get people whose aggregation is finalized.
| clean | If true, the returned aggregations are removed from the internal state. |
When a person is not detected for about 5 seconds, DeepSight stops tracking it. Therefore a detection with the same ID cannot be generated anymore. When that happens, there will be no new detection to aggregate for that person and it's therefore considered finalized. This function returns all the people whose aggregation is considered finalized. Aggregated people who have a too short detection duration are considered false positives and are filtered out.
If the clean parameter is set to true, the returned aggregations are removed from the internal state; this has the same effect as calling ds::Aggregator::cleanFinalizedAggregations. Otherwise they will be returned again at the next call of the ds::Aggregator::getFinalizedAggregations or ds::Aggregator::cleanFinalizedAggregations functions.
Example usage:
| std::vector< ds::AggregatedPerson > ds::Aggregator::getOngoingAggregations | ( | ) | const |
Get people whose aggregation is still ongoing.
This function returns the people whose aggregation is not finalized yet and can be updated with new detections in the following frames. Aggregated people who have a too short detection duration are considered false positives and are filtered out.
Example usage:
| void ds::Aggregator::newDetections | ( | const std::vector< ds::Person > & | people | ) |
Adds new detections to the current state of aggregations.
| people | New detections to aggregate. |
Use this function to update the current state of each person aggregation after every frame analysis.
Example usage: