jkboyce / hawkeye

Hawkeye juggling video analysis
MIT License
13 stars 0 forks source link

How to run in Linux? #2

Open stapa opened 1 year ago

stapa commented 1 year ago

Hello, I tried to run the application in Ubuntu, but I have the following problem:

:~$ python Hawkeye.py 

Traceback (most recent call last):
  File "Hawkeye.py", line 10, in <module>
    from hawkeye.mainwindow import HEMainWindow
  File "/home/stapa/.local/lib/python2.7/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ImportError: No module named hawkeye.mainwindow

Could you help me?

jkboyce commented 1 year ago

Hi @stapa ! For starters you'll want to use Python 3 instead of Python 2. Try python3 Hawkeye.py as a starting point.

Running Hawkeye without a packaged binary is challenging because of all the dependencies: Qt, OpenCV, ffmpeg. I haven't built a binary for Linux yet. (And the binary for macOS doesn't work on Apple silicon, which is a separate issue.) All things on my long to-do list. :)

That said, if you're intrepid you could get it to work! I can try to help if you run into problems.

stapa commented 1 year ago

Hi @jkboyce , thanks for the help. I tried python3, installed some dependencies and made two symlinks:

pip3 install PySide2
pip3 install numpy
pip3 install scikit-build
pip3 install --upgrade pip setuptools wheel
pip3 install opencv-python
sudo ln -sf /usr/bin/ffprobe /usr/local/bin/ffprobe
sudo ln -sf /usr/bin/ffmpeg /usr/local/bin/ffmpeg

Hawkeye now works, but video processing failed:

Video scanner starting...
Object detection starting...
Scanning from video /home/stapa/Video/__Hawkeye__/1month_640x480.mp4

####### Error during scanning #######
Error message: Error opening video file /home/stapa/Video/__Hawkeye__/1month_640x480.mp4

##### An error occurred while processing video #####
Error: Error opening video file /home/stapa/Video/__Hawkeye__/1month_640x480.mp4

Any advice on how to solve or debug this? The same video is processed correctly in Windows.