Media-Smart / vedadet

A single stage object detection toolbox based on PyTorch
Apache License 2.0
498 stars 128 forks source link

Running inference: ModuleNotFoundError: No module named 'vedacore' #97

Open ezionoir opened 1 year ago

ezionoir commented 1 year ago

When I run the model on colab:

!python tools/infer.py '/content/vedadet/configs/infer/tinaface/tinaface_r50_fpn_gn_dcn.py' '/content/vedadet/images/1.jpg'

I get the error:

Traceback (most recent call last): File "/content/vedadet/tools/infer.py", line 7, in from vedacore.image import imread, imwrite ModuleNotFoundError: No module named 'vedacore'

Here is my notebook 'https://colab.research.google.com/drive/1Nr4oAgQagwZUybqfVG78HBws2HhMFksW?usp=sharing'

SeonjiPark commented 7 months ago

If you correctly clone this directory, this is mainly caused by absolute path error. your execute file is in "tools" folder, while vedacore folder exists one step above. so interpreter is finding vedacore module inside "tools" folder.

you can solve this problem by add

import os, sys sys.path.append(os.getcwd())

to your execute file (Ex. tools/infer.py)