Skip to content

Commit

Permalink
temporary comment curr_event
Browse files Browse the repository at this point in the history
  • Loading branch information
grokhi committed Sep 12, 2024
1 parent 1c5b1da commit ba6af8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
sly.fs.clean_dir(SLY_APP_DATA)

api: sly.Api = None
curr_event: Dict[int, Event.ManualSelected.ImageChanged] = dict()
# curr_event: Dict[int, Event.ManualSelected.ImageChanged] = dict()
MODEL_DIR = "./checkpoints"
previous_image: int = None

Expand Down
15 changes: 12 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
matches = {}
timestamp = None

curr_event_tmp = None # temporary soultion


@sly.timeit
def get_image_infos(
Expand Down Expand Up @@ -176,7 +178,11 @@ def image_changed(api: sly.Api, event: Event.ManualSelected.ImageChanged):
g.api = api
if event is None:
return
g.curr_event[event.user_id] = event
# g.curr_event[event.user_id] = event

global curr_event_tmp
curr_event_tmp = event

status_image_not_initialized.hide()
sly.logger.debug("Event image ID={}".format(event.image_id))
get_points(api, event, event.image_id)
Expand Down Expand Up @@ -389,8 +395,11 @@ def checkbox(value):
@button_track.click
def manual_track():
api: sly.Api = g.api
user_id = sly.env.user_id()
event: Event.ManualSelected.ImageChanged = g.curr_event.get(user_id)
# user_id = sly.env.user_id()
# event: Event.ManualSelected.ImageChanged = g.curr_event.get(user_id)

global curr_event_tmp
event = curr_event_tmp

if event is None:
sly.logger.info("Please refresh the page")
Expand Down

0 comments on commit ba6af8f

Please sign in to comment.