Class PamZipModelClassifier
java.lang.Object
rawDeepLearningClassifier.dlClassification.StandardClassifierModel
rawDeepLearningClassifier.dlClassification.archiveModel.ArchiveModelClassifier
rawDeepLearningClassifier.dlClassification.archiveModel.PamZipModelClassifier
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
,DLClassiferModel
Loads a zip file and checks for a saved model alongside a pamguard settings file
The model quickly pre checks zip files to make sure there is a settings file inside. This means that non compatible zip files are greyed out in the file importer.
The model can accept PyTorch or Tensorflow models.
- Author:
- Jamie Macaulay
-
Nested Class Summary
Nested classes/interfaces inherited from class rawDeepLearningClassifier.dlClassification.StandardClassifierModel
StandardClassifierModel.TaskThread
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get the name of the model.static String
getZipFilePath
(URI zipUri, String filePattern) Find the first file within a zip folder that matches a pattern.static void
Zip test.Called whenever PAMGuard stops.Methods inherited from class rawDeepLearningClassifier.dlClassification.archiveModel.ArchiveModelClassifier
getDLModelSettings, getDLParams, getDLWorker, getFileExtensions, getKetosParams, getModelUI, getModelWorker, getSettingsReference, getSettingsVersion, getUnitName, getUnitType, isModelType, makeParams, restoreSettings, setDLParams
Methods inherited from class rawDeepLearningClassifier.dlClassification.StandardClassifierModel
checkSettingsOK, closeModel, getClassNameIDs, getClassNames, getDLControl, getModelStatus, getNumClasses, getRawSettingsPane, isDecision, isModelExtensions, millis2Samples, prepModel, runModel
-
Constructor Details
-
PamZipModelClassifier
-
-
Method Details
-
getName
Description copied from interface:DLClassiferModel
Get the name of the model.- Specified by:
getName
in interfaceDLClassiferModel
- Overrides:
getName
in classArchiveModelClassifier
- Returns:
- the name of the model.
-
setModel
Description copied from interface:DLClassiferModel
Called whenever PAMGuard stops.- Specified by:
setModel
in interfaceDLClassiferModel
- Overrides:
setModel
in classStandardClassifierModel
- Returns:
-
getZipFilePath
public static String getZipFilePath(URI zipUri, String filePattern) throws ZipException, IOException Find the first file within a zip folder that matches a pattern. This peaks into the zip file instead of decompressing it.- Parameters:
zipUri
- - uri to the zip filefilePattern
- - the file pattern to match - the file must contain this string.- Returns:
- null if no file found and the file pqth if the file is founf
- Throws:
ZipException
IOException
-
main
Zip test.- Parameters:
args
-
-