amazon-science / siam-mot

SiamMOT: Siamese Multi-Object Tracking
Apache License 2.0
478 stars 61 forks source link

ModuleNotFoundError: No module named 'demos.demo_inference' #10

Open mandalvishal177 opened 3 years ago

mandalvishal177 commented 3 years ago

While running the following command on Google Colab:

!python /content/siam-mot/demos/demo.py --demo-video /content/drive/MyDrive/cars.mov --track-class person_vehicle --dump-video True

I get an error: from demos.demo_inference import DemoInference ModuleNotFoundError: No module named 'demos.demo_inference'

I have pip installed demos and all other requirements but still have this issue

bo-miao commented 3 years ago

My solution is to build a shell at the root path to run the python script.

Before the command to run the python script, add "cd ." at the first row to declare the path.

mandalvishal177 commented 3 years ago

I have declared the path already. However, adding cd . at the first row doesn't seem to change anything. The same error still persists.

bo-miao commented 3 years ago

I have declared the path already. However, adding cd . at the first row doesn't seem to change anything. The same error still persists.

  1. Move the demo.py to the root path of the folder
  2. Build the shell script with the following commands ''' cd . python demo.py --demo-video raw.mp4 --track-class person --dump-video True '''
sergiomallasen commented 3 years ago

@bo-miao Can you share your colab file on how to run this code? I'm unable to make siam-mot work on colab. Thanks

tuannino commented 3 years ago

Just add this code before that import ` import sys

sys.path.append('/path/to/the/siam-mot') `