Class BatchDistanceNearestNeighbors
java.lang.Object
cz.fidentis.analyst.engines.face.batch.distance.impl.BatchIndirectDistanceImpl
cz.fidentis.analyst.engines.face.batch.distance.impl.BatchDistanceNearestNeighbors
- All Implemented Interfaces:
BatchDistance
,BatchIndirectDistance
- Direct Known Subclasses:
BatchDistanceNearestNeighborsCombined
,BatchDistanceNearestNeighborsDirect
,BatchDistanceNearestNeighborsRelative
A class that computes similarity of a set of faces by computing
the distance of faces to an average (gauge) face and then combining these values
to get mutual similarity for all pairs. Euclidean distance to nearest neighbors
is used as the distance metric.
The computation is accelerated by using multiple CPU cores concurrently.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Cache of distances from the average face to other faces. -
Constructor Summary
ConstructorsConstructorDescriptionBatchDistanceNearestNeighbors
(HumanFace gaugeFace, int numFaces, BatchDistanceNearestNeighbors.DistCache<?> distCache) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToMeasurement
(HumanFace face) Adds the face to the N:N measurement.Methods inherited from class cz.fidentis.analyst.engines.face.batch.distance.impl.BatchIndirectDistanceImpl
getDistCache, getDistDeviations, getDistSimilarities, getGaugeFace, measure, setDistDeviation, setDistSimilarity
-
Constructor Details
-
BatchDistanceNearestNeighbors
public BatchDistanceNearestNeighbors(HumanFace gaugeFace, int numFaces, BatchDistanceNearestNeighbors.DistCache<?> distCache) Constructor.- Parameters:
gaugeFace
- A face serving as a "gauge". It is usually an average face of a set of faces.numFaces
- The number of faces to be measured (excluding the gauge face)distCache
- Distance cache
-
-
Method Details
-
addToMeasurement
Description copied from interface:BatchIndirectDistance
Adds the face to the N:N measurement.- Specified by:
addToMeasurement
in interfaceBatchIndirectDistance
- Specified by:
addToMeasurement
in classBatchIndirectDistanceImpl
- Parameters:
face
- Face to be measured
-