Skip to content

Commit 17b89cc

Browse files
committed
typos
1 parent 1196abc commit 17b89cc

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/main/java/ai/nets/samj/install/Sam2EnvManager.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import io.bioimage.modelrunner.download.FileDownloader;
4646

4747
/*
48-
* Class that is manages the installation of SAM and EfficientSAM together with Python, their corresponding environments
48+
* Class that is manages the installation of SAM and SAM2 together with Python, their corresponding environments
4949
* and dependencies
5050
*
5151
* @author Carlos Javier Garcia Lopez de Haro
@@ -109,11 +109,11 @@ else if (!PlatformDetection.getArch().equals(PlatformDetection.ARCH_ARM64) && !P
109109
SAM2_1_BYTE_SIZES_MAP.put("large", (long) 898_083_611);
110110
}
111111
/**
112-
* Name of the environment that contains the code and weigths to run EfficientSAM models
112+
* Name of the environment that contains the code and weigths to run SAM2 models
113113
*/
114114
final static public String SAM2_ENV_NAME = "sam2";
115115
/**
116-
* Name of the folder that contains the code and weigths for EfficientSAM models
116+
* Name of the folder that contains the code and weigths for SAM2 models
117117
*/
118118
final static public String SAM2_NAME = "sam2";
119119
/**
@@ -209,9 +209,9 @@ public String getModelType() {
209209
}
210210

211211
/**
212-
* Check whether the Python environment with the corresponding packages needed to run EfficientSAM
212+
* Check whether the Python environment with the corresponding packages needed to run SAM2
213213
* has been installed or not. The environment folder should be named {@value #SAM2_ENV_NAME}
214-
* @return whether the Python environment with the corresponding packages needed to run EfficientSAM
214+
* @return whether the Python environment with the corresponding packages needed to run SAM2
215215
* has been installed or not
216216
*/
217217
public boolean checkSAMDepsInstalled() {
@@ -231,7 +231,7 @@ public boolean checkSAMDepsInstalled() {
231231

232232
/**
233233
*
234-
* @return whether the weights needed to run EfficientSAM Small (the standard EfficientSAM) have been
234+
* @return whether the weights needed to run SAM2 Small (the standard SAM2) have been
235235
* downloaded and installed or not
236236
*/
237237
public boolean checkModelWeightsInstalled() {
@@ -245,15 +245,15 @@ public boolean checkModelWeightsInstalled() {
245245
}
246246

247247
/**
248-
* Install the weights of EfficientSAM Small.
248+
* Install the weights of SAM2 Small.
249249
* Does not overwrite the weights file if it already exists.
250250
*/
251251
public void installModelWeigths() throws IOException, InterruptedException {
252252
installModelWeigths(false);
253253
}
254254

255255
/**
256-
* Install the weights of EfficientSAM Small.
256+
* Install the weights of SAM2 Small.
257257
* @param force
258258
* whether to overwrite the weights file if it already exists
259259
* @throws InterruptedException if the download of weights is interrupted
@@ -274,8 +274,8 @@ public void installModelWeigths(boolean force) throws IOException, InterruptedEx
274274
long size = fd.getOnlineFileSize();
275275
Consumer<Double> dConsumer = (d) -> {
276276
d = (double) (Math.round(d * 1000) / 10);
277-
if (d < 0 || d > 100) passToConsumer(LocalDateTime.now().format(DATE_FORMAT).toString() + " -- EFFICIENTVITSAM WEIGHTS DOWNLOAD: UNKNOWN%");
278-
else passToConsumer(LocalDateTime.now().format(DATE_FORMAT).toString() + " -- EFFICIENTVITSAM WEIGHTS DOWNLOAD: " + d + "%");
277+
if (d < 0 || d > 100) passToConsumer(LocalDateTime.now().format(DATE_FORMAT).toString() + " -- SAM2 WEIGHTS DOWNLOAD: UNKNOWN%");
278+
else passToConsumer(LocalDateTime.now().format(DATE_FORMAT).toString() + " -- SAM2 WEIGHTS DOWNLOAD: " + d + "%");
279279
};
280280
fd.setPartialProgressConsumer(dConsumer);
281281
fd.download(parentThread);
@@ -298,7 +298,7 @@ public void installModelWeigths(boolean force) throws IOException, InterruptedEx
298298
}
299299

300300
/**
301-
* Install the Python environment and dependencies required to run an EfficientSAM model.
301+
* Install the Python environment and dependencies required to run an SAM2 model.
302302
* If Micromamba is not installed in the path of the {@link Sam2EnvManager} instance, this method
303303
* installs it.
304304
*
@@ -313,7 +313,7 @@ public void installSAMDeps() throws IOException, InterruptedException, ArchiveEx
313313
}
314314

315315
/**
316-
* Install the Python environment and dependencies required to run an EfficientSAM model.
316+
* Install the Python environment and dependencies required to run an SAM2 model.
317317
* If Micromamba is not installed in the path of the {@link Sam2EnvManager} instance, this method
318318
* installs it.
319319
* @param force
@@ -362,8 +362,8 @@ public void installSAMDeps(boolean force) throws IOException, InterruptedExcepti
362362
}
363363

364364
/**
365-
* Install all the requirements to run EfficientSAM. First, checks if micromamba is installed, if not installs it;
366-
* then checks if the Python environment and packages needed to run EfficientSAM are installed and if not installs it
365+
* Install all the requirements to run SAM2. First, checks if micromamba is installed, if not installs it;
366+
* then checks if the Python environment and packages needed to run SAM2 are installed and if not installs it
367367
* and finally checks whether the weights are installed, and if not installs them too.
368368
*
369369
*
@@ -384,7 +384,7 @@ public void installEverything() throws IOException, InterruptedException,
384384

385385
/**
386386
*
387-
* @return the the path to the Python environment needed to run EfficientSAM
387+
* @return the the path to the Python environment needed to run SAM2
388388
*/
389389
public String getModelEnv() {
390390
File file = Paths.get(path, "envs", SAM2_ENV_NAME).toFile();
@@ -394,7 +394,7 @@ public String getModelEnv() {
394394

395395
/**
396396
*
397-
* @return the official name of the EfficientSAM Small weights
397+
* @return the official name of the SAM2 Small weights
398398
*/
399399
public String getModelWeigthsName() {
400400
try {

0 commit comments

Comments
 (0)