Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error appears when loading a 3D project #2770

Open
2 tasks done
steviaa opened this issue Oct 30, 2024 · 6 comments
Open
2 tasks done

An error appears when loading a 3D project #2770

steviaa opened this issue Oct 30, 2024 · 6 comments
Assignees
Labels
3D questions/code issues regarding 3D DLC Installation

Comments

@steviaa
Copy link

steviaa commented Oct 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Bug description

I encountered a loading failure and an error when trying to load the project of the newly created 3D mode.
Is it because the versions of the related packages are not matched? How to fix it?

TypeError: 'PySide6.QtWidgets.QListWidget.addItems' called with wrong argument types:
PySide6.QtWidgets.QListWidget.addItems(NoneType)
Supported signatures:
PySide6.QtWidgets.QListWidget.addItems(Sequence[str])

packages in the environment:

Package                       Version
----------------------------- --------------
alabaster                     0.7.16
albumentations                1.4.3
anyio                         4.6.0
app-model                     0.2.8
appdirs                       1.4.4
argon2-cffi                   23.1.0
argon2-cffi-bindings          21.2.0
arrow                         1.3.0
asttokens                     2.4.1
async-lru                     2.0.4
attrs                         24.2.0
Babel                         2.14.0
beautifulsoup4                4.12.3
bleach                        6.1.0
Brotli                        1.1.0
build                         1.2.2
cached-property               1.5.2
cachey                        0.2.1
certifi                       2024.8.30
cffi                          1.17.1
charset-normalizer            3.3.2
click                         8.1.7
cloudpickle                   3.0.0
colorama                      0.4.6
comm                          0.2.2
contourpy                     1.3.0
cycler                        0.12.1
dask                          2024.9.1
dask-expr                     1.1.15
dask-image                    2024.5.3
debugpy                       1.8.6
decorator                     5.1.1
deeplabcut                    3.0.0rc4
defusedxml                    0.7.1
dlclibrary                    0.0.6
docker-pycreds                0.4.0
docstring_parser              0.16
docutils                      0.17.1
einops                        0.8.0
entrypoints                   0.4
exceptiongroup                1.2.2
executing                     2.1.0
fastjsonschema                2.20.0
filelock                      3.16.1
filterpy                      1.4.5
flexcache                     0.3
flexparser                    0.3.1
fonttools                     4.54.1
fqdn                          1.5.1
freetype-py                   2.5.1
fsspec                        2024.9.0
gitdb                         4.0.11
GitPython                     3.1.43
h11                           0.14.0
h2                            4.1.0
HeapDict                      1.0.1
hpack                         4.0.0
hsluv                         5.0.4
httpcore                      1.0.5
httpx                         0.27.2
huggingface-hub               0.25.1
hyperframe                    6.0.1
idna                          3.10
imageio                       2.35.1
imageio-ffmpeg                0.5.1
imagesize                     1.4.1
imgaug                        0.4.0
importlib_metadata            8.5.0
importlib_resources           6.4.5
in-n-out                      0.2.1
ipykernel                     6.29.5
ipython                       8.27.0
ipython_genutils              0.2.0
ipywidgets                    8.1.5
isoduration                   20.11.0
jedi                          0.19.1
Jinja2                        3.1.4
joblib                        1.4.2
json5                         0.9.25
jsonpointer                   3.0.0
jsonschema                    4.23.0
jsonschema-specifications     2023.12.1
jupyter                       1.1.1
jupyter_client                7.4.9
jupyter-console               6.6.3
jupyter_core                  5.7.2
jupyter-events                0.10.0
jupyter-lsp                   2.2.5
jupyter_server                2.14.2
jupyter_server_terminals      0.5.3
jupyterlab                    4.2.5
jupyterlab_pygments           0.3.0
jupyterlab_server             2.27.3
jupyterlab_widgets            3.0.13
kiwisolver                    1.4.7
lazy_loader                   0.4
llvmlite                      0.43.0
locket                        1.0.0
magicgui                      0.9.1
markdown-it-py                3.0.0
MarkupSafe                    2.1.5
matplotlib                    3.8.4
matplotlib-inline             0.1.7
mdurl                         0.1.2
mistune                       3.0.2
mpmath                        1.3.0
napari                        0.4.18
napari-console                0.0.9
napari-deeplabcut             0.2.1.7
napari-plugin-engine          0.2.0
napari-svg                    0.2.0
natsort                       8.4.0
nb_conda                      2.2.1
nb_conda_kernels              2.5.1
nbclassic                     1.1.0
nbclient                      0.10.0
nbconvert                     7.16.4
nbformat                      5.10.4
nest_asyncio                  1.6.0
networkx                      3.3
notebook                      6.5.7
notebook_shim                 0.2.4
npe2                          0.7.7
numba                         0.60.0
numexpr                       2.10.0
numpy                         1.26.4
numpydoc                      1.5.0
opencv-python                 4.10.0.84
opencv-python-headless        4.10.0.84
overrides                     7.7.0
packaging                     24.1
pandas                        2.2.3
pandocfilters                 1.5.0
parso                         0.8.4
partd                         1.4.2
patsy                         0.5.6
pickleshare                   0.7.5
pillow                        10.4.0
PIMS                          0.7
Pint                          0.24.3
pip                           24.2
pkgutil_resolve_name          1.3.10
platformdirs                  4.3.6
pooch                         1.8.2
prometheus_client             0.21.0
prompt_toolkit                3.0.48
protobuf                      5.28.2
psutil                        6.0.0
psygnal                       0.11.1
pure_eval                     0.2.3
py-cpuinfo                    9.0.0
pyarrow                       17.0.0
pycocotools                   2.0.8
pyconify                      0.1.6
pycparser                     2.22
pydantic                      1.10.18
pydantic-compat               0.1.2
Pygments                      2.18.0
PyOpenGL                      3.1.7
pyparsing                     3.1.4
pyproject_hooks               1.1.0
PySide6                       6.4.2
PySide6-Addons                6.4.2
PySide6-Essentials            6.4.2
PySocks                       1.7.1
python-dateutil               2.9.0
python-json-logger            2.0.7
pytz                          2024.2
pywin32                       306
pywinpty                      2.0.13
PyYAML                        6.0.2
pyzmq                         26.2.0
QDarkStyle                    3.1
qtconsole                     5.6.0
QtPy                          2.4.1
referencing                   0.35.1
requests                      2.32.3
rfc3339-validator             0.1.4
rfc3986-validator             0.1.1
rich                          13.8.1
rpds-py                       0.20.0
ruamel.yaml                   0.18.6
ruamel.yaml.clib              0.2.8
safetensors                   0.4.5
scikit-image                  0.24.0
scikit-learn                  1.5.2
scipy                         1.10.1
Send2Trash                    1.8.3
sentry-sdk                    2.14.0
setproctitle                  1.3.3
setuptools                    75.1.0
shapely                       2.0.6
shellingham                   1.5.4
shiboken6                     6.4.2
six                           1.16.0
slicerator                    1.1.0
smmap                         5.0.1
sniffio                       1.3.1
snowballstemmer               2.2.0
soupsieve                     2.5
Sphinx                        4.5.0
sphinxcontrib-applehelp       2.0.0
sphinxcontrib-devhelp         2.0.0
sphinxcontrib-htmlhelp        2.1.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          2.0.0
sphinxcontrib-serializinghtml 2.0.0
stack-data                    0.6.2
statsmodels                   0.14.3
superqt                       0.6.7
sympy                         1.13.3
tables                        3.8.0
terminado                     0.18.1
threadpoolctl                 3.5.0
tifffile                      2024.9.20
timm                          1.0.9
tinycss2                      1.3.0
tomli                         2.0.1
tomli_w                       1.0.0
toolz                         0.12.1
torch                         2.4.1+cu118
torchaudio                    2.4.1+cu118
torchvision                   0.19.1+cu118
tornado                       6.4.1
tqdm                          4.66.5
traitlets                     5.14.3
typer                         0.12.5
types-python-dateutil         2.9.0.20240906
typing_extensions             4.12.2
typing-utils                  0.1.0
tzdata                        2024.2
uri-template                  1.3.0
urllib3                       2.2.3
vispy                         0.12.2
wandb                         0.18.2
wcwidth                       0.2.13
webcolors                     24.8.0
webencodings                  0.5.1
websocket-client              1.8.0
wheel                         0.44.0
widgetsnbextension            4.0.13
win-inet-pton                 1.1.0
wrapt                         1.16.0
zipp                          3.20.2
zstandard                     0.23.0

