lambdaloop / anipose

🐜🐀🐒🚶 A toolkit for robust markerless 3D pose estimation
http://anipose.org
BSD 2-Clause "Simplified" License
347 stars 65 forks source link

CPU Only issue #143

Open Scottydoesntkno opened 4 weeks ago

Scottydoesntkno commented 4 weeks ago

Hi,

I was wondering if someone could help me with this issue.

I can install anipose just fine with some workarounds but at the moment it's only using the CPU when I run anipose analyze command.

I have a 4070 super I would like to utilize the GPU has anyone found any solutions to this problem?

YUNoSol commented 3 weeks ago

Hi Scottydoesntkno

I have been problem solving different quirks with anipose for a bit, and I think I might have found a solution to your problem along the way

I'm also working with a 4070Ti super, and I found that if I installed anipose using the following commands, that it will utilize my GPU

conda create -n ENV-NAME python=3.7 conda activate ENV-NAME conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0 python -m pip install "tensorflow<2.11" pip install deeplabcut python -m pip uninstall opencv-python python -m pip install anipose conda install mayavi ffmpeg pip install --upgrade apptools

In my experience, I found that anipose analyze does not work if you install wxpython, so it is omitted on purpose.

I got the cuda and tf installation lines from here: https://www.tensorflow.org/install/pip#windows-native

This is assuming that you have already installed the correct driver for your GPU

I have attached the console output from creating my environment below: ap5_installation_output.txt

I hope this helps.

Best regards Sol

Scottydoesntkno commented 3 weeks ago

Sol,

Now Im trying to get past label-3d error: KeyError: 'traitsui.toolkits. Have you encountered this?


For anyone who runs into this OSError: [Errno 32] Broken pipe this is what I did.

conda remove ffmpeg conda install -c conda-forge ffmpeg

It just makes sure the FFmpeg is installed with paths correctly recognized by conda and Python scripts.

Side Note: May be due that I'm working w/ .mp4 files instead .avi

Cheers!, Miles

YUNoSol commented 3 weeks ago

Hi Miles!

I do not recall encountering the error you are mentioning (KeyError: 'traitsui.toolkits), but unfortunately I have not been able to get an environment that is capable of both anipose analyze and anipose labe-3d, so for now I have 2 separate environments. (label-3d requires wxpython, but if it is installed, anipose analyze stops working)

To be able to use anipose label-3d I made an environment using the following commands:

conda create -n ENV-NAME python=3.7 tensorflow=1.13.1 conda activate ENV-NAME python -m pip install -U pip setuptools pip install deeplabcut conda install -c anaconda wxpython python -m pip uninstall opencv-python python -m pip install anipose conda install mayavi ffmpeg pip install --upgrade tensorflow==1.15.0 pip install numpy==1.19 pip install tensorflow==2.6 pip uninstall mayavi conda uninstall vtk pip install vtk==8.1.2 pip install mayavi==4.7.3 pip uninstall apptools pip install --upgrade apptools


Thank you for the tip about OSError: [Errno 32] Broken pipe ! I encountered the same error when working on .MOV files (from the tutorial) so I do not think that it is the file-types fault, but your suggestion solved the problem, so thanks!

Best, Sol