Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPR] An error occurred while running code #72

Open
ZiMo-Chen opened this issue Sep 22, 2022 · 16 comments
Open

[CPR] An error occurred while running code #72

ZiMo-Chen opened this issue Sep 22, 2022 · 16 comments

Comments

@ZiMo-Chen
Copy link

When I execute the code [cmd 0], I find a problem, as shown below. I found that the implementation of evaluation seems to be missing in the code. Could you provide it? I would appreciate it if you could.
image
image
image

python=3.7 cuda=11.6 memory size=40G A100

@yinglang
Copy link
Contributor

Hi, thanks for this report. this is due to some files(TOV_mmdetection/mmdet/models/detectors/base.py and TOV_mmdetection/mmdet/models/detectors/single_stage.py) are not updated.
These problem should been solved by replacing the files with the latest code.

@ZiMo-Chen
Copy link
Author

Thank you for your reply

@ZiMo-Chen
Copy link
Author

NFKW2KAPPOI~MPDBX (3Q{I
It's still the same problem

@ZiMo-Chen ZiMo-Chen reopened this Sep 23, 2022
@yinglang
Copy link
Contributor

Thanks for feedback. The problem can be solved by add **kwargs in the functions‘ defination just like this

@ZiMo-Chen
Copy link
Author

1663910344277
Excuse me again, the problem is still there. And I can't find the function "simple_test_bboxes" where is defined.

@yinglang
Copy link
Contributor

Sorry for that, I forget there is another function defination should be change, you can check there

@ZiMo-Chen
Copy link
Author

1663916561573
Excuse me again. There seems to be some code missing in this file eval_hooks.py

@yinglang
Copy link
Contributor

Thanks again. This problem have been solved by replace the TOV_mmdetection/mmdet/apis/train.py as the commit told.

@ZiMo-Chen
Copy link
Author

https://github.com/ucas-vg/P2BNet/blob/main/TOV_mmdetection/mmdet/core/evaluation/eval_hooks.py
Can I modify eval_hook here according to eval_hooks in P2B

@yinglang
Copy link
Contributor

I have updatd the eval_hooks.py. And eval_hooks.py in P2B should work too.

@ZiMo-Chen
Copy link
Author

1663979362508
1663979451060
Excuse me again,I don't know why this error occurs
1663979540431
1663979600055

@yinglang
Copy link
Contributor

Does the problem still exists?

@yinglang yinglang changed the title An error occurred while running code [CPR] An error occurred while running code Sep 24, 2022
@ZiMo-Chen
Copy link
Author

1664071090969
The problem remains

@yinglang
Copy link
Contributor

1663979362508 1663979451060 Excuse me again,I don't know why this error occurs 1663979540431 1663979600055

Does this problem still exists?

@yinglang
Copy link
Contributor

yinglang commented Sep 25, 2022

1664071090969 The problem remains

The problem have been solved by replacing TOV_mmdetection/mmdet/datasets/coco.py.

you can re-evaluate CPR by resuming from trained parameter with 'resume-from' args and then use result2ann.py to transform result to annotation.

# [cmd 0]
GPU=2 && CUDA_VISIBLE_DEVICES=0,1 PORT=10001 tools/dist_train.sh \
  configs2/DOTA//coarsepointv2/coarse_point_refine_r50_fpns4_1x_DOTA_1024.py 2 \
  --work-dir ../TOV_mmdetection_cache/work_dir/DOTA//coarsepointv2/noise_rg-0-0-0.25-0.25_1/coarse_point_refine_r50_fpns4_1x_DOTA_1024/loss0gt_r7_7_lr0.0001_1x_1b4g_s8/ \
  --cfg-options optimizer.lr=0.0001 data.samples_per_gpu=1 \
    model.bbox_head.strides=[8] model.neck.start_level=1 \
    model.bbox_head.refine_pts_extractor.pos_generator.radius=7 \
    model.bbox_head.refine_pts_extractor.neg_generator.radius=7  \
    model.bbox_head.train_pts_extractor.pos_generator.radius=7 \
    model.bbox_head.train_pts_extractor.neg_generator.radius=7 \
    evaluation.save_result_file=../TOV_mmdetection_cache/work_dir/DOTA//coarsepointv2/noise_rg-0-0-0.25-0.25_1/coarse_point_refine_r50_fpns4_1x_DOTA_1024/loss0gt_r7_7_lr0.0001_1x_1b4g_s8//latest_result_refine2_2_r7_7.json
--resume-from  ../TOV_mmdetection_cache/work_dir/DOTA//coarsepointv2/noise_rg-0-0-0.25-0.25_1/coarse_point_refine_r50_fpns4_1x_DOTA_1024/loss0gt_r7_7_lr0.0001_1x_1b4g_s8/latest.pth

# [cmd 1]
python exp/tools/result2ann.py --ori_ann data/dota/DOTA-split/trainsplit/noise_rg-0-0-0.25-0.25_1/pseuw16h16/DOTA_train_1024_coarse.json \
  --det_file ../TOV_mmdetection_cache/work_dir/DOTA//coarsepointv2/noise_rg-0-0-0.25-0.25_1/coarse_point_refine_r50_fpns4_1x_DOTA_1024/loss0gt_r7_7_lr0.0001_1x_1b4g_s8//latest_result_refine2_2_r7_7.json \
  --save_ann ../TOV_mmdetection_cache/work_dir/DOTA//coarsepointv2/noise_rg-0-0-0.25-0.25_1/coarse_point_refine_r50_fpns4_1x_DOTA_1024/loss0gt_r7_7_lr0.0001_1x_1b4g_s8//DOTA_train_1024_refine2_2_r7_7.json

@ZiMo-Chen
Copy link
Author

Thanks, the problem is mostly solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants