Skip to content

Commit

Permalink
commit many things
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Nov 22, 2024
1 parent a63c028 commit bc8d63c
Show file tree
Hide file tree
Showing 20 changed files with 238 additions and 1,491 deletions.
18 changes: 1 addition & 17 deletions src/main/java/ai/nets/samj/communication/model/EfficientSAM.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class EfficientSAM implements SAMModel {
public class EfficientSAM extends SAMModel {

private EfficientSamJ efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand Down Expand Up @@ -111,14 +111,6 @@ public String getDescription() {
return HTML_DESCRIPTION + (!this.installed ? SAMModel.HTML_NOT_INSTALLED : CAUTION_STRING);
}

@Override
/**
* {@inheritDoc}
*/
public boolean isInstalled() {
return installed;
}

@Override
/**
* {@inheritDoc}
Expand All @@ -144,14 +136,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

@Override
/**
* {@inheritDoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class EfficientViTSAML0 implements SAMModel {
public class EfficientViTSAML0 extends SAMModel {

private EfficientViTSamJ efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand Down Expand Up @@ -136,14 +136,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

/**
* Create an instance of the model that loads the model and encodes an image
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class EfficientViTSAML1 implements SAMModel {
public class EfficientViTSAML1 extends SAMModel {

private EfficientViTSamJ efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand All @@ -66,7 +66,6 @@ public void error(String text) {
}

};
private Boolean installed = false;
private boolean onlyBiggest = false;
/**
* "Official" name of the model
Expand Down Expand Up @@ -100,15 +99,7 @@ public String getName() {
* {@inheritDoc}
*/
public String getDescription() {
return HTML_DESCRIPTION + (!this.installed ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
/**
* {@inheritDoc}
*/
public boolean isInstalled() {
return installed;
return HTML_DESCRIPTION + (!this.isInstalled() ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
Expand Down Expand Up @@ -136,14 +127,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

/**
* Create an instance of the model that loads the model and encodes an image
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class EfficientViTSAML2 implements SAMModel {
public class EfficientViTSAML2 extends SAMModel {

private EfficientViTSamJ efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand All @@ -66,7 +66,6 @@ public void error(String text) {
}

};
private Boolean installed = false;
private boolean onlyBiggest = false;
/**
* Model complete name
Expand Down Expand Up @@ -99,15 +98,7 @@ public String getName() {
* {@inheritDoc}
*/
public String getDescription() {
return HTML_DESCRIPTION + (!this.installed ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
/**
* {@inheritDoc}
*/
public boolean isInstalled() {
return installed;
return HTML_DESCRIPTION + (!this.isInstalled() ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
Expand Down Expand Up @@ -135,14 +126,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

/**
* Create an instance of the model that loads the model and encodes an image
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class EfficientViTSAMXL0 implements SAMModel {
public class EfficientViTSAMXL0 extends SAMModel {

private EfficientViTSamJ efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand All @@ -66,7 +66,6 @@ public void error(String text) {
}

};
private Boolean installed = false;
private boolean onlyBiggest = false;
/**
* Name of the model
Expand Down Expand Up @@ -99,15 +98,7 @@ public String getName() {
* {@inheritDoc}
*/
public String getDescription() {
return HTML_DESCRIPTION + (!this.installed ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
/**
* {@inheritDoc}
*/
public boolean isInstalled() {
return installed;
return HTML_DESCRIPTION + (!this.isInstalled() ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
Expand Down Expand Up @@ -135,14 +126,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

/**
* Create an instance of the model that loads the model and encodes an image
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class EfficientViTSAMXL1 implements SAMModel {
public class EfficientViTSAMXL1 extends SAMModel {

private EfficientViTSamJ efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand All @@ -66,7 +66,6 @@ public void error(String text) {
}

};
private Boolean installed = false;
private boolean onlyBiggest = false;

/**
Expand Down Expand Up @@ -101,15 +100,7 @@ public String getName() {
* {@inheritDoc}
*/
public String getDescription() {
return HTML_DESCRIPTION + (!this.installed ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
/**
* {@inheritDoc}
*/
public boolean isInstalled() {
return installed;
return HTML_DESCRIPTION + (!this.isInstalled() ? SAMModel.HTML_NOT_INSTALLED : "");
}

@Override
Expand Down Expand Up @@ -137,14 +128,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

/**
* Create an instance of the model that loads the model and encodes an image
*/
Expand Down
21 changes: 2 additions & 19 deletions src/main/java/ai/nets/samj/communication/model/SAM2Large.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class SAM2Large implements SAMModel {
public class SAM2Large extends SAMModel {

private Sam2 efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand All @@ -66,7 +66,6 @@ public void error(String text) {
}

};
private Boolean installed = false;
private boolean onlyBiggest = false;
/**
* Name of the model
Expand Down Expand Up @@ -108,15 +107,7 @@ public String getName() {
* {@inheritDoc}
*/
public String getDescription() {
return HTML_DESCRIPTION + (!this.installed ? SAMModel.HTML_NOT_INSTALLED : CAUTION_STRING);
}

@Override
/**
* {@inheritDoc}
*/
public boolean isInstalled() {
return installed;
return HTML_DESCRIPTION + (!this.isInstalled() ? SAMModel.HTML_NOT_INSTALLED : CAUTION_STRING);
}

@Override
Expand All @@ -143,14 +134,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

@Override
/**
* {@inheritDoc}
Expand Down
21 changes: 2 additions & 19 deletions src/main/java/ai/nets/samj/communication/model/SAM2Small.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Carlos Garcia Lopez de Haro
* @author Vladimir Ulman
*/
public class SAM2Small implements SAMModel {
public class SAM2Small extends SAMModel {

private Sam2 efficientSamJ;
private final SamEnvManagerAbstract manager;
Expand All @@ -66,7 +66,6 @@ public void error(String text) {
}

};
private Boolean installed = false;
private boolean onlyBiggest = false;
/**
* Name of the model
Expand Down Expand Up @@ -108,15 +107,7 @@ public String getName() {
* {@inheritDoc}
*/
public String getDescription() {
return HTML_DESCRIPTION + (!this.installed ? SAMModel.HTML_NOT_INSTALLED : CAUTION_STRING);
}

@Override
/**
* {@inheritDoc}
*/
public boolean isInstalled() {
return installed;
return HTML_DESCRIPTION + (!this.isInstalled() ? SAMModel.HTML_NOT_INSTALLED : CAUTION_STRING);
}

@Override
Expand Down Expand Up @@ -144,14 +135,6 @@ public <T extends RealType<T> & NativeType<T>> void setImage(final RandomAccessi
}
}

@Override
/**
* {@inheritDoc}
*/
public void setInstalled(boolean installed) {
this.installed = installed;
}

@Override
/**
* {@inheritDoc}
Expand Down
Loading

0 comments on commit bc8d63c

Please sign in to comment.