Skip to content

Commit

Permalink
add method to know which model type are we wroking with
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Dec 17, 2024
1 parent 21b3ad1 commit b34b583
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static EfficientViTSamEnvManager create(String path, String modelType) {
* @param path
* the path where the corresponding micromamba shuold be installed
* @param modelType
* each of the possible model types (sizes) that EfficientiTSAM can have. They are the keys of
* each of the possible model types (sizes) that EfficientViTSAM can have. They are the keys of
* the following map {@link #EFFICIENTVITSAM_BYTE_SIZES_MAP}
* @param consumer
* an specific consumer where info about the installation is going to be communicated
Expand Down Expand Up @@ -193,6 +193,15 @@ public static EfficientViTSamEnvManager create(Consumer<String> consumer) {
return create(DEFAULT_DIR, null, consumer);
}

/**
*
* @return which of the possible EfficientViTSAM this is. The possible variants are the
* keys of the following map: {@link #EFFICIENTVITSAM_BYTE_SIZES_MAP}
*/
public String getModelType() {
return this.modelType;
}

/**
* Check whether the Python environment with the corresponding packages needed to run EfficientSAM
* has been installed or not. The environment folder should be named {@value #EVITSAM_ENV_NAME}
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/ai/nets/samj/install/Sam2EnvManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,14 @@ public static Sam2EnvManager create(Consumer<String> consumer) {
return create(DEFAULT_DIR, null, consumer);
}

/**
*
* @return which of the possible SAM2 this is. The possible variants are the keys of the following map: {@link #SAM2_BYTE_SIZES_MAP}
*/
public String getModelType() {
return this.modelType;
}

/**
* Check whether the Python environment with the corresponding packages needed to run EfficientSAM
* has been installed or not. The environment folder should be named {@value #SAM2_ENV_NAME}
Expand Down

0 comments on commit b34b583

Please sign in to comment.