backprop64 / DAMM

A codebase for tracking laboratory mice in videos
9 stars 0 forks source link

Clarify local installation #1

Closed matiasandina closed 4 days ago

matiasandina commented 7 months ago

Thanks for such a promising tool. We are considering the local install so that we don't have to upload a lot of videos to Google Drive to run in the Colab Notebook.

There are a few hiccups here and there. It may be easier for you to modify than for us to submit a pull request.

Install missing cd and conda activate

$ conda create -n DAMM python=3.9 
$ git clone https://github.com/backprop64/DAMM 
$ conda activate DAMM <- missing env activation
$ cd DAMM <- missing change directory here ? 
$ pip install -r requirements-gpu.txt
$ python DAMM/setup_gpu.py install 

I copied and pasted without looking too closely and was hit with pytorch installation errors because my (base) python is not 3.9. I know this is silly, but it took me a bit to realize I hadn't activated the environment! That one line would prevent another silly me from the future to go into that rabbit hole :smile: .

Cuda compatibility

I think the packge is mostly made to run in colab since cuda requirements are 113. But we have other cuda versions. These issues are not due to the package itself, but the requirements are be incompatible with the latest stable pytorch/cuda (right now, https://pytorch.org/get-started/locally/ gets you to install cuda 11.8 or 12.1). Installing via requirements.txt will fail if cuda is not compatible. So I had to install torch from the link above. That install got me to building detectron2 from source as recommended in their INSTALL.md. Things are a bit more difficult if building in a Windows Environment as it might not be supported.

I couldn't build detectron2 from source in this machine, I will keep trying but I would appreciate some guidance, if you have tried to install this at all on a windows build.

Config and network weight files

If I understand correctly, we would need to do a version of this and have it on a path of our choosing.

!wget https://www.dropbox.com/s/39a690qldduxawz/DAMM_weights.pth
!wget https://www.dropbox.com/s/wegw8l5zq3vqln0/DAMM_config.yaml

Maybe clarifying this on the README.md or making the package weights and config could help?

Also, in config.yaml there are some hard-coded paths, not sure if these would transfer properly to a local instance.

  WEIGHTS: /nfs/turbo/justincj-turbo/kaulg/behavior-toolbox/paper/mgen_hp_search/train_ratio_1500/lr_0.001_wd_0.001/training/model_final.pth
OUTPUT_DIR: /nfs/turbo/justincj-turbo/kaulg/behavior-toolbox/paper/mgen_hp_search/train_ratio_1500/lr_0.001_wd_0.001/training
backprop64 commented 7 months ago

Thank you so much for the feedback and suggestions, they are all great, I will get to this in the coming week!

matiasandina commented 7 months ago

Any update on this?

On Thu, Feb 22, 2024, 19:46 Gaurav Kaul @.***> wrote:

Thank you so much for the feedback and suggestions, they are all great, I will get to this in the coming week!

— Reply to this email directly, view it on GitHub https://github.com/backprop64/DAMM/issues/1#issuecomment-1960583342, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZF2N75FCASZEYQQ4DBCADYU7RHTAVCNFSM6AAAAABDI74MKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQGU4DGMZUGI . You are receiving this because you authored the thread.Message ID: @.***>

backprop64 commented 4 days ago

I made some sagnificant updates to the repo with a new installation setup! the new tracking uses SAM2 and I added an updated model weights setup setup aswell. the new version has a slightly different install with more detailed steps aswell! to use the last version with SORT tracking you can check out the notebooks