module not found while testing project using CenterNet
Hi @xingyizhou . While trying to test my model using the following code I came across issue like "NameError: name 'CenterNet' is not defined". So, I used Path class to resolve the error. Now I am getting issue like "from detectors.detector_factory import detector_factory ModuleNotFoundError: No module named 'detectors'". I have every file set up in the right directory. And I have also given correct path to the files. Can you please guide me?
`import sys from pathlib import Path CENTERNET_PATH = Path("/path/to/CenterNet/src/lib/") sys.path.insert(0, CENTERNET_PATH)
from detectors.detector_factory import detector_factory from opts import opts
MODEL_PATH = Path("/path/to/model") TASK = 'ctdet' # or 'multi_pose' for human pose estimation opt = opts().init('{} --load_model {}'.format(TASK, MODEL_PATH).split(' ')) detector = detector_factoryopt.task
img = Path("image/or/path/to/your/image/") ret = detector.run(img)['results']`
@xingyizhou If you or anyone can quickly guide me about it. Thanks.
Did you resolve this problem? I have it right now. Thankss