XuYunqiu / H2FA_R-CNN

[CVPR 2022] official repo of "H2FA R-CNN: Holistic and Hierarchical Feature Alignment for Cross-domain Weakly Supervised Object Detection"
https://openaccess.thecvf.com/content/CVPR2022/html/Xu_H2FA_R-CNN_Holistic_and_Hierarchical_Feature_Alignment_for_Cross-Domain_Weakly_CVPR_2022_paper.html
Apache License 2.0
29 stars 3 forks source link

No module named 'detectron2.evaluation.cdod_evaluation' #21

Closed SumayyaInayat closed 1 month ago

SumayyaInayat commented 1 month ago

Hi, I hope you are doing well. I am trying to run the code. It works file with detectron v0.2 on a system with Ubuntu 18 and GPU GeForce 1080 ti 12 GB. But when I run the same code in same environment on Ubuntu 22, GPU RTX 4090 24 gb GPU, it give me the module not found error.

Please help me with this. Thanks!

Instructions To Reproduce the 🐛 Bug:

  1. what changes you made (git diff) or what code you wrote
    no changes yet made
  2. what exact command you run:
  3. what you observed (including full logs):
    Exception has occurred: ModuleNotFoundError
    No module named 'detectron2.evaluation.cdod_evaluation'
    File "/media/iml/IML1/sumayya/H2FA_R-CNN-main_1/tools/train_net.py", line 43, in <module>
    from detectron2.evaluation.cdod_evaluation import CrossDomainDetectionEvaluator
    ModuleNotFoundError: No module named 'detectron2.evaluation.cdod_evaluation'
  4. please simplify the steps as much as possible so they do not require additional resources to run, such as a private dataset.

Expected behavior:

If there are no obvious error in "what you observed" provided above, please tell us the expected behavior.

Environment:

Provide your environment information using the following command:

wget -nc -q https://github.com/facebookresearch/detectron2/raw/master/detectron2/utils/collect_env.py && python collect_env.py

If your issue looks like an installation issue / environment issue, please first try to solve it yourself with the instructions in https://detectron2.readthedocs.io/tutorials/install.html#common-installation-issues

XuYunqiu commented 1 month ago

After Detectron2 is installed, you should also build H2FA as follows:

git clone https://github.com/XuYunqiu/H2FA_R-CNN.git
cd H2FA_RCNN
python -m pip install -e .
SumayyaInayat commented 1 month ago

Hi, Thanks alot for the promt reply. Yes I have followed all the installation instructions. The build is done succesfully with no errors.

SumayyaInayat commented 1 month ago

If possible can you please provide the code with an updated version of detectron 2, maybe that might solve the hardware-software incompatibility issue. Thanks alot!

XuYunqiu commented 1 month ago

I'm really sorry I could not update this repo to adapt to the latest version of Detectron 2, as I am busy with other projects currently .

Moreover, I'm guessing there might be other issues causing such error, the detectron2.evaluation.cdod_evaluation is not related to a specific OS or GPU.

SumayyaInayat commented 1 month ago

I completely understand and respect it. Wish you all the best with other projects. Regarding the error, I have tried hard to debug it but no success. Surprisingly all the other modules residing in the same package, do work but not this one. Thanks for your time.

SumayyaInayat commented 1 month ago

Hi, If possible, can you guide me to update the repository to a newer version. And if it was done successfully, I can also share it with you. As far as I understand, the cdod file contains all the the information. Please guide me if this is possible. Thanks alot for your time.

XuYunqiu commented 1 month ago

cdod_evaluation.py is modified from pascal_voc_evaluation.py.

Update the whole repo could be complicated. You might need to adapt all the code relevant to cross-domain object detection. These files are marked in their file header with https://github.com/XuYunqiu/H2FA_R-CNN/blob/499c1d90833c475fd9f288bb6bb90829989def64/detectron2/evaluation/cdod_evaluation.py#L4

SumayyaInayat commented 1 month ago

I will try it with this and share the update. Thanks alot for guiding and giving time! Wish you all the best with your future projects.

XuYunqiu commented 1 month ago

Thanks for your understanding. I'm closing this issue, but feel free to reopen it if you have further questions.