vedadet icon indicating copy to clipboard operation
vedadet copied to clipboard

Running inference: ModuleNotFoundError: No module named 'vedacore'

Open ezionoir opened this issue 1 year ago • 1 comments

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'

ezionoir avatar May 29 '23 09:05 ezionoir

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)

SeonjiPark avatar Mar 19 '24 04:03 SeonjiPark