Skip to content

Conversation

@jeylau
Copy link
Contributor

@jeylau jeylau commented Oct 31, 2023

  • Move the execution of the video adaptation code to a separate thread
  • Add infinite progress bar in the GUI status bar
  • Add extra widgets to grant users more control
Screenshot 2023-10-31 at 6 44 44 PM

@jeylau jeylau added the enhancement New feature or request label Oct 31, 2023
@jeylau jeylau requested review from AlexEMG and MMathisLab October 31, 2023 17:48
@AlexEMG
Copy link
Member

AlexEMG commented Oct 31, 2023

Looks great, @yeshaokai what do you think?

@yeshaokai
Copy link
Collaborator

Discussed with Jessy and it looks good to me

@MMathisLab
Copy link
Member

MMathisLab commented Oct 31, 2023

Is there a help button? Any guidance to help the user to know what "threshold" is? Why they should or should not use adaptation?

What form should scale be? This should be smartly set and not exposed - it's also irrelevant for quadruped model with top down...

@AlexEMG AlexEMG mentioned this pull request Oct 31, 2023
4 tasks
Copy link
Member

@MMathisLab MMathisLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The users need more guidance. We really need to bring back the help button!

Scale list should be hidden or a long paragraph on what size our model is trained on, and dynamically updated based on the selection of a model.

@jeylau
Copy link
Contributor Author

jeylau commented Nov 1, 2023

I don't think we can hide scale list, as it requires user's input (as it's dependent on video/animal size, but not model type); if left unspecified, it internally defaults to video height +/- 50). If specified by the user though, note that we explicitly indicate that these should be a comma-separated list of integers, and we have an additional input validator that colors the input field frame (red, yellow, green) whether the input format is wrong, incomplete, or valid.

@MMathisLab
Copy link
Member

Sure, but without docs it's not intuitive what it even is - so sure integers is clear, but we can do this smarter. Measure the video pixel size, scale it to our mean superanimal training dataset size... drop the box 💪

@AlexEMG AlexEMG mentioned this pull request Nov 3, 2023
@jeylau
Copy link
Contributor Author

jeylau commented Nov 3, 2023

  • tooltip display on hovering over the question mark icon
Screenshot 2023-11-03 at 4 42 30 PM
  • scrollable help dialog
Screenshot 2023-11-03 at 4 42 46 PM

@AlexEMG AlexEMG requested a review from MMathisLab November 6, 2023 11:35
@n-poulsen
Copy link
Contributor

The code looks good to me, but I get an issue when running with video adaptation (200 iterations):

/miniconda/envs/upa/lib/python3.9/site-packages/tensorflow/python/keras/engine/base_layer_v1.py:1694: UserWarning: `layer.apply` is deprecated and will be removed in a future version. Please use `layer.__call__` method instead.
  warnings.warn('`layer.apply` is deprecated and '
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/miniconda/envs/upa/lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "/miniconda/envs/upa/lib/python3.9/threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "/DeepLabCut/deeplabcut/pose_estimation_tensorflow/core/train.py", line 84, in load_and_enqueue
    batch_np = dataset.next_batch()
  File "/DeepLabCut/deeplabcut/pose_estimation_tensorflow/datasets/pose_multianimal_imgaug.py", line 538, in next_batch
    temp.append(array[mask[inds]])
IndexError: invalid index to scalar variable.

I tested with the current code on main and do not get this issue. Does this happen to anyone else?

@jeylau
Copy link
Contributor Author

jeylau commented Nov 7, 2023

@n-poulsen, I'm looking at it.

@jeylau jeylau mentioned this pull request Nov 7, 2023
@jeylau
Copy link
Contributor Author

jeylau commented Nov 7, 2023

This PR one is ready to merge; I pushed a fix in a separate branch as it's unrelated to the GUI.

@AlexEMG AlexEMG merged commit 780a1db into main Nov 7, 2023
@MMathisLab MMathisLab deleted the superanimal_gui branch February 11, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants