Hi @hmaarrfk our users are typically using this as an full project management software as well as DL based pose estimation; if you want headless you can pip install deeplabcut or use pip install deeplabcut-docker, which might better suit your use cases? https://deeplabcut.github.io/DeepLabCut/docs/docker.html
The pip installation works great! Thank you for making that easy!
I understand that the "full project management GUI" experience is critical to your users. I do not want to take that away in the slightest (I would also be happy to help on that front too looking into the problems I am facing here I found a few places that could use touchups on the GUI front that I am happy to contribute).
Unfortunately, as soon as we import deeplabcut into an other workflow that might want to use a different backend for matplotlib (for some interactive plotting), the statements in the __init__.py change which backend is used and causes very strange behavior.
Please see the attached screenshot where a user may want to use matplotlib in a jupyter notebook, but gets strange behavior as soon as they introduce deeplabcut into their analysis pipeline.
This leads to rather tricky behavior (bugs or "features") to debug.
Finally, the try: expect statement to attempt to detect the wx library is also rather difficult to deal with when working in a larger project. It means that the selected backend of the library now might
I understand that your users are often running deeplabcut with the command:
python -m deeplabcut
I understand how critical this is.
I can help ensure that this workflow remains unchanged.
Most of what it will involve is delaying the calls:
import wx
mpl.use("WxAgg")
to the desired entry points of the GUI.
I know this isn't "easy" and there are likely many knock-on effects that I cannot appreciate easily. However, if you are willing to review a few targetted PRs, I would be glad to make them.
However, if you are willing to review a few targetted PRs, I would be glad to make them.
great, understood, and def. happy to improve this/ review PRs, thanks for the offer!
Also just to give you a roadmap, we are dropping wxPython soon (by early Q1 of 2022) - it's been a pain for years, the alpha replacement demo is here, if you want to use (then just use dlc headless) in the meantime: https://github.com/DeepLabCut/napari-DeepLabCut. In short, we will be moving to vispy.
vispy has a large grant from CZI, I think it will be a good option. Could you elaborate? "I think that conda packages for deeplabcut should be available pretty soon." i.e., we don't want to package DLC on conda actually, we would like to stay with pip....
and just to reiterate, the docker version might be what you want ultimately
Yes the CZI has been quite active in moving Vispy and other packages in the scientific python environment forward. I think it will be greatly appreciated.
My general concern is not so much with vispy development, but more with widespread integration with other packages and larger system dependencies. Qt is quite painful to package, and has, over the years, grown to be larger and larger.
As for the the conda package. I'm requesting the following package to be merged into conda-forge conda-forge/staged-recipes#16559
Lets discuss that: #1549
Hello @MMathisLab and @hmaarrfk
I am facing the exact issue as well, as I am trying to integrate DeepLabCut in a larger GUI project to do animal tracking.
Is there any progress on this issue/feature?
Activity
MMathisLab commented on Oct 17, 2021
Hi @hmaarrfk our users are typically using this as an full project management software as well as DL based pose estimation; if you want headless you can pip install deeplabcut or use pip install deeplabcut-docker, which might better suit your use cases? https://deeplabcut.github.io/DeepLabCut/docs/docker.html
hmaarrfk commented on Oct 17, 2021
Hello. Thanks for the quick reply.
The pip installation works great! Thank you for making that easy!
I understand that the "full project management GUI" experience is critical to your users. I do not want to take that away in the slightest (I would also be happy to help on that front too looking into the problems I am facing here I found a few places that could use touchups on the GUI front that I am happy to contribute).
Unfortunately, as soon as we import deeplabcut into an other workflow that might want to use a different backend for matplotlib (for some interactive plotting), the statements in the __init__.py change which backend is used and causes very strange behavior.
Please see the attached screenshot where a user may want to use matplotlib in a jupyter notebook, but gets strange behavior as soon as they introduce deeplabcut into their analysis pipeline.
This leads to rather tricky behavior (bugs or "features") to debug.
Finally, the try: expect statement to attempt to detect the wx library is also rather difficult to deal with when working in a larger project. It means that the selected backend of the library now might
I understand that your users are often running deeplabcut with the command:
I understand how critical this is.
I can help ensure that this workflow remains unchanged.
Most of what it will involve is delaying the calls:
import wx mpl.use("WxAgg")to the desired entry points of the GUI.
I know this isn't "easy" and there are likely many knock-on effects that I cannot appreciate easily. However, if you are willing to review a few targetted PRs, I would be glad to make them.
Thank you again for considering.
.
MMathisLab commented on Oct 17, 2021
thanks for the further info!
Also just to give you a roadmap, we are dropping wxPython soon (by early Q1 of 2022) - it's been a pain for years, the alpha replacement demo is here, if you want to use (then just use dlc headless) in the meantime: https://github.com/DeepLabCut/napari-DeepLabCut. In short, we will be moving to vispy.
hmaarrfk commented on Oct 17, 2021
vispy and qt ate great! i just hope that they survive long enough.
we have enough trouble migrating to newer versions there too.
As for making the installation process easier. I think that conda packages for deeplabcut should be available pretty soon.
MMathisLab commented on Oct 17, 2021
vispy has a large grant from CZI, I think it will be a good option. Could you elaborate? "I think that conda packages for deeplabcut should be available pretty soon." i.e., we don't want to package DLC on conda actually, we would like to stay with pip....
and just to reiterate, the docker version might be what you want ultimately
hmaarrfk commented on Oct 17, 2021
Yes the CZI has been quite active in moving Vispy and other packages in the scientific python environment forward. I think it will be greatly appreciated.
My general concern is not so much with vispy development, but more with widespread integration with other packages and larger system dependencies. Qt is quite painful to package, and has, over the years, grown to be larger and larger.
As for the the conda package. I'm requesting the following package to be merged into conda-forge
conda-forge/staged-recipes#16559
Lets discuss that: #1549
MMathisLab commented on Nov 6, 2021
https://github.com/DeepLabCut/napari-DeepLabCut here is the new GUI @hmaarrfk - still happy to review a PR moving the import wx mpl.use("WxAgg") is useful in the meantime.
davidmurray commented on Jan 31, 2022
Hello @MMathisLab and @hmaarrfk
I am facing the exact issue as well, as I am trying to integrate DeepLabCut in a larger GUI project to do animal tracking.
Is there any progress on this issue/feature?
Thank you very much,
David
hmaarrfk commented on Jan 31, 2022
i've mostly just not installed wx with deeplabcut :/.