Operating System

Windows 11

DeepLabCut version

3.0.0rc4

DeepLabCut mode

3d

Device type

gpu

Steps To Reproduce

-create a project
-load the newly created project

Relevant log output

TypeError                                 Traceback (most recent call last)
File E:\condaenv\DLC-GPU\lib\site-packages\deeplabcut\gui\window.py:536, in MainWindow._open_project(self)
    533     return
    535 open_project.loaded = True
--> 536 self._update_project_state(
    537     open_project.config,
    538     open_project.loaded,
    539 )

File E:\condaenv\DLC-GPU\lib\site-packages\deeplabcut\gui\window.py:507, in MainWindow._update_project_state(self, config, loaded)
    505 if loaded:
    506     self.add_recent_filename(self.config)
--> 507     self.add_tabs()

File E:\condaenv\DLC-GPU\lib\site-packages\deeplabcut\gui\window.py:599, in MainWindow.add_tabs(self)
    589 self.create_training_dataset = CreateTrainingDataset(
    590     root=self,
    591     parent=None,
    592     h1_description="DeepLabCut - Step 4. Create training dataset",
    593 )
    594 self.train_network = TrainNetwork(
    595     root=self,
    596     parent=None,
    597     h1_description="DeepLabCut - Train network",
    598 )
--> 599 self.evaluate_network = EvaluateNetwork(
    600     root=self,
    601     parent=None,
    602     h1_description="DeepLabCut - Evaluate Network",
    603 )
    604 self.analyze_videos = AnalyzeVideos(
    605     root=self, parent=None, h1_description="DeepLabCut - Analyze Videos"
    606 )
    607 self.unsupervised_id_tracking = UnsupervizedIdTracking(
    608     root=self,
    609     parent=None,
    610     h1_description="DeepLabCut - Optional Unsupervised ID Tracking with Transformer",
    611 )

