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

AP landscape #45

Open
jwfanDL opened this issue Aug 29, 2022 · 2 comments
Open

AP landscape #45

jwfanDL opened this issue Aug 29, 2022 · 2 comments

Comments

@jwfanDL
Copy link

jwfanDL commented Aug 29, 2022

Exciting and excellent work! We are really interested in your AP landscape. Will you released the code or pseudo-code for testing AP landscape?

@Zzh-tju
Copy link
Collaborator

Zzh-tju commented Aug 29, 2022

I can't access the server which has this part of code for the time being, but it will be released once I can. But I can provide some modification suggestions here.

First, you must modify tools/test.py so as to load two detectors. The relevant files are tools/test.py, the function multi_gpu_test() of mmdet/apis/test.py and the function simple_test() of mmdet/models/detectors/single_stage.py.

Then, if I remenber correctly, the main modifications are in the function simple_test() of mmdet/models/detectors/single_stage.py. And the most important part is line 112-113.

In L112, the variable x contains the 5 FPN output feature maps. And then x will be feed into the head networks in L113.

Suppose you have loaded two detectors here, you get x1 and x2 of two detectors. One should note that x is a tuple, it cannot be modified directly. So, you can transform x1, x2 to numpy arrays. And for each FPN level, i.e., x[0], x[1], ..., x[4] (totally 5 levels), you can do math transformation to get a new feature map x[i] = a*x1[i] + b*x2[i], where a,b\in[-0.5,1.5] in the paper. And then transform the numpy array x to a tuple so that it can be feed into L113 outs = self.bbox_head(x) to inference as usual.

Finally, wait the inferece and the evaluation process, you will get the evaluation measures and don't forget to save them.

As a reminder, the 2D AP landscape in the paper evaluates 400 times. It is time-consuming.

@Zzh-tju
Copy link
Collaborator

Zzh-tju commented Aug 31, 2022

@JwFbupt updated, you can see readme. For any further question or bugs, please post here.

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