lambdaloop / anipose

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

Anipose doesn't use GPU #138

Open RiSpa5 opened 4 months ago

RiSpa5 commented 4 months ago

Hi everyone, I installed Anipose on a PC following the same procedure I did for my first installation in another PC. This time, however, Anipose doesn't use the GPU when it comes to analyze videos although DeepLabCut correctly uses the GPU. I have no idea on how or why this should happen and haven't found a similar issue on github or anywhere else. So any help or suggestion is deeply appreciated :)

briah1212 commented 3 months ago

I went into the DLC env lib files and edited the deeplabcut.analyze() function, adding the gputouse=2 parameter. Not sure if there are other issues, but I just added the ID of my GPU and it runs fine now.

Scottydoesntkno commented 4 weeks ago

@briah1212 Hey I was trying to find DLC env Lib files but im having trouble. Where exactly did you edit the deeplabcut.analyze() function?

briah1212 commented 4 weeks ago

It's the anipose pose_video file that calls on DLC library for pose estimation. It should be in your environment python packages. On Linux with anaconda it looks something like this

/home/user/.conda/envs/DEEPLABCUT/lib/python3.9/site-packages/anipose/pose_videos.py On line 63

deeplabcut.analyze_videos(config_name, batch, videotype=video_ext, save_as_csv=True, destfolder=outdir, TFGPUinference=False, gputouse=2)