DeepLabCut / DeepLabCut-live-GUI

GUI to run DeepLabCut on live video feed
GNU General Public License v3.0
52 stars 20 forks source link

Installing on Jetson Xavier AGX #8

Open darioringach opened 3 years ago

darioringach commented 3 years ago

All good until last step... and then:

(dlc-live) dario@dario-jetson:~$ pip install deeplabcut-live Collecting deeplabcut-live Downloading deeplabcut_live-1.0-py3-none-any.whl (28 kB) Collecting numpy<1.19.0 Downloading numpy-1.18.5.zip (5.4 MB) |████████████████████████████████| 5.4 MB 13.5 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Collecting ruamel.yaml Downloading ruamel.yaml-0.16.13-py2.py3-none-any.whl (111 kB) |████████████████████████████████| 111 kB 9.9 MB/s Collecting pillow Downloading Pillow-8.1.2-cp36-cp36m-manylinux2014_aarch64.whl (2.1 MB) |████████████████████████████████| 2.1 MB 14.9 MB/s Collecting colorcet Downloading colorcet-2.0.6-py2.py3-none-any.whl (1.6 MB) |████████████████████████████████| 1.6 MB 15.5 MB/s Collecting opencv-python Downloading opencv_python-4.5.1.48-cp36-cp36m-manylinux2014_aarch64.whl (34.5 MB) |████████████████████████████████| 34.5 MB 22 kB/s Collecting tqdm Downloading tqdm-4.59.0-py2.py3-none-any.whl (74 kB) |████████████████████████████████| 74 kB 2.0 MB/s Collecting tables Downloading tables-3.6.1.tar.gz (4.6 MB) |████████████████████████████████| 4.6 MB 12.9 MB/s Collecting deeplabcut-live Downloading deeplabcut_live-0.0.3-py3-none-any.whl (39 kB) Collecting numpy Downloading numpy-1.19.5-cp36-cp36m-manylinux2014_aarch64.whl (12.4 MB) |████████████████████████████████| 12.4 MB 10.8 MB/s Collecting deeplabcut-live Downloading deeplabcut_live-0.0.2-py3-none-any.whl (42 kB) |████████████████████████████████| 42 kB 404 kB/s Downloading deeplabcut_live-0.0.1-py3-none-any.whl (29 kB) Downloading deeplabcut_live-0.0-py3-none-any.whl (39 kB) Collecting py-cpuinfo==5.0.0 Downloading py-cpuinfo-5.0.0.tar.gz (82 kB) |████████████████████████████████| 82 kB 221 kB/s Collecting pandas Downloading pandas-1.1.5-cp36-cp36m-manylinux2014_aarch64.whl (9.5 MB) |████████████████████████████████| 9.5 MB 9.4 MB/s Collecting pyct>=0.4.4 Downloading pyct-0.4.8-py2.py3-none-any.whl (15 kB) Collecting param>=1.7.0 Downloading param-1.10.1-py2.py3-none-any.whl (76 kB) |████████████████████████████████| 76 kB 3.8 MB/s Collecting pytz>=2017.2 Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB) |████████████████████████████████| 510 kB 14.2 MB/s Collecting python-dateutil>=2.7.3 Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB) |████████████████████████████████| 227 kB 14.5 MB/s Collecting six>=1.5 Downloading six-1.15.0-py2.py3-none-any.whl (10 kB) Collecting ruamel.yaml.clib>=0.1.2 Downloading ruamel.yaml.clib-0.2.2-cp36-cp36m-manylinux2014_aarch64.whl (540 kB) |████████████████████████████████| 540 kB 12.8 MB/s Collecting numexpr>=2.6.2 Downloading numexpr-2.7.3-cp36-cp36m-manylinux2014_aarch64.whl (481 kB) |████████████████████████████████| 481 kB 15.4 MB/s Using legacy 'setup.py install' for py-cpuinfo, since package 'wheel' is not installed. Using legacy 'setup.py install' for tables, since package 'wheel' is not installed. Installing collected packages: six, param, numpy, ruamel.yaml.clib, pytz, python-dateutil, pyct, numexpr, tqdm, tables, ruamel.yaml, py-cpuinfo, pillow, pandas, colorcet, deeplabcut-live Running setup.py install for tables ... error ERROR: Command errored out with exit status -4: command: /home/dario/dlc-live/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p9_amnr6/tables_db97b7244bac4c15a79f2d6898028816/setup.py'"'"'; file='"'"'/tmp/pip-install-p9_amnr6/tables_db97b7244bac4c15a79f2d6898028816/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-wtlkb57w/install-record.txt --single-version-externally-managed --compile --install-headers /home/dario/dlc-live/include/site/python3.6/tables cwd: /tmp/pip-install-p9_amnr6/tables_db97b7244bac4c15a79f2d6898028816/ Complete output (188 lines):

