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 -
Field Summary
Fields inherited from class rawDeepLearningClassifier.dlClassification.StandardClassifierModel
dlControl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of the model.static StringgetZipFilePath(URI zipUri, String filePattern) Find the first file within a zip folder that matches a pattern.static voidZip test.Set and load the model.Methods inherited from class rawDeepLearningClassifier.dlClassification.archiveModel.ArchiveModelClassifier
getDLModelSettings, getDLParams, getDLWorker, getFileExtensions, getKetosParams, getModelUI, getModelWorker, getSettingsReference, getSettingsVersion, getUnitName, getUnitType, isModelType, makeParams, restoreSettings, setDLParamsMethods inherited from class rawDeepLearningClassifier.dlClassification.StandardClassifierModel
checkSettingsOK, closeModel, getAllowedDataTypes, getClassNameIDs, getClassNames, getDLControl, getModelStatus, getNumClasses, getRawSettingsPane, isDecision, isModelExtensions, millis2Samples, newResult, prepModel, runModel
-
Constructor Details
-
PamZipModelClassifier
-
-
Method Details
-
getName
Description copied from interface:DLClassiferModelGet the name of the model.- Specified by:
getNamein interfaceDLClassiferModel- Overrides:
getNamein classArchiveModelClassifier- Returns:
- the name of the model.
-
setModel
Description copied from interface:DLClassiferModelSet and load the model.- Specified by:
setModelin interfaceDLClassiferModel- Overrides:
setModelin classStandardClassifierModel- Returns:
- the status of the model e.g. if there has been an error loading
-
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:
ZipExceptionIOException
-
main
Zip test.- Parameters:
args-
-