mlfpm / deepof

DeepLabCut based data analysis package including pose estimation and representation learning mediated behavior recognition
MIT License
38 stars 6 forks source link

Dependency Issue in Colab #45

Closed erikamoore closed 2 months ago

erikamoore commented 4 months ago

Hello,

I was trying to run some of your Colab tutorials, like this one from your documentation, but encountered dependency issues.

Could you please attempt to run it on your end and consider updating the dependencies as needed?

Thank you.

NoCreativeIdeaForGoodUserName commented 4 months ago

Hi and thank you for your interest in deepOF. Could you please provide me with the exact errors you are getting? Which version of deepOF were you using? All dependencies are tested and updated as appropriate with each new version and we have automatic tests that ensure that the tutorials run correctly, so I suspect that what you are experiencing may be not only simple dependency issues but could be a bit more complicated.

Update: Again, thank you for drawing my attention to this. I ran a few tests, installing different versions of deepof, and it seems like the incorrect packages get installed for every one I tested. Just last week I ran some tests with deepof 0.6.0 and while it was working fine at the time it now seems to be broken like the other versions. Currently I am not sure what could have caused this, but I'll further investgate immediately.

Update 2: it seems that the problem is that for some packages currently the newest versions get pulled upon installation of deepof instead of the versions that the installation was tested on. In the specific case the dask and scipy package seem to be the problem, changing its versions back via

pip install dask==2024.5.0 pip install scipy==1.13.0

should solve the issue as all tutorials run correctly afterwards. I will close this issue as soon as the bug that causes the unwanted package updates is fixed.

Also: A new version of deepof, version 0.7, will be released soon (i.e. hopefully within the next few days). This version contains major speed ups, a lot of bug fixes and, importantly, will not be backwards compatible with previous versions. Respectively, if you just started using deepof it may make sense to wait until 0.7. is available before starting any real projects. The tutorials will not change by a lot, so practicing with them before is not an issue.

erikamoore commented 4 months ago

Thank you, that helps, and I was able to get a tutorial running. Just a quick question, while DeepOF seems to have been designed for rodents, can it can be applied to other animals, as well? I am working with SLEAP files from fish.

NoCreativeIdeaForGoodUserName commented 3 months ago

Thank you for the appreciation, we also patched the library issue with version 0.6.4 which is out now (so I will close this thread later, but wait for possible replies from you first).

If you also film your fish from above and have your tracked data in the correct format I would expect that you also could analyze fish with deepof. However, this still would be an "off-label"-use as we do currently test deepof exclusively with mouse data. From what comes to my mind, the main thing that could be a problem could be the areas. Also, you obviously could not use any pre-trained models (as they are trained with mice) and you would have to use a custom labeling scheme. In the end, as far as deepof is concerned, "mice" are only a graph of some connected bodyparts.

I am currently pretty busy with deepof 0.7, but after that I could offer to have a look at what deepof does with your fish videos specifically, if you want to share some of your videos + tables with us. In the long term we plan to expand to more different animaly anyways. You can contact me via

[e-mail removed to evade data scrapers]

erikamoore commented 3 months ago

Thank you, I really appreciate it. I will likely send some fish tables + videos your way in the coming weeks. Looking forward to learning more about deepof 0.7!

NoCreativeIdeaForGoodUserName commented 3 months ago

I appreciate your appreciation. We will include a multi-page changelog in the release. The main changes are:

I'll now proceed to close the issue.

LynCap commented 2 months ago

Hello,

I'm researching rat's behavior using DeepOf and so, I've been trying to run the tutorial "Formatting your data: feature extraction from motion tracking output" on Colab as well. Yet, even with the "!pip install dask==2024.5.0 / !pip install scipy==1.13.0" it still gives me incompatibility issues between different libraries versions, mostly with scipy and jax / jaxlib. Could you please guide me in what can I do to fix it? Please let me know if you need the specific error.

Thank you in advance for your time and patience.

Update 1: Never mind, I made it work, just needed to also add these lines:

!pip install jax==0.4.18 !pip install jaxlib==0.4.18

Thank you anyway

NoCreativeIdeaForGoodUserName commented 2 months ago

Hi again, since deepof 0.7 is out now these issues should be resolved. However, note that deepof 0.7 is not backwards compatible with earlier versions. Among other things, it offers faster processing and an updated data imputation. If you are not already too deep into setting up your project with the version you are using, I would suggest to use 0.7 instead.