arge-7 commented 3 years ago

I've had a heck of a time getting it to run on my Jetson as well. Once I finally got it up and running, I found that I couldn't get it to run CSI cameras because I couldn't figure out how to modify the opencv code. I'm just about done with everything Jetson-related. Seems like 10% of my time on them is actually normal function, and 90% endless tabs of stack exchange troubleshooting.

darioringach commented 3 years ago

@arge-7 Yes, I feel your pain... and yet, the Jetson looks such a good fit for this it may be worth one more attempt.
Did you see this example? https://github.com/JetsonHacksNano/CSI-Camera

darioringach commented 3 years ago

Hmmm... maybe libhdf5-serial-dev is missing from the dependencies? I will try tomorrow.

gkane26 commented 3 years ago

Also can you try installing directly from github: pip install git+https://github.com/DeepLabCut/DeepLabCut-live-GUI? There are some platform-specific dependencies, like PyTables, that I think aren't specified correctly for installing from PyPi. There has been a lot more testing of this install procedure locally/from github, so give it a shot and maybe it will ignore these issues with PyTables. And hopefully we can fix these issues with installing from PyPi soon :)

darioringach commented 3 years ago

pip install git+https://github.com/DeepLabCut/DeepLabCut-live-GUI

Runs into --

Running setup.py install for tables ... error ERROR: Command errored out with exit status -4: command: /home/dario/dlc-live/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aoqh93l7/tables_d01f396902fb44cbaa0a58ac73e4d5cd/setup.py'"'"'; file='"'"'/tmp/pip-install-aoqh93l7/tables_d01f396902fb44cbaa0a58ac73e4d5cd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-ufjhl_tb/install-record.txt --single-version-externally-managed --compile --install-headers /home/dario/dlc-live/include/site/python3.6/tables cwd: /tmp/pip-install-aoqh93l7/tables_d01f396902fb44cbaa0a58ac73e4d5cd/ Complete output (188 lines):

gkane26 commented 3 years ago

My bad -- tables is still a dependency for DeepLabCut-live-GUI on Jetson, but it shouldn't be for DeepLabCut-live. You could try to install just deeplabcut-live from github: pip install git+https://github.com/DeepLabCut-live, but you'll probably still run into this issue installing PyTables when installing the GUI package. hdf5 should have been installed in earlier steps according to [DeepLabCut-live Jetson install instructions] (https://github.com/DeepLabCut/DeepLabCut-live/blob/master/docs/install_jetson.md). Did these earlier steps complete successfully?

arge-7 commented 3 years ago

So does deeplabcut-live work for you? I remember that when I was having trouble getting the GUI version to run, I fixed it by doing a clean installation of live and then live GUI, mostly per the Github instructions except for some dependency annoyances.

darioringach commented 3 years ago

Yes, earlier steps completed. It seems HDF5 gets installed in a non-standard location. Trying to see if I can fix with an environment variable (HDF5_DIR) pointing in the right direction.

darioringach commented 3 years ago

Ok... that seemed to fix tables -- but now it got stuck downloading multiple versions of pretty much everthing to determiine compatibility requirements....

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking

darioringach commented 3 years ago

Oh well.... giving up on the Jetson for now. Happy to try again when installation kinks are worked out. @arge-7 did it work for you at least with USB cameras?

arge-7 commented 3 years ago

I actually never tried that because I needed to use specific raspberry pi IR cameras for my use case. I did get dlcllive and dlclivegui up and running eventually though. Just never got to use a camera with it. I may come back to trying to get the CSI cameras to work because I think I've found some code that will fix the problem.

MMathisLab commented 3 years ago

HI all, be sure you are using python 3.6 not 3.8 btw!

darioringach commented 3 years ago

I'm using 3.6.9

darioringach commented 3 years ago

Yoohoo... It worked! But it didn't install the check_install --

(dlc-live) dario@dario-jetson:~$ dlc-live-test 
Traceback (most recent call last):
  File "/home/dario/dlc-live/bin/dlc-live-test", line 5, in <module>
    from check_install.check_install import main
ModuleNotFoundError: No module named 'check_install'

Did I skip something?

darioringach commented 3 years ago

Will a model developed with tensorflow 1.13.1 run with DLC Live and tensorflow 1.15.4?
Or is the incompatibility just between 1 and 2?

MMathisLab commented 3 years ago

It generally should be the exact same, it’s not just 1 v 2 sadly