Skip to content

Commit

Permalink
Update launch.json and main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenAnpu committed Aug 14, 2024
1 parent 3e010b5 commit d4b8dff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "src/main.py",
"console": "integratedTerminal",
Expand Down
13 changes: 9 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import supervisely as sly

import src.globals as g
import src.functions as f
import src.globals as g
import src.workflow as w

api = None


class MyExport(sly.app.Export):
def process(self, context: sly.app.Export.Context):
global api
Expand Down Expand Up @@ -52,9 +53,13 @@ def process(self, context: sly.app.Export.Context):
progress = sly.Progress("Transformation ...", images_count)
for ds in datasets:
train_info, val_info = f.process_images(
api, meta, ds,
class_names, progress,
dir_names, skipped,
api,
meta,
ds,
class_names,
progress,
dir_names,
skipped,
max_kpts_count,
)
train_ids, train_img_paths, train_anns = train_info
Expand Down
1 change: 0 additions & 1 deletion src/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def workflow_input(api: sly.Api, project_id: int):

def workflow_output(api: sly.Api, file: Union[int, sly.api.file_api.FileInfo]):
try:
api.file.get
if isinstance(file, int):
file = api.file.get_info_by_id(file)
relation_settings = sly.WorkflowSettings(
Expand Down

0 comments on commit d4b8dff

Please sign in to comment.