FEATURE
- Type of featureOBJECT
- Type of objectpublic class DiskCachingFeatureExtractor<FEATURE,OBJECT extends Identifiable> extends Object implements FeatureExtractor<FEATURE,OBJECT>
Constructor and Description |
---|
DiskCachingFeatureExtractor(File cacheDir,
FeatureExtractor<FEATURE,OBJECT> extractor)
Construct the cache in the given directory.
|
DiskCachingFeatureExtractor(File cacheDir,
FeatureExtractor<FEATURE,OBJECT> extractor,
boolean force)
Construct the cache in the given directory.
|
Modifier and Type | Method and Description |
---|---|
FEATURE |
extractFeature(OBJECT object)
Extract features from an object and return them.
|
String |
toString() |
public DiskCachingFeatureExtractor(File cacheDir, FeatureExtractor<FEATURE,OBJECT> extractor)
cacheDir
- the location of the cacheextractor
- the feature extractorpublic DiskCachingFeatureExtractor(File cacheDir, FeatureExtractor<FEATURE,OBJECT> extractor, boolean force)
cacheDir
- the location of the cacheextractor
- the feature extractorforce
- if true, then all features will be regenerated and saved,
rather than being loaded.public FEATURE extractFeature(OBJECT object)
FeatureExtractor
extractFeature
in interface FeatureExtractor<FEATURE,OBJECT extends Identifiable>
object
- the object to extract from