Skip to content

Commit

Permalink
add rle method at the begining of the script
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 25, 2024
1 parent 298da10 commit a5fdfe6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/main/java/ai/nets/samj/models/EfficientSamJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ private EfficientSamJ(SamEnvManagerAbstract manager,
String IMPORTS_FORMATED = String.format(IMPORTS,
manager.getModelEnv() + File.separator + EfficientSamEnvManager.ESAM_NAME,
manager.getModelWeigthPath());
printScript(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES, "Edges tracing code");
Task task = python.task(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES);
System.out.println(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES);
//printScript(IMPORTS_FORMATED + PythonMethods.RLE_METHOD + PythonMethods.TRACE_EDGES, "Edges tracing code");
Task task = python.task(IMPORTS_FORMATED + PythonMethods.RLE_METHOD + PythonMethods.TRACE_EDGES);
task.waitFor();
if (task.status == TaskStatus.CANCELED)
throw new RuntimeException();
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/ai/nets/samj/models/EfficientViTSamJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ private EfficientViTSamJ(SamEnvManagerAbstract manager, String type,
manager.getModelEnv() + File.separator + EfficientViTSamEnvManager.EVITSAM_NAME,
MODELS_DICT.get(type), MODELS_DICT.get(type), manager.getModelWeigthPath());

printScript(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES, "Edges tracing code");
Task task = python.task(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES);
System.out.println(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES);
//printScript(IMPORTS_FORMATED + PythonMethods.RLE_METHOD + PythonMethods.TRACE_EDGES, "Edges tracing code");
Task task = python.task(IMPORTS_FORMATED + PythonMethods.RLE_METHOD + PythonMethods.TRACE_EDGES);
task.waitFor();
if (task.status == TaskStatus.CANCELED)
throw new RuntimeException();
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/ai/nets/samj/models/Sam2.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ private Sam2(SamEnvManagerAbstract manager, String type,
python.debug(debugPrinter::printText);
IMPORTS_FORMATED = String.format(IMPORTS, type, manager.getModelWeigthPath());

printScript(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES, "Edges tracing code");
Task task = python.task(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES);
System.out.println(IMPORTS_FORMATED + PythonMethods.TRACE_EDGES);
//printScript(IMPORTS_FORMATED + PythonMethods.RLE_METHOD + PythonMethods.TRACE_EDGES, "Edges tracing code");
Task task = python.task(IMPORTS_FORMATED + PythonMethods.RLE_METHOD + PythonMethods.TRACE_EDGES);
task.waitFor();
if (task.status == TaskStatus.CANCELED)
throw new RuntimeException();
Expand Down

0 comments on commit a5fdfe6

Please sign in to comment.