Skip to content

Commit

Permalink
sly version upgrade, change images urls (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxnt authored Jun 14, 2022
1 parent 28fb77c commit 68b074e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
supervisely==6.23.1
supervisely[apps]==6.23.1
ffmpeg-python==0.2.0
1 change: 1 addition & 0 deletions serve/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
],
"description": "Deploy model as REST API service",
"docker_image": "supervisely/mmseg:1.3.0",
"instance_version": "6.4.57",
"main_script": "serve/src/sly_serve.py",
"gui_template": "serve/src/gui.html",
"task_location": "application_sessions",
Expand Down
1 change: 1 addition & 0 deletions train/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
],
"description": "Dashboard to configure, start and monitor training",
"docker_image": "supervisely/mmseg:1.3.0",
"instance_version": "6.4.57",
"main_script": "train/src/main.py",
"gui_template": "train/src/gui.html",
"task_location": "workspace_tasks",
Expand Down
2 changes: 1 addition & 1 deletion train/src/sly_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import shutil
import pkg_resources

from dotenv import load_dotenv
# from dotenv import load_dotenv

root_source_dir = str(Path(sys.argv[0]).parents[2])
sly.logger.info(f"Root source directory: {root_source_dir}")
Expand Down
4 changes: 2 additions & 2 deletions train/src/ui/augs.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ def preview_augs(api: sly.Api, task_id, context, state, app_logger):
img = api.image.download_np(image_info.id)
ann_json = api.annotation.download(image_info.id).annotation
ann = sly.Annotation.from_json(ann_json, g.project_meta)
gallery.set_left("before", image_info.full_storage_url, ann)
gallery.set_left("before", image_info.path_original, ann)
_, res_img, res_ann = sly.imgaug_utils.apply(augs_ppl, g.project_meta, img, ann)
local_image_path = os.path.join(g.my_app.data_dir, "preview_augs.jpg")
sly.image.write(local_image_path, res_img)
if api.file.exists(g.team_id, remote_preview_path):
api.file.remove(g.team_id, remote_preview_path)
file_info = api.file.upload(g.team_id, local_image_path, remote_preview_path)
gallery.set_right("after", file_info.full_storage_url, res_ann)
gallery.set_right("after", file_info.storage_path, res_ann)
gallery.update(options=False)


Expand Down

0 comments on commit 68b074e

Please sign in to comment.