VisualComputingInstitute / mots_tools

Tools for evaluating and visualizing results for the Multi Object Tracking and Segmentation (MOTS) task
MIT License
222 stars 45 forks source link

module import issues #9

Closed ahrnbom closed 4 years ago

ahrnbom commented 4 years ago

This might be out of scope of your code to fix, but when I try to run python mots_eval/eval.py ../output/ ../gt/ mots_eval/val_MOTSchallenge.seqmap

I get the following error:

Traceback (most recent call last):
  File "mots_eval/eval.py", line 3, in <module>
    from mots_common.io import load_seqmap, load_sequences
ModuleNotFoundError: No module named 'mots_common'

but if I just launch the python console and then do

import mots_eval.eval
mots_eval.eval.run_eval('../output/', '../gt', 'mots_eval/val_MOTSchallenge.seqmap')

it works just fine. I have verified that I'm running the same python version (3.6.9) both in the python console and when running the script. I am also in the same folder in both cases.

This is really strange and I've never seen anything like it. I'm not sure if this is a problem with your code or not, but I'm still opening this issue because it's an issue I am having, and if others run into the same issue, whatever solution I/you/we come to might be handy for others.

EddieEduardo commented 4 years ago

I also encountered with this error, can anyone please make an explanation ? Thanks a lot.

pvoigtlaender commented 4 years ago

One way to solve this is to put mots_tools into you PYTHONPATH

either using export in your bashrc or directly when calling the script

PYTHONPATH=${PYTHONPATH}:${pwd} python mots_eval/eval.py ../output/ ../gt/ mots_eval/val_MOTSchallenge.seqmap
ahnonay commented 4 years ago

Closing this, please reopen if needed