wusize / ovdet

[CVPR2023] Code Release of Aligning Bag of Regions for Open-Vocabulary Object Detection
https://openaccess.thecvf.com/content/CVPR2023/papers/Wu_Aligning_Bag_of_Regions_for_Open-Vocabulary_Object_Detection_CVPR_2023_paper.pdf
Other
176 stars 4 forks source link

ModuleNotFoundError: No module named 'ovdet' #14

Closed kinredon closed 1 year ago

kinredon commented 1 year ago

Hi, thanks for your excellent work!

I tried to generate the Class Embeddings and run the following commands:

python tools/hand_craft_prompt.py --model_version ViT-B/32 --ann data/coco/annotations/instances_val2017.json \
--out_path data/metadata/coco_clip_hand_craft.npy --dataset coco

But there is an error:

Traceback (most recent call last):
  File "tools/hand_craft_prompt.py", line 7, in <module>
    import ovdet.models.vlms.clip.clip as CLIP
ModuleNotFoundError: No module named 'ovdet'

What is the problem with me? can you give me some help?

wusize commented 1 year ago

You may try adding the path of the project to the environmental variables, e.g., adding the following to the file tools/hand_craft_prompt.py

import sys
sys.path.insert(0, 'path/to/this/project/')
kinredon commented 1 year ago

Thanks for your help. I fixed this error now!