mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-21 22:52:22 +00:00
Updated POm to ignore test resources and updates to DL data selector
This commit is contained in:
parent
5c6406efa5
commit
0f9722acc5
@ -6,7 +6,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -1,5 +1,6 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/rawDeepLearningClassifer/segmenter/SegmenterProcess.java=UTF-8
|
||||
encoding//src/test=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
encoding/src=UTF-8
|
||||
|
@ -1,9 +1,9 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=17
|
||||
org.eclipse.jdt.core.compiler.compliance=21
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
@ -13,4 +13,4 @@ org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.release=enabled
|
||||
org.eclipse.jdt.core.compiler.source=17
|
||||
org.eclipse.jdt.core.compiler.source=21
|
||||
|
@ -107,6 +107,7 @@
|
||||
<exclude>META-INF/*.SF</exclude>
|
||||
<exclude>META-INF/*.DSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
<exclude>test/resources/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
|
28
pom.xml
28
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.pamguard</groupId>
|
||||
<artifactId>Pamguard</artifactId>
|
||||
<version>2.02.12</version>
|
||||
<version>2.02.11d</version>
|
||||
<name>Pamguard</name>
|
||||
<description>Pamguard using Maven to control dependencies</description>
|
||||
<url>www.pamguard.org</url>
|
||||
@ -100,7 +100,7 @@
|
||||
<excludes>
|
||||
<exclude>META-INF/*.SF</exclude> <!-- get rid of manifests from library jars - also done in orig ant build file -->
|
||||
<exclude>META-INF/*.DSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
<exclude>test/resources/**</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
@ -180,25 +180,7 @@
|
||||
-->
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Exclude the resource folder from build
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/Resources</directory>
|
||||
<excludes>
|
||||
<exclude>src/test/resources/**</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>-->
|
||||
|
||||
|
||||
|
||||
</plugins>
|
||||
|
||||
|
||||
@ -327,7 +309,7 @@
|
||||
<dependency>
|
||||
<groupId>io.github.macster110</groupId>
|
||||
<artifactId>jdl4pam</artifactId>
|
||||
<version>0.0.99b</version>
|
||||
<version>0.0.99a</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/gov.nist.math/jama -->
|
||||
@ -598,7 +580,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fazecast</groupId>
|
||||
<artifactId>jSerialComm</artifactId>
|
||||
<version>2.11.0</version>
|
||||
<version>2.5.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/edu.emory.mathcs/JTransforms -->
|
||||
|
@ -13,6 +13,8 @@ public class CompoundDataSelector extends DataSelector {
|
||||
|
||||
private CompoundParams compoundParams = new CompoundParams();
|
||||
|
||||
private CompoundDialogPaneFX compoundPaneFX;
|
||||
|
||||
public CompoundDataSelector(PamDataBlock pamDataBlock, ArrayList<DataSelector> allSelectors,
|
||||
String selectorName, boolean allowScores, String selectorType) {
|
||||
super(pamDataBlock, selectorName, allowScores);
|
||||
@ -57,8 +59,10 @@ public class CompoundDataSelector extends DataSelector {
|
||||
|
||||
@Override
|
||||
public DynamicSettingsPane<Boolean> getDialogPaneFX() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
if (compoundPaneFX==null) {
|
||||
compoundPaneFX = new CompoundDialogPaneFX(this);
|
||||
}
|
||||
return compoundPaneFX;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
81
src/PamguardMVC/dataSelector/CompoundDialogPaneFX.java
Normal file
81
src/PamguardMVC/dataSelector/CompoundDialogPaneFX.java
Normal file
@ -0,0 +1,81 @@
|
||||
package PamguardMVC.dataSelector;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import PamView.dialog.PamDialogPanel;
|
||||
import PamView.dialog.PamGridBagContraints;
|
||||
import javafx.scene.Node;
|
||||
import pamViewFX.fxNodes.PamBorderPane;
|
||||
import pamViewFX.fxNodes.PamVBox;
|
||||
import pamViewFX.fxSettingsPanes.DynamicSettingsPane;
|
||||
|
||||
public class CompoundDialogPaneFX extends DynamicSettingsPane<Boolean> {
|
||||
|
||||
|
||||
private CompoundDataSelector compoundDataSelector;
|
||||
|
||||
private ArrayList<DataSelector> selectorList;
|
||||
private ArrayList<PamDialogPanel> selectorPanels;
|
||||
|
||||
private PamVBox mainPanel;
|
||||
|
||||
public CompoundDialogPaneFX(CompoundDataSelector compoundDataSelector) {
|
||||
this.compoundDataSelector = compoundDataSelector;
|
||||
this.selectorList = compoundDataSelector.getSelectorList();
|
||||
|
||||
mainPanel = new PamVBox();
|
||||
mainPanel.setSpacing(5);
|
||||
selectorPanels = new ArrayList<PamDialogPanel>(selectorList.size());
|
||||
int ind = 0;
|
||||
for (DataSelector ds : selectorList) {
|
||||
DynamicSettingsPane<Boolean> panel = ds.getDialogPaneFX();
|
||||
// turn all these panels into the compound ones with the extra enable options.
|
||||
|
||||
// DataSelectorDialogPanel dsp = new DataSelectorDialogPanel(ds, panel, ind++);
|
||||
// selectorPanels.add(dsp);
|
||||
|
||||
mainPanel.getChildren().add(panel.getContentNode());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean getParams(Boolean currParams) {
|
||||
boolean ok = true;
|
||||
for (int i = 0; i < selectorPanels.size(); i++) {
|
||||
PamDialogPanel panel = selectorPanels.get(i);
|
||||
ok |= panel.getParams();
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParams(Boolean input) {
|
||||
for (int i = 0; i < selectorPanels.size(); i++) {
|
||||
PamDialogPanel panel = selectorPanels.get(i);
|
||||
panel.setParams();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Compound data selector pane";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Node getContentNode() {
|
||||
return mainPanel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paneInitialized() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,11 +1,9 @@
|
||||
package PamguardMVC.dataSelector;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
|
42
src/PamguardMVC/dataSelector/DataSelectorDialogPaneFX.java
Normal file
42
src/PamguardMVC/dataSelector/DataSelectorDialogPaneFX.java
Normal file
@ -0,0 +1,42 @@
|
||||
package PamguardMVC.dataSelector;
|
||||
|
||||
import javafx.scene.Node;
|
||||
import pamViewFX.fxSettingsPanes.DynamicSettingsPane;
|
||||
|
||||
public class DataSelectorDialogPaneFX extends DynamicSettingsPane<Boolean> {
|
||||
|
||||
public DataSelectorDialogPaneFX(Object ownerWindow) {
|
||||
super(ownerWindow);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getParams(Boolean currParams) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParams(Boolean input) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Data selector wrapper pane";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Node getContentNode() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paneInitialized() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -242,6 +242,7 @@ public class ClickControlPane2 extends PamBorderPane implements TDSettingsPane {
|
||||
* @return the data select pane.
|
||||
*/
|
||||
private DynamicSettingsPane<Boolean> createDataSelectPane(){
|
||||
System.out.println("Data selector: " + clickPlotInfo.getClickDataSelector());
|
||||
return clickPlotInfo.getClickDataSelector().getDialogPaneFX();
|
||||
}
|
||||
|
||||
|
@ -1,23 +1,24 @@
|
||||
package rawDeepLearningClassifier.dataSelector;
|
||||
|
||||
import PamguardMVC.PamDataBlock;
|
||||
import PamguardMVC.dataSelector.DataSelectParams;
|
||||
import PamguardMVC.dataSelector.DataSelector;
|
||||
import PamguardMVC.dataSelector.DataSelectorCreator;
|
||||
import clickDetector.dataSelector.ClickDataSelector;
|
||||
import annotation.DataAnnotationType;
|
||||
import annotation.dataselect.AnnotationDataSelCreator;
|
||||
import rawDeepLearningClassifier.DLControl;
|
||||
import rawDeepLearningClassifier.logging.DLAnnotation;
|
||||
import rawDeepLearningClassifier.logging.DLAnnotationType;
|
||||
|
||||
/**
|
||||
* Creates a data selector for the deep learning module.
|
||||
*
|
||||
* @author Jamie Macaulay
|
||||
*/
|
||||
public class DLDataSelectCreator extends DataSelectorCreator {
|
||||
public class DLDataSelectCreator extends AnnotationDataSelCreator<DLAnnotation> {
|
||||
|
||||
private DLControl dlcontrol;
|
||||
|
||||
public DLDataSelectCreator(DLControl dlcontrol, PamDataBlock pamDataBlock) {
|
||||
super(pamDataBlock);
|
||||
public DLDataSelectCreator(DLControl dlcontrol, DLAnnotationType type) {
|
||||
super(type);
|
||||
this.dlcontrol = dlcontrol;
|
||||
}
|
||||
|
||||
@ -27,8 +28,13 @@ public class DLDataSelectCreator extends DataSelectorCreator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSelector createDataSelector(String selectorName, boolean allowScores, String selectorType) {
|
||||
return new DLDataSelector(dlcontrol, this.getPamDataBlock(), selectorName, allowScores, selectorType);
|
||||
public DataSelector createDataSelector(DataAnnotationType<DLAnnotation> dataAnnotationType, String selectorName,
|
||||
boolean allowScores, String selectorType) {
|
||||
// TODO Auto-generated method stub
|
||||
return new DLDataSelector(dlcontrol, dataAnnotationType, null,
|
||||
selectorName, allowScores);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,21 +8,24 @@ import PamguardMVC.PamDataBlock;
|
||||
import PamguardMVC.PamDataUnit;
|
||||
import PamguardMVC.dataSelector.DataSelectParams;
|
||||
import PamguardMVC.dataSelector.DataSelector;
|
||||
import annotation.DataAnnotationType;
|
||||
import annotation.dataselect.AnnotationDataSelector;
|
||||
import pamViewFX.fxSettingsPanes.DynamicSettingsPane;
|
||||
import rawDeepLearningClassifier.DLControl;
|
||||
import rawDeepLearningClassifier.logging.DLAnnotation;
|
||||
|
||||
/**
|
||||
* Data selector of DL data units. Note that data selectors are really data
|
||||
* unit specific and not annotation specific.
|
||||
* Data selector of DL data units. Note that data selectors are for deep leanring annotations
|
||||
* rather than deep learning data units.
|
||||
* <p>
|
||||
* The data selector can have different types of data selectors which can
|
||||
* depend on the classifer used and user choice.
|
||||
* depend on the classifier used and user choice.
|
||||
* <p>
|
||||
* Note that this is slightly different from DLPredicitoDecision
|
||||
* as it deals with data units that may have a more than one prediction.
|
||||
* i.e.
|
||||
*/
|
||||
public class DLDataSelector extends DataSelector {
|
||||
public class DLDataSelector extends AnnotationDataSelector<DLAnnotation> {
|
||||
|
||||
|
||||
/**
|
||||
@ -52,10 +55,19 @@ public class DLDataSelector extends DataSelector {
|
||||
* @param allowScores - allow all the scores.
|
||||
* @param selectorType - the selector type.
|
||||
*/
|
||||
public DLDataSelector(DLControl dlcontrol, PamDataBlock pamDataBlock, String selectorName, boolean allowScores, String selectorType) {
|
||||
super(pamDataBlock, selectorName, allowScores);
|
||||
public DLDataSelector(DLControl dlcontrol, DataAnnotationType<DLAnnotation> annotationType, PamDataBlock pamDataBlock,
|
||||
String selectorName, boolean allowScores) {
|
||||
super(annotationType, pamDataBlock, selectorName, allowScores);
|
||||
/****New data filters go here****/
|
||||
dataFilters.add(new DLPredictionFilter(dlcontrol));
|
||||
|
||||
//create default params
|
||||
dlDataSelectParams = new DLDataSelectorParams();
|
||||
dlDataSelectParams.dataSelectorParams = new DataSelectParams[dataFilters.size()];
|
||||
for (int i=0; i<dataFilters.size() ; i++) {
|
||||
dlDataSelectParams.dataSelectorParams[i] = dataFilters.get(i).getParams();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -117,4 +129,14 @@ public class DLDataSelector extends DataSelector {
|
||||
return score>=0 ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double scoreData(PamDataUnit pamDataUnit, DLAnnotation annotation) {
|
||||
int score = dataFilters.get(dlDataSelectParams.dataSelectorIndex).scoreDLData(pamDataUnit);
|
||||
|
||||
//the score is the index of the class that scores highest or -1 if it does not pass threshold prediciton.
|
||||
//Need to make more simple here as scores in PG are 0 for not passed rather than negative.
|
||||
|
||||
return score>=0 ? 1 : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package rawDeepLearningClassifier.dataSelector;
|
||||
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
|
||||
import PamView.dialog.PamDialogPanel;
|
||||
|
||||
@ -16,7 +17,7 @@ public class DLSelectPanel implements PamDialogPanel {
|
||||
@Override
|
||||
public JComponent getDialogComponent() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return new JLabel("Hello Annotation DL");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -28,7 +29,7 @@ public class DLSelectPanel implements PamDialogPanel {
|
||||
@Override
|
||||
public boolean getParams() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import PamguardMVC.PamDataUnit;
|
||||
import rawDeepLearningClassifier.dlClassification.genericModel.StandardPrediction;
|
||||
|
||||
/**
|
||||
* A data unit created from classification results of DL model. this data unit holds one model results, i.e.
|
||||
* A data unit created from classification results of DL model. This data unit holds one model results, i.e.
|
||||
* corresponds to one segment of raw data.
|
||||
*
|
||||
* @author Jamie Macaulay
|
||||
|
@ -74,17 +74,17 @@ public class DLDetectionDataBlock extends AcousticDataBlock<DLDetection> impleme
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see PamguardMVC.PamDataBlock#getDataSelectCreator()
|
||||
*/
|
||||
@Override
|
||||
public synchronized DataSelectorCreator getDataSelectCreator() {
|
||||
if (dlDataSelectCreator == null) {
|
||||
dlDataSelectCreator = new DLDataSelectCreator(dlControl, this);
|
||||
}
|
||||
return dlDataSelectCreator;
|
||||
|
||||
}
|
||||
// /* (non-Javadoc)
|
||||
// * @see PamguardMVC.PamDataBlock#getDataSelectCreator()
|
||||
// */
|
||||
// @Override
|
||||
// public synchronized DataSelectorCreator getDataSelectCreator() {
|
||||
// if (dlDataSelectCreator == null) {
|
||||
// dlDataSelectCreator = new DLDataSelectCreator(dlControl, this);
|
||||
// }
|
||||
// return dlDataSelectCreator;
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
BIN
src/rawDeepLearningClassifier/layoutFX/.DS_Store
vendored
BIN
src/rawDeepLearningClassifier/layoutFX/.DS_Store
vendored
Binary file not shown.
@ -1,13 +1,14 @@
|
||||
package rawDeepLearningClassifier.logging;
|
||||
|
||||
import PamView.symbol.PamSymbolChooser;
|
||||
import PamView.symbol.modifier.SymbolModifier;
|
||||
import annotation.CentralAnnotationsList;
|
||||
import annotation.DataAnnotationType;
|
||||
import annotation.binary.AnnotationBinaryHandler;
|
||||
import annotation.dataselect.AnnotationDataSelCreator;
|
||||
import generalDatabase.SQLLoggingAddon;
|
||||
import rawDeepLearningClassifier.DLControl;
|
||||
import rawDeepLearningClassifier.dataPlotFX.DLSymbolModifier;
|
||||
import rawDeepLearningClassifier.dataSelector.DLDataSelectCreator;
|
||||
|
||||
/**
|
||||
* Annotation type for data from the matched click classifier.
|
||||
@ -26,6 +27,8 @@ public class DLAnnotationType extends DataAnnotationType<DLAnnotation> {
|
||||
|
||||
private DLAnnotationSymbolChooser dlSymbolChooser;
|
||||
|
||||
private DLDataSelectCreator dlDataSelectorCreator;
|
||||
|
||||
public DLAnnotationType(DLControl mtControl) {
|
||||
this.dlControl=mtControl;
|
||||
dlAnnotationSQL = new DLAnnotationSQL(this);
|
||||
@ -92,6 +95,15 @@ public class DLAnnotationType extends DataAnnotationType<DLAnnotation> {
|
||||
public DLControl getDlControl() {
|
||||
return dlControl;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AnnotationDataSelCreator getDataSelectCreator(String selectorName, boolean allowScores) {
|
||||
if (dlDataSelectorCreator == null) {
|
||||
dlDataSelectorCreator = new DLDataSelectCreator(dlControl, this);
|
||||
}
|
||||
return dlDataSelectorCreator;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user