Repository navigation
Closed
Labels
Tensorflow 2bugSomething isn't workinggpumore-data-requested-by-usWe would like to get more data to answer
Description
Is there an existing issue for this?
- I have searched the existing issues
Operating System
Windows 11 Pro
DeepLabCut version
2.2.3
What engine are you using?
tensorflow
DeepLabCut mode
multi animal
Device type
NVIDIA RTX 4500 Ada Generation
Bug description 🐛
I'm analyzing new videos using a project developed on DLC 2.3.5.
Though I believe the GPU / driver / cuda are all set up, I worry they're not being accessed during the analysis, or that there's another reason why it's going so slowly that there's no progress made after ~an hour. Are there other causes behind this, and/or is my GPU actually not working during the analysis?
Steps To Reproduce
- In DLC 2.2.3, open a project from DLC 2.3.5.
- Add new videos and extract frames.
- Analyze videos.
- See error.
Relevant log output
1. Log Output 1
(deeplabcut) C:\Users\pravi>python -m deeplabcut
Loading DLC 2.2.3...
Starting GUI...
DLC network loading and video analysis starting ...
Using snapshot-100000 for model D:\ResidentIntruder0930\residentintruder3-SG-2025-10-01\dlc-models\iteration-0\residentintruder3Oct1-trainset95shuffle1
C:\Users\pravi\AppData\Local\anaconda3\envs\deeplabcut\lib\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 '
Activating extracting of PAFs
2026-05-31 16:20:48.009697: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2026-05-31 16:20:48.033823: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:357] MLIR V1 optimization pass is not enabled
2026-05-31 16:21:12.321880: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at save_restore_v2_ops.cc:228 : OK: D:\ResidentIntruder0930\residentintruder3-SG-2025-10-01\dlc-models\iteration-0\residentintruder3Oct1-trainset95shuffle1\train\snapshot-100000.data-00000-of-00001; No error
Starting to analyze % D:\R-I_2 -Videos\20260331_NR2A_cKO_363_D1.mp4
Loading D:\R-I_2 -Videos\20260331_NR2A_cKO_363_D1.mp4
Duration of video [s]: 620.61 , recorded with 29.84 fps!
Overall # of frames: 18519 found with (before cropping) frame dimensions: 1920 1080
Starting to extract posture from the video(s) with batchsize: 8
0%| | 0/18519 [00:00<?, ?it/s]
2. Log Output 2
PS C:\Users\pravi> nvidia-smi
Sun May 31 16:34:10 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 573.44 Driver Version: 573.44 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA RTX 4500 Ada Gene... WDDM | 00000000:01:00.0 On | Off |
| 30% 32C P8 7W / 210W | 999MiB / 24570MiB | 3% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+Anything else?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Tensorflow 2bugSomething isn't workinggpumore-data-requested-by-usWe would like to get more data to answer
Activity
deruyter92 commentedon Jun 1, 2026
Hi @pvarsharavi,
To find out whether your GPU is being used, you can try the following things:
nvidia-smionce, you can open a separate terminal and runwatch nvidia-smito monitor the use of your GPU in real time.Some additional questions:
I am assuming you use a readily trained model from a different project (trained in DLC 2.3.5), is that correct? Which model did you train? Can you confirm the same issue happens when you train a new model instead of running the analysis with a trained model? Can you provide the exact settings you use for the
analyze_videosstep? Do you use the GUI or Python scripts to run your analysis? If you use Python, can you list the exact command? Are you bound to TensorFlow, or would you be happy to use our newest PyTorch models?DeepLabCut 3.0
To profit from the latest developments, you could also install DeepLabCut version 3.0, and train a new model using PyTorch. This backend is a bit faster and contains a variety of new models. Your data can be used directly, in the same way that you are used to. To install:
pvarsharavi commentedon Jun 9, 2026
Hi @deruyter92,
I've attached a screenshot of the nvidia-smi command and DLC analysis concurrently with regards to the GPU issues, and below an attempt analyzing with the new project (a much smaller version). As far as the other questions.
pvarsharavi commentedon Jun 24, 2026
Hi @deruyter92 @C-Achard ,
Just following up on this!
pvarsharavi commentedon Jul 8, 2026
Hi @deruyter92 @C-Achard ,
Just following up on this again. This issue has been a roadblock in our continuing this project, and we'd love to get it resolved ASAP.
deruyter92 commentedon Jul 9, 2026
Apologies for the delay.
Good to know that the problem seems specific to the ported model (as a freshly trained model works fine). Also, your GPU is likely not the problem. Still it is difficult to pinpoint the specific cause at this point. A few follow-up questions to help you fix the problem or find a workaround:
3 Do you see any stale partial output files? e.g.
*_full.pickle,*_assemblies.pickleor.h5in the video folder?pvarsharavi commentedon Jul 9, 2026
Hi @deruyter92, no worries!
a) (deeplabcut) C:\Users\pravi>python -m deeplabcut
Loading DLC 2.3.5...
DLC loaded in light mode; you cannot use any GUI (labeling, relabeling and standalone GUI)
You installed DLC lite, thus GUI's cannot be used. If you need GUI support please: pip install 'deeplabcut[gui]''
b) I've attached a screenshot of the memory issue below! It doesn't seem to be fully obstructing the analysis, but I'd appreciate any advice on how to address it -- with that said, it would be ideal if we could run the analysis on the new computer, as the old computer is shared between collaborators.
pose_cfg.yaml
pose_cfg.yaml
deruyter92 commentedon Jul 10, 2026
@pvarsharavi thank you for sharing!
Nothing odd in these configurations or your data description. Good to understand the context for your installation choices, thanks for clarifying. Here are the directions I would advice you to choose from:
Option 1: Install DLC 2.3.5
Based on this information, I would recommend as a first step that you try running the DLC 2.3.5 in 2.3.5. This would really confirm that it is a porting issue where you try to run a new model in an old version of DeepLabCut. Have you tried installing DLC 2.3.5 in a fresh conda environment with the gui? The proper way to do it is using the command
pip install "deeplabcut[gui]==2.3.5". If you see the message that the GUI cannot be used, you've probably used a different command.Option 2: Diagnose the porting problem
In principle, we don't support downgrading in the sense that we guarantee newer models to run in older versions of DeepLabCut. But if you are dedicated to this as your preferred path, you can continue diagnosing the issue. To me it still seems odd that you have zero issues when running the exact same model trained in your currently installed DeepLabCut version 2.2.3. Are you sure that you are comparing the same conda environments? If not, can you rule out that your CUDA installation is incorrect in the failing environment? See my previous suggestion:
you could also try:
More things to try:
ffmpeg -i "yourvideo.mp4" -vf scale=960:540 "youroutput.mp4")Option 3: Install DLC 3.0
Since the last time you tried, there have been many improvements to the code, so it is worth to try. For inference, the previously trained TensorFlow model should normally work. If you are willing to use PyTorch that would even be better. The solution to the issue that you mentioned in #3089 (NaN values in your loss curves) is likely solved by tuning your training with a less aggressive learning rate. You can also try one of our different models. We try to deliver an out-of-the-box solution for everyone, but unfortunately in a few cases some trial-and-error is required.
The best we can do is fix specific and reproducable issues so the code works better in future versions. I really hope that option 1 or option 3 work for you. Option 1 should be the lowest-effort.
As you may have noticed it is difficult for us to help you with option 2 when we cannot reproduce the issue ourselves. Based on your model configuration and data description I cannot find anything odd, so it might be something specific to your TensorFlow / CUDA installations that prevents you from porting the model to an older version successfully, but this will require some proper diagnosis and possibly Python debugging (e.g. beginning with the commands I mentioned).
Please keep me posted on the results. We'll do our best effort to help you find a workaround!
pvarsharavi commentedon Jul 10, 2026
Hi @deruyter92,
Thank you so much for the detailed response! Ideally we can integrate option 3 into our workflow going forward, so I'll start working on that.
My initial attempt with option 1 did successfully install DLC 2.3.5 GUI (in a separate conda environment on the new computer), but upon using 'python -m deeplabcut' to open the GUI, I ran into this error. Just wanted to reach out and ask if there's a specific installation / version of tensorflow I should use to ensure everything continues running smoothly.
(deeplabcut235) C:\Users\pravi>python -m deeplabcut
Traceback (most recent call last):
File "C:\Users\pravi\AppData\Local\anaconda3\envs\deeplabcut235\lib\runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\pravi\AppData\Local\anaconda3\envs\deeplabcut235\lib\runpy.py", line 144, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:\Users\pravi\AppData\Local\anaconda3\envs\deeplabcut235\lib\runpy.py", line 111, in get_module_details
import(pkg_name)
File "C:\Users\pravi\AppData\Local\anaconda3\envs\deeplabcut235\lib\site-packages\deeplabcut_init.py", line 16, in
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
C-Achard commentedon Jul 13, 2026
@pvarsharavi Hello again, you're likely missing the
tfextra, so the installation command should be:pip install "deeplabcut[gui,tf]==2.3.5"Please refer to the docs for the basics of installation, the 3.0 docs should be mostly valid for 2.3.5, aside from the fact that the only available TensorFlow extra is
tf, other extras making installation easier for specific CUDA versions were added with 3.0.C-Achard commentedon Jul 13, 2026
(If you'd like to rebuild 2.3.5 docs locally so you can browse them directly, let me know! It's relatively easy to do so)
pvarsharavi commentedon Jul 16, 2026
Hi @C-Achard ,
Thank you so much! That cleared that up. I was able to open it successfully, but I just wanted to check in as to this warning message -- I assume this means it's not being accessed when starting DLC, is there any way to rectify this so it doesn't slow down the analysis later on?
(deeplabcut235) C:\Users\pravi>python -m deeplabcut
2026-07-16 14:55:19.842968: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2026-07-16 14:55:19.843175: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Loading DLC 2.3.5...
C-Achard commentedon Jul 17, 2026
Hello again @pvarsharavi,
It seems you may not have the CUDA version that the TF version requires/is built for, though it may be supported by your GPU.
Can you run in your env:
The GPU list will likely be empty. It might be best for us to see the output before we suggest how to (re)install TensorFlow though, so as to know where the problem lies exactly and avoid breaking the env.
Best,
Cyril
pvarsharavi commentedon Jul 17, 2026
Hi @C-Achard ,
Just ran it -- and like you said, the GPU list was empty. Thank you for all your help with this so far!
Best,
Varsha Ravi
Full output:
deruyter92 commentedon Jul 20, 2026
Thanks @pvarsharavi,
TensorFlow support for Windows has stopped after version 2.10. As a best-effort, we try to support TensorFlow installations still, but this is becoming harder with newer hardware that relies on modern drivers. You have relatively new hardware (RTX 4500 Ada), which can be badly compatible with older CUDA drivers. The symptoms that you are seeing are the result of trying to install an old DeepLabCut version with an old TensorFlow version that relies on old CUDA drivers, on a Windows with a relatively modern GPU. This is an unlucky combination that is not guaranteed to work unfortunately..
You can still try, by installing TensorFlow before installing DeepLabCut in a fresh conda environment, together with
cudatoolkitandcudnn. Maybe you can search online for more help on this regard. An alternative is installing Linux on your machine using WSL (Windows Subsystem for Linux). Which would allow you to install a newer TensorFlow version. Anyway, some trial-and-error may still be required. Unfortunately we will not be able to help you with this.What we would recommend for the longer term is to use our PyTorch pipeline, included in the newest DeepLabCut installation. Which is relatively straightforward to install, works with modern hardware, and has long-term support.
I am sorry that we could not help you further with your TensorFlow installation. I hope these tips help.
pvarsharavi commentedon Jul 20, 2026
Hi @deruyter92 ,
That makes sense -- thank you so much for all your help so far in elucidating the core issue here.
I had a quick follow-up question. By switching to the Pytorch pipeline, would we have to create and train a new project in order to achieve successful analysis, or would it be possible to run the preexisting project on the newest DLC going forward? We invested a lot of time and effort into labelling frames for the original project, so I just want to check if it's possible to preserve that at all.
If not, I'll play around with the other fix and begin the process of a new project. Once again, thank you so much for everything!
deruyter92 commentedon Jul 21, 2026
@pvarsharavi,
The most clean start would be to create a new project, but the existing project can also be opened with DeepLabCut 3.0 if that is easier for you. In both cases you can use your prior labeled data directly - no need for relabeling! Just your prior TF shuffles cannot be used without a working TensorFlow installation, but creating new shuffles to train a PyTorch model should work without a problem.
Closing the current issue for now. Good luck with your project and please feel free to (re-)open any issue if you are still encountering issues with DLC 3.0. We are actively maintaining it and are very happy with feedback!
pvarsharavi commentedon Jul 21, 2026
Hi @deruyter92 ,
Thank you for the help! Ran into these issues trying to install the DLC 3.0 GUI. I followed the instructions for NVIDIA GPU PyTorch installation (the first output), which I believe was successful, before running into an issue with "pip install deeplabcut[gui]"
I've also faced similar issues trying to install it with TensorFlow (pip install deeplabcut[gui,tf]), with the same numpy error. Thank you!
deruyter92 commentedon Jul 22, 2026
@pvarsharavi I think you've installed python 3.13. DeepLabCut is not compatible yet with that python version. Also, cuda 13 wheels should be fine, but just to be sure I'd go for cuda 12.8.
These steps should install you everything you need:
conda create -n dlc3 python=3.12 conda activate dlc3 pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128 pip install "deeplabcut[gui]"pvarsharavi commentedon Jul 22, 2026
Hi @deruyter92 ,
Thank you so much -- that worked and I was able to create a new training dataset and start working on that. Unfortunately, with a learning rate of 0.005, I'm running into the same issues as before with an increasing RMSE and stagnant (though it would probably decrease if I continued with training) mAP/mAR.
As I was able to successfully train this project on 2.3.5, it seems less likely that it's an issue of data quality. Referencing the previous ticket, I'd like to reduce the initial learning rate and use loss curves to decide what the next steps here are -- is there an option to plot these within DLC 3.0? Also, given these results, would you also recommend using the loss curves to guide the course of action, or is there a different path I should take to achieve successful training?
deruyter92 commentedon Jul 28, 2026
I re-opened issue #3089 to discuss this!