Skip to content

Commit

Permalink
Merge pull request #31 from supervisely-ecosystem/maxtes-bug-fix
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
MaxTeselkin authored Mar 15, 2023
2 parents 9d749af + 32cda14 commit efcbe59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion train/src/ui/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ def train(api: sly.Api, task_id, context, state, app_logger):
img_dir = "img"
ann_dir = "seg"
obj_classes = g.project_meta.obj_classes
obj_classes = obj_classes.add(sly.ObjClass(name="__bg__", geometry_type=sly.Bitmap, color=(0,0,0)))
if g.project_meta.get_obj_class("__bg__") is None:
obj_classes = obj_classes.add(sly.ObjClass(name="__bg__", geometry_type=sly.Bitmap, color=(0,0,0)))
classes_json = obj_classes.to_json()
classes_json = [obj for obj in classes_json if obj["title"] in state["selectedClasses"] or obj["title"] == "__bg__"]
classes = [obj["title"] for obj in classes_json]
Expand Down

0 comments on commit efcbe59

Please sign in to comment.