File E:\condaenv\DLC-GPU\lib\site-packages\deeplabcut\gui\tabs\evaluate_network.py:62, in EvaluateNetwork.__init__(self, root, parent, h1_description)
     58 super(EvaluateNetwork, self).__init__(root, parent, h1_description)
     60 self.bodyparts_to_use = self.root.all_bodyparts
---> 62 self._set_page()

File E:\condaenv\DLC-GPU\lib\site-packages\deeplabcut\gui\tabs\evaluate_network.py:72, in EvaluateNetwork._set_page(self)
     70 self.main_layout.addWidget(_create_label_widget(""))  # dummy text
     71 self.layout_additional_attributes = _create_vertical_layout()
---> 72 self._generate_additional_attributes(self.layout_additional_attributes)
     73 self.main_layout.addLayout(self.layout_additional_attributes)
     75 self.ev_nw_button = QtWidgets.QPushButton("Evaluate Network")

File E:\condaenv\DLC-GPU\lib\site-packages\deeplabcut\gui\tabs\evaluate_network.py:161, in EvaluateNetwork._generate_additional_attributes(self, layout)
    157 self.plot_predictions.stateChanged.connect(self.update_plot_predictions)
    159 tmp_layout.addWidget(self.plot_predictions)
--> 161 self.bodyparts_list_widget = BodypartListWidget(root=self.root, parent=self)
    162 self.use_all_bodyparts = QtWidgets.QCheckBox("Compare all bodyparts")
    163 self.use_all_bodyparts.stateChanged.connect(self.update_bodypart_choice)

File E:\condaenv\DLC-GPU\lib\site-packages\deeplabcut\gui\components.py:87, in BodypartListWidget.__init__(self, root, parent)
     84 self.setMaximumHeight(500)
     85 self.hide()
---> 87 self.addItems(self.root.all_bodyparts)
     88 self.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
     90 self.itemSelectionChanged.connect(self.update_selected_bodyparts)

Anything else?

No response

Code of Conduct

@n-poulsen
Copy link
Collaborator

Hi @steviaa! Could you please run napari --info in your conda environment and let me know what it outputs so we can reproduce your issue?

@n-poulsen n-poulsen added more-data-requested-by-us We would like to get more data to answer 3D questions/code issues regarding 3D DLC labels Nov 5, 2024
@steviaa
Copy link
Author

steviaa commented Nov 6, 2024

Hi @n-poulsen , here is the output:

napari: 0.4.18
Platform: Windows-10-10.0.26100-SP0
Python: 3.10.15 | packaged by conda-forge | (main, Oct 16 2024, 01:15:49) [MSC v.1941 64 bit (AMD64)]
Qt: 6.4.2
PySide6:
NumPy: 1.26.4
SciPy: 1.10.1
Dask: 2024.10.0
VisPy: 0.12.2
magicgui: 0.9.1
superqt: 0.6.7
in-n-out: 0.2.1
app-model: 0.2.8
npe2: 0.7.7

OpenGL:
  - GL version:  4.6.0 NVIDIA 566.03
  - MAX_TEXTURE_SIZE: 32768

Screens:
  - screen 1: resolution 2560x1440, scale 1.0

Settings path:
  - C:\Users\Administrator\AppData\Local\napari\DEEPLABCUT_d8c61b0c9cba64283208f4435295ef60fdc487e9\settings.yaml
Plugins:
  - napari: 0.4.18 (77 contributions)
  - napari-console: 0.1.0 (0 contributions)
  - napari-deeplabcut: 0.2.1.7 (16 contributions)
  - napari-svg: 0.2.0 (2 contributions)

@n-poulsen
Copy link
Collaborator

Thanks @steviaa - we're looking into it :)

@n-poulsen n-poulsen removed the more-data-requested-by-us We would like to get more data to answer label Nov 6, 2024
@MMathisLab
Copy link
Member

just to be clear, it is not yet within DLC3-pytorch that 3D multi-animal is fully integrated into the GUI; for this use case I would recommend using the stable release of DLC.

@maximpavliv
Copy link
Collaborator

Hello @steviaa ,

You're right. At the moment, 3D projects are not supported in the GUI (neither in the stable version nor in DLC3).
Unfortunately, at this point, we don’t have a timeline for when it might be integrated to the GUI.

For now, you can work with 3D projects using Python scripts / Jupyter notebooks, you can check the typical workflow here.

@maximpavliv maximpavliv closed this as not planned Won't fix, can't repro, duplicate, stale Dec 3, 2024
@MMathisLab
Copy link
Member

We will certainly have 3D support in the GUI in early 2025, but right now our main focus is on the pytorch release

@MMathisLab MMathisLab reopened this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D questions/code issues regarding 3D DLC Installation
Projects
None yet
Development

No branches or pull requests

4